Installation - Startup Parameters for Java Agent on a WebSphere Liberty Application Server



WebSphere Compatibility

vFunction supports IBM WebSphere Liberty version 22 and later.


Installation Workflow

  1. Install the Dynamic Analysis Controller
  2. 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
  3. 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
  4. Restart the WebSphere Liberty instance
  5. Confirm that the Application comes up and functions as expected
  6. If any issues arise:

Sample contents of vmargs-example/liberty file

If using this sample below, you will need to:

  1. Find-and-replace the REPLACE_BASE_DIR with the value relevant to your vFunction installation
  2. 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