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


JBoss Compatibility

vFunction supports RedHat JBoss 7.2 and later.


Installation Workflow

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

    ### This should return the location of the bin/standalone.conf which should be in the JBoss base path

    find / -name 'standalone.conf' -type f
  3. Find and note the location and version of the wildfly-common-VERSION.jar on your JBoss Application Server

    find / -name wildfly-common-*.jar -type f
  4. Find and note the location and version of the jboss-logmanager-VERSION.jar on your JBoss Application Server

    find / -name jboss-logmanager-*.jar -type f
  5. Open the vFunction JBoss startup parameters in a text editor

    ### Replace the INSTANCE_NAME below with the actual values

    vi etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/vmargs-examples/wildfly
  6. Modify the JAVA_OPTS:
    1. Change the YOUR-WILDFLY-BASE-PATH to be relevant for your environment
    2. Change the wildfly-common-VERSION.jar to be relevant for your environment
    3. Change the jboss-logmanager-VERSION.jar to be relevant for your environment
  7. Add the startup parameters to your JBoss Application Server's JAVA_OPTS:

    ### Replace the INSTANCE_NAME and YOUR_WILDFLY_BASE_PATH below with the actual values

    cat etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/vmargs-examples/wildfly >> YOUR_WILDFLY_BASE_PATH/bin/standalone.conf
  8. Restart the JBoss instance
  9. Confirm that the Application comes up and functions as expected
  10. If any issues arise:

Sample contents of vmargs-example/wildfly 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
  3. Identify the location and version of the wildfly-common-VERSION.jar on your JBoss Application Server
  4. Replace the placeholder values in the sample below for the wildfly-common-VERSION.jar
  5. Identify the location and version of the jboss-logmanager-VERSION.jar on your JBoss Application Server
  6. Replace the placeholder values in the sample below for the jboss-logmanager-VERSION.jar

This sample file can be found in /opt/vfunction/controller-installation/stuff/agent/vmargs-examples/java/wildfly. 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/wildfly.

Sudo Installation Sample
# vFunction
VFUN_OPTS="-agentpath:REPLACE_BASE_DIR/opt/vfunction/agent/libJVMTIAgent.so -javaagent:REPLACE_BASE_DIR/opt/vfunction/agent/runtime-agent.jar -Dcom.vfunction.instance=REPLACE_INSTANCE"

# PLEASE CHANGE ALL PLACEHOLDERS in < >!!!
export JAVA_OPTS="$VFUN_OPTS -Dsun.util.logging.disableCallerCheck=true -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/a:<your-wildfly-base-path>/modules/system/layers/base/org/wildfly/common/main/wildfly-common-<version>.jar -Xbootclasspath/a:<your-wildfly-base-path>/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-<version>.jar $JAVA_OPTS"
Sudoless Installation Sample
# vFunction
VFUN_OPTS="-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"

# PLEASE CHANGE ALL PLACEHOLDERS in < >!!!
export JAVA_OPTS="$VFUN_OPTS -Dsun.util.logging.disableCallerCheck=true -Djava.util.logging.manager=org.jboss.logmanager.LogManager -Xbootclasspath/a:<your-wildfly-base-path>/modules/system/layers/base/org/wildfly/common/main/wildfly-common-<version>.jar -Xbootclasspath/a:<your-wildfly-base-path>/modules/system/layers/base/org/jboss/logmanager/main/jboss-logmanager-<version>.jar $JAVA_OPTS"