Installation - Startup Parameters for Java Agent on a WebSphere Liberty Application Server
- WebSphere Liberty Compatibility
- Installation Workflow
- Sample contents of vmargs-example/websphere file
WebSphere Compatibility
vFunction supports IBM WebSphere Liberty version 22 and later.
Installation Workflow
- Install the Dynamic Analysis Controller
- Find and note the base path to your Open Liberty Application Server
### This should return the location of the WebSphere Liberty's SERVER_CONFIG_DIR
find / -name 'server.xml' -type f - Add the startup parameters to your WebSphere Liberty Application Server's jvm.options:
### Replace the INSTANCE_NAME and SERVER_CONFIG_DIR below with the actual value
cat etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/vmargs-examples/liberty >> SERVER_CONFIG_DIR/jvm.options - Restart the WebSphere Liberty instance
- Confirm that the Application comes up and functions as expected
- If any issues arise:
Sample contents of vmargs-example/liberty file
If using this sample below, you will need to:
- Find-and-replace the REPLACE_BASE_DIR with the value relevant to your vFunction installation
- Find-and-replace the REPLACE_INSTANCE with the value relevant to your vFunction installation
This sample file exists in the Installation TGZ in /opt/vfunction/controller-installation/stuff/agent/vmargs-examples/java/liberty
. Once the install.sh script is run, the relevant placeholder fields are replaced in the version of the environmentally-specific file in /etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/liberty
.
Sudo Installation Sample
### Replace REPLACE_INSTANCE with the actual value, such as default-java
### Replace REPLACE_EXTRA_JVM if using Java 11 or 17
### Create file WLP/usr/servers/YOUR_SERVER/jvm.options and add the following lines
-agentpath:/opt/vfunction/agent/libJVMTIAgent.so
-javaagent:/opt/vfunction/agent/runtime-agent.jar
-Dcom.vfunction.instance=REPLACE_INSTANCE
Sudoless Installation Sample
### Replace REPLACE_BASE_DIR with the actual value, such as /home/USERNAME/
### Replace REPLACE_INSTANCE with the actual value, such as default-java
### Replace REPLACE_EXTRA_JVM if using Java 11 or 17
### Create file WLP/usr/servers/YOUR_SERVER/jvm.options and add the following lines
-agentpath:REPLACE_BASE_DIR/vfunction/opt/vfunction/agent/libJVMTIAgent.so=conf=REPLACE_BASE_DIR/vfunction/etc/sysconfig/vfunction/agent/instances/REPLACE_INSTANCE/native-conf.json
-javaagent:REPLACE_BASE_DIR/vfunction/opt/vfunction/agent/runtime-agent.jar=ConfigLocation=REPLACE_BASE_DIR/vfunction/etc/sysconfig/vfunction/agent/instances/REPLACE_INSTANCE/vfunction-runtime-override.properties
-Dcom.vfunction.runtime.shared.folder=REPLACE_BASE_DIR/vfunction/opt/vfunction/controller/instances/REPLACE_INSTANCE/temp/
-Dcom.vfunction.runtime.offload.tmpFolder=REPLACE_BASE_DIR/vfunction/opt/vfunction/agent/instances/REPLACE_INSTANCE/temp/
-Dcom.vfunction.logging.logFile=REPLACE_BASE_DIR/vfunction/var/log/vfunction/instances/REPLACE_INSTANCE/vfagent.log