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



WebLogic Compatibility

vFunction supports Oracle Weblogic 10.3.6 and later.


Installation Workflow

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

    ### This should return the location of the DOMAIN_NAME/bin/startManagedWebLogic.sh for the WebLogic instance

    find / -name 'startManagedWebLogic.sh' -type f
  3. Open the WebLogic Application Server's Startup Script in a text editor

    ### Replace the DOMAIN_NAME with the actual value

    vi DOMAIN_NAME/bin/startManagedWebLogic.sh
  4. Find the section of the file for setting the Java VM options

    /JAVA_OPTIONS
  5. Add a section for the vFunction Startup Parameters above the existing JAVA_OPTIONS. Copy and paste the details below into the startManagedWebLogic.sh script

    VFUN_OPTS
  6. Create a variable with the vFunction Agent Startup Parameters

    ### Replace the INSTANCE_NAME with the actual value

    export VFUN_OPTS=`cat etc/sysconfig/vfunction/agent/instances/INSTANCE_NAME/vmargs-examples/weblogic`
  7. Modify the startManagedWebLogic.sh VFUN_OPTS to include the vFunction Agent Startup Parameters

    ### Replace the DOMAIN_NAME with the actual value

    sed -i "s~VFUN_OPTS=~$VFUN_OPTS~g" DOMAIN_NAME/bin/startManagedWebLogic.sh
  8. Restart the WebLogic instance
  9. Confirm that the Application comes up and functions as expected
  10. If any issues arise:

Sample contents of vmargs-example/weblogic 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 can be found in /opt/vfunction/controller-installation/stuff/agent/vmargs-examples/java/weblogic. 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/weblogic.

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 REPLACE_EXTRA_JVM -Dcom.vfunction.instance=REPLACE_INSTANCE"

export JAVA_OPTIONS="$VFUN_OPTS $JAVA_OPTIONS"
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 REPLACE_EXTRA_JVM -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"

export JAVA_OPTIONS="$VFUN_OPTS $JAVA_OPTIONS"