Install - Java Windows Dynamic Agent on Tomcat App Server
Tomcat Compatibility
vFunction supports Apache Tomcat version 6 and later.
Installation Wizard
To help with the installation process, vFunction offers an Installation Wizard. This Wizard provides additional information about the Prerequisites as well as steps for deploying the vFunction Agent to your environment.
Please contact support@vfunction.com or your vFunction Contact(s) for the password to start using this Wizard.
Installation Steps
- Ensure Prerequisites are met
- Download the vFunction Windows Controller Installation ZIP
- RDP to the Windows Server as the user who runs the Application / Application Server
- Move the Installation ZIP to the location on the Windows Server where vFunction should run
- Extract the vFunction Installation Package
- Optional: In PowerShell, add Environment Variables for the vFunction Dynamic Agent
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/java/windows
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_NAME','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_HOST','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_ORG_ID','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_APP_ID','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_ID','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_CLIENT_SECRET','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_CONTROLLER_INSTANCE_ID','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_SERVER','CHANGE_ME')
[System.Environment]::SetEnvironmentVariable('VF_CONTROLLER_DEFAULT_JAVA_AGENT_APPLICATION_JAVA_VERSION','CHANGE_ME')
- Optional: Alternatively to Step #6, open the BASE_DIR\vfunction\config\installation\instances\default-java\installation.yaml to set the same values instead of using Environment Variables
# See description in https://kb.vfunction.com/installations/configurable-settings/mono-dynamic-agent/java/windows
controller:
name: qa-windows1
host: http://10.0.0.1
org_id: 1111-11-11-1111
app_id: 1111-11-11-1111
client_id: 1111-11-11-1111
client_secret: 1111-11-11-1111
instace_id: qa-win1
type: java
instrconf_additions:
inclusions:
# - a.b.c.
exclusions:
# - a.b.c.
tags:
- qa
client_certificate:
crt: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
key: |
-----BEGIN PRIVATE KEY-----
...
-----END PRIVATE KEY-----
server_application:
# name:
# include_classes: com.
# allowed_users:
# new_user_default_password:
agent:
### Disable JDBC DB Tracking ###
disable_jdbc: false
### Disable Spring Tracking ###
disable_spring: false
### Optional application servers: weblogic, websphere85, websphere9, liberty, tomcat, wildfly, payara, other ###
application_server: other
### Indicate the application java version when greater than 8. (optional - default to 8) ###
application_java_version: 11
override_properties:
# - key=value
- In PowerShell, unblock the files in the installation directory
### Replace the BASE_DIR with the actual value with the actual value where vFunction was extracted, such as C:\vfunction
dir -Path "BASE_DIR" -Recurse | Unblock-File
- In Powershell, run the installation script
### Replace the BASE_DIR with the actual value with the actual value where vFunction was extracted, such as C:\vfunction
powershell -NoProfile -ExecutionPolicy unrestricted -Command "BASE_DIR\vfunction\controller-installation\install.ps1 -instance default-java"
- In a text editor, open the vFunction Startup Parameters Example file
### Replace the BASE_DIR with the actual value with the actual value where vFunction was extracted, such as C:\vfunction
BASE_DIR\config\agent\instances\default-java\vmargs-examples\tomcat
- Launch the tomcatw.exe to set the Tomcat JAVA_OPTS
- Open the Java tab of the dialog box
- Copy the vFunction Startup Parameters from the text editor with one parameter per line into the Options text box
### Replace BASE_DIR with the actual value
### In some circumstances, you may need to add a second Backslash to each folder in the filepath for the path to be recognized properly. If you see an error about being unable to find the JVMTIAgent.dll, this is probably the case
-agentpath:BASE_DIR\agent\JVMTIAgent.dll=conf=BASE_DIR\config\agent\instances\default-java\native-conf.json
-javaagent:BASE_DIR\agent\runtime-agent.jar=ConfigLocation=REPLACE_BASE_DIR\config\agent\instances\default-java\vfunction-runtime-override.properties
-Dcom.vfunction.logging.logFile=BASE_DIR\log\instances\default-java\vfagent.log
- Restart the Tomcat instance
- Confirm that the Application comes up and functions as expected
- If any issues arise:
- Open Powershell as an Administrator and unblock the files in the installation directory. Replace REPLACE_BASE_DIR with the actual value.
dir -Path "REPLACE_BASE_DIR" -Recurse | Unblock-File
- In Powershell, run the installation script. Replace the INSTANCE_NAME and REPLACE_BASE_DIR with the actual values.
powershell -NoProfile -ExecutionPolicy unrestricted -Command "REPLACE_BASE_DIR\vfunction\controller-installation\install.ps1 -instance INSTANCE_NAME -runAsServices false -agentMode true"
- Configure the JVM Startup Parameters for the vFunction Agent
- Restart the Application