Application Perf Mgmt (BAC / BSM) Support and News Forum
Showing results for 
Search instead for 
Do you mean 

JAVA agent REdhat Tomcat

SOLVED
Go to Solution
Valued Contributor

JAVA agent REdhat Tomcat

Hello expert,

 

How do I intrument tomcat to automatically start Java Probe in redhat? In debian I've attached the parameter into the /etc/init.d/tomcat script and it work fine but it doesnt seem to work in red hat.

 

CATALINA_HOME=/opt/tomcat
export PATH=$PATH:/usr/java/jdk1.6.0_30/bin
export JAVA_PATH=$JAVA_PATH:/usr/java/jdk1.6.0_30/bin
export JRE_PATH=$JRE_PATH:/usr/java/jdk1.6.0_30/bin
JAVA_OPTS="$JAVA_OPTS -Xbootclasspath/p:/usr/local/JavaAgent/DiagnosticsAgent/classes/boot/instr.jre"
JAVA_OPTS="$JAVA_OPTS -javaagent:/usr/local/JavaAgent/DiagnosticsAgent/lib/probeagent.jar"

 

Tomcat start fine but it doesnt autostart the Javaprobe. Any advice is greatly appreciate

 

Dunno if it make any different when tomcat run i get the following

Using CATALINA_BASE:   /opt/tomcat
Using CATALINA_HOME:   /opt/tomcat
Using CATALINA_TMPDIR: /opt/tomcat/temp
Using JRE_HOME:        /usr
Using CLASSPATH:       /opt/tomcat/bin/bootstrap.jar

 

my first reaction is the JRE_HOME is not set....does that make a different?

Also when i run ./jreinstrumenter.sh -a /usr/java

Sun 1.6.0_30 (/usr/java/jdk1.6.0_30/jre)
Sun 1.6.0_30 (/usr/java/default/jre)
Sun 1.6.0_30 (/usr/java/latest/jre)

 

how do i know which one to use? I tested the top 2 and it didnt seem to work

 

Thank you

 

1 ACCEPTED SOLUTIONS
Valued Contributor

Re: JAVA agent REdhat Tomcat

Problem solved...Close thread thank

5 REPLIES
Valued Contributor

Re: JAVA agent REdhat Tomcat

I've also try passing the instrumentaion as:

JAVA_OPTS="-Xbootclasspath/p:/usr/local/JavaAgent/DiagnosticsAgent/classes/Sun/1.6.0_30/instr.jre -javaagent:/usr/local/JavaAgent/DiagnosticsAgent/lib/probeagent.jar"

 

 

 

Valued Contributor

Re: JAVA agent REdhat Tomcat

any idea anyone?

Valued Contributor

Re: JAVA agent REdhat Tomcat

Problem solved...Close thread thank

Regular Advisor

Re: JAVA agent REdhat Tomcat

It will be really helpful if you put the solution also.

 

Thanks

 

Jaise

Highlighted
Valued Contributor

Re: JAVA agent REdhat Tomcat

Here are the step I've too:

First I had to set JAVA_HOME and PATH in /etc/profile

Second the way I declare the JAVA_OPTS was wrong (correct way is JAVA_OPTS="$JAVA_OPTS -javaagent"

Third I notice that the jreinstrumenter result for xbootclass return the following

"-Xbootclasspath/p:/usr/local/JavaAgent/DiagnosticsAgent/classes/boot/instr.jre"

The above path fail when i execute it which is why my script been failing to start the javaagent, I've change it to

"-Xbootclasspath/p:/usr/local/JavaAgent/DiagnosticsAgent/classes/boot"  and that work fine