Installation - Startup Parameters for Java Agent on an Open Liberty Application Server
- Open Liberty Compatibility
- Installation Workflow
- Sample contents of vmargs-example/tomcat file
- Why use the CATALINA_OPTS instead of JAVA_OPTS?
Open Liberty Compatibility
vFunction supports Open Liberty version 21 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 Open Liberty's SERVER_CONFIG_DIR
find / -name 'server.xml' -type f - Add the startup parameters to your Open 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 Open 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
# Create file <wlp>/usr/servers/<your-server>/jvm.options and add the following lines:
-agentpath:REPLACE_BASE_DIR/opt/vfunction/agent/libJVMTIAgent.so
-javaagent:REPLACE_BASE_DIR/opt/vfunction/agent/runtime-agent.jar
-Dcom.vfunction.instance=REPLACE_INSTANCE
Sudoless Installation Sample
# Create file <wlp>/usr/servers/<your-server>/jvm.options and add the following lines:
-agentpath:REPLACE_BASE_DIR/opt/vfunction/agent/libJVMTIAgent.so=conf=REPLACE_BASE_DIR/etc/sysconfig/vfunction/agent/instances/REPLACE_INSTANCE/native-conf.json
-javaagent:REPLACE_BASE_DIR/opt/vfunction/agent/runtime-agent.jar=ConfigLocation=REPLACE_BASE_DIR/etc/sysconfig/vfunction/agent/instances/REPLACE_INSTANCE/vfunction-runtime-override.properties
-Dcom.vfunction.runtime.shared.folder=REPLACE_BASE_DIR/opt/vfunction/controller/instances/REPLACE_INSTANCE/temp/
-Dcom.vfunction.runtime.offload.tmpFolder=REPLACE_BASE_DIR/opt/vfunction/agent/instances/REPLACE_INSTANCE/temp/
-Dcom.vfunction.logging.logFile=REPLACE_BASE_DIR/var/log/vfunction/instances/REPLACE_INSTANCE/vfagent.log