search cancel

As a Java Wrapper Service, APM 10.5.1 Linux EPAgent fails to start. Getting wrapper.log message about the JAVA_HOME' environment.


Article ID: 5424


Updated On:


CA Application Performance Management Agent (APM / Wily / Introscope) INTROSCOPE


 In APM 10.5.1, the EPAgent on Linux/Unix is installed and runs under a Java wrapper service EPAgent using the configuration file epagent/conf/EPAService.conf

After setting JAVA_HOME as an exported environment variable when running the commands "./ install" or "./ start" from the epagent/bin directory, the agent fails to start & the bin/wrapper.log file contains these messages: 

| WARN | The 'JAVA_HOME' environment variable was referenced but has not been defined. 

| WARN | The configured could not be found, attempting to launch anyway: %JAVA_HOME%/bin/java 


| ERROR | JVM exited while loading the application. 

| ERROR | Unable to start JVM: No such file or directory (2) 


APM 10.5.1 Environment Performance Agent (EPAgent)


 The installed service EPAgent is running as a daemon by the init process. So it does not inherit the current JAVA_HOME environment variable and is just a symbolic link to the epagent/bin/ file i.e.

# ls -al /etc/init.d/EPAgent

lrwxrwxrwx. 1 root root 43 Feb 7 09:58 /etc/init.d/EPAgent -> /root/epagent/bin/./


To resolve the problem,


Edit the file conf/EPAService.conf and after the commented line "#set.JAVA_HOME=C:\Program Files\jdk1.7.0" add this new line:

set.JAVA_HOME=<FULL PATH OF jre directory> 



Edit the file bin/ In the existing 'if' block for the OSX check, add an extra 'else' block as follows:

# OSX always places Java in the same location so we can reliably set JAVA_HOME

if [ "$DIST_OS" = "macosx" ]


    if [ -z "$JAVA_HOME" ]; then

        JAVA_HOME="/Library/Java/Home"; export JAVA_HOME



        JAVA_HOME=<FULL PATH OF jre directory>; export JAVA_HOME



Additional Information

APM 10.5.1. APM Command Center service apmccctrl will encounter a similar problem and requires the same resolution in its configuration file CommandCenterServer/config/ orscript CommandCenterServer/