Learning - General Troubleshooting for Java Applications
Check the Application Logging
In the application server log, ensure the vFunction Agent is connected by searching for in the monolith application logs:
vFunction native agent version {version_number} successfully loaded
If there are any Stack Traces to indicate any unexpected errors occurred when the Agent loaded in the Application, gather these Stack Traces and compare them with the list of Known Issues. Share the Stack Traces with your vFunction contact to further debug.
Check the Process List
Check the Process List to see that the vFunction Agent Startup Parameters are added to the Application’s process:
ps -ef | grep java
Sample Output
ubuntu 3492435 1 0 Mar24 ? 00:35:13 /usr/bin/java -agentpath:/tmp/vfunction/opt/vfunction/agent/libJVMTIAgent.so=conf=/tmp/vfunction/etc/sysconfig/vfunction/agent/instances/default-java/native-conf.json -javaagent:/tmp/vfunction/opt/vfunction/agent/runtime-agent.jar=ConfigLocation=/tmp/vfunction/etc/sysconfig/vfunction/agent/instances/default-java/vfunction-runtime-override.properties REPLACE_EXTRA_JVM -Dcom.vfunction.logging.logFile=/tmp/vfunction/var/log/vfunction/instances/default-java/vfagent.log -jar /tmp/app.jar
Check the vFunction Agent Logging
The vFunction Agent logs may provide useful information when debugging. These logs can be gathered by running the Collect Logs script.
- Find the vFunction Collect Logs script
find / -name collect-logs.sh 2>/dev/null | grep 'vfunction'
- Run the vFunction Collect Logs script
### Replace $BASE_DIR with the full path from the FIND command above
bash $BASE_DIR/vfunction/opt/vfunction/controller-installation/collect-logs.sh
- Navigate to the /tmp/ directory where a TGZ is created as v$VERSION$DATE.tgz
- Review the vFunction logging for any unexpected output
- Share the logs with the vFunction team for further debugging together
Check the vFunction Server Logging
If the Application logging and the vFunction Agent logging do not show any unexpected behaviors, check the vFunction Server logs for any errors. In particular, the logs from the vfunction-nginx and vfunction-vfapi-measurements Containers or Pods will provide the most useful information.
Gather logs from a Linux VM running Docker or Podman
- SSH to the Linux VM
- Find the vFunction Collect Logs script
find / -name collect-logs.sh 2>/dev/null | grep 'vfunction'
- Run the vFunction Collect Logs script
### Replace $BASE_DIR with the full path from the FIND command above
bash $BASE_DIR/vfunction/opt/vfunction/server-installation/collect-logs.sh
- Navigate to the /tmp/ directory where a TGZ is created as v$VERSION$DATE.tgz
- Review the vFunction logging for any unexpected output
- Share the logs with the vFunction team for further debugging together
Gather logs from a Cluster
- Access the logs for the vfunction-nginx Pod and look for the keyword error
- Access the logs for the vfunction-vfapi-measurements Pods and look for the keyword error
- Share the logs with the vFunction team for further debugging together