Installation - Startup Parameters for Java Agent on a Payara Application Server


Payara Compatibility

vFunction supports Payara version 5.2020 and later.


Installation Workflow

  1. Install the Dynamic Analysis Controller
  2. Find and note the base path to asadmin on your Payara Application Server

    find / -name 'asadmin' -type f
  3. Copy the vFunction Agent Startup Parameters

    ### Once the output is copied, replace the keyword PAYARA with the full path to asadmin

    less etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/vmargs-examples/payara
  4. Run the asadmin command to add the vFunction Agent Startup Parameters to your Payara instance
  5. Restart the Payara instance
  6. Confirm that the Application comes up and functions as expected
  7. If any issues arise:

Sample contents of vmargs-example/payara file

If using this sample below, you will need to:

  1. Find-and-replace the with the value relevant to your Payara Application Server
  2. Find-and-replace the REPLACE_BASE_DIR with the value relevant to your vFunction installation
  3. 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/payara. 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/payara.

Sudo Installation Sample
<payara>/bin/asadmin create-jvm-options "-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
<payara>/bin/asadmin create-jvm-options "-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"