glowroot / glowroot

Easy to use, very low overhead, Java APM
https://glowroot.org
Apache License 2.0
1.24k stars 309 forks source link

Unable to instrument Java Jboss #254

Closed vijayninave closed 7 years ago

vijayninave commented 7 years ago

Hi, We have instrumented glowroot aget on 1 of the JAVA jboss server. we have followed the standard steps to instrument the agent in this application

Instrumentation path :- JAVA_OPTS="-javaagent:/home/mapp/glowroot-agent/glowroot.jar -Xms1303m -Xmx1303m ..."

Instrumented in :- standalone.sh File

Please find the below error for same & let me know if you need more information.

JAVA: /app/soft/jboss/jdk1.8.0_92/bin/java

JAVA_OPTS: -server -XX:+UseCompressedOops -server -XX:+UseCompressedOops -Xms64m -Xmx2048m -XX:MaxPermSize=2048m -Djava.net.preferIPv4Stack=true -XX:+UnlockCommercialFeatures -XX:+FlightRecorder -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true

=========================================================================

2017-08-04 17:24:37.411 INFO org.glowroot - Glowroot version: 0.9.22, built 2017-07-17 18:59:11 +0000 2017-08-04 17:24:37.413 INFO org.glowroot - Java version: 1.8.0_92 2017-08-04 17:24:39.755 INFO org.glowroot - plugins loaded: Cassandra Plugin, Elasticsearch Plugin, Executor Plugin, Grails Plugin, Hibernate Plugin, HTTP Client Plugin, JAX-RS Plugin, Jdbc Plugin, JMS Plugin, JSF Plugin, JSP Plugin, Logger Plugin, Play Plugin, Netty Plugin, Quartz Plugin, Redis Plugin, Servlet Plugin, Spring Plugin, Struts Plugin Error: Could not find or load main class ...

Regards, Vijay.

trask commented 7 years ago

Thanks for reporting this. What version of JBoss are you using?

trask commented 7 years ago

Also, what is the full line "Error: Could not find or load main class ..."? Thanks

vijayninave commented 7 years ago

Hi Trask,

Thanks for your quick response. We are using JBOSS wildfly-9.0.1.Final_1 for this configuration. there is nothing after this error message.

Could you please provide the compatibility metrics for all java components while doing instrumentation.

Thanks & Regards, Vijay.

trask commented 7 years ago

Thanks, can you also attach your standalone.sh file?

vijayninave commented 7 years ago

nohup.zip Hi Trask,

Requested file has been attached here. This included standalone.sh as well as app log file.

Kindly let me know if you need more information.

Regards, Vijay Ninave

trask commented 7 years ago

I don't see glowroot in the attached standalone.sh? Thanks

vijayninave commented 7 years ago

We have removed the glowroot instrumentation as the application was not getting up. could you please suggest, where we can put the path for same and also let us know is there any steps which we missed for this instrumentation.

Regards, Vijay.

trask commented 7 years ago

Can you post a copy of standalone.sh when it had glowroot in it?

vijayninave commented 7 years ago

standalone.zip Hi Trask,

Please find the attached file for your reference. Accordingly please let me know where we can put the path or the existing one is correct. apart from that is there anything we need to update.

Regards, Vijay.

trask commented 7 years ago

Thanks, it looks like your JAVA_OPTS assignment is mixed up in the echo statements. Can you fix this and try again?

echo "========================================================================="
echo ""
echo "  JBoss Bootstrap Environment"
echo ""
echo "  JBOSS_HOME: $JBOSS_HOME"
echo ""
echo "  JAVA: $JAVA"
echo ""
echo "  JAVA_OPTS: $JAVA_OPTS"
echo ""
echo "========================================================================= JAVA_OPTS="-javaagent:/home/mapp/glowroot-agent/glowroot.jar -Xms1303m -Xmx1303m ..."
"
echo ""
vijayninave commented 7 years ago

Hi Trask,

could you please let me know the exact line number or value, where i can put this assignment. they will not allow us to restart again.

appreciate your help here.

Regards, Vijay.

trask commented 7 years ago

I just noticed, it looks like you explicitly included the ellipsis from the wiki page:

JAVA_OPTS="-javaagent:/path/to/glowroot/glowroot.jar -Xms1303m -Xmx1303m ..."

This is meant to be a placeholder for the existing values.

Also, the wiki page notes to make this change to standalone.conf, not to standalone.sh.

I recommend testing and getting this working locally before trying to push to a controlled environment where you are unable to perform additional restarts.

vijayninave commented 7 years ago

Hi Trask,

Thanks for the updates. sorry for interrupt you again but Just wanted to confirm on below points.

  1. what will be the exact JAVA_OPTS assignment for java environment.
  2. i will update the same in standalone.conf file but do we need to change anything else apart from this
  3. i have updated the glowroot parameters file with the application details.
  4. Is there any compatibility metrics for java applications.

Thanks & Regards, Vijay.

trask commented 7 years ago
  1. All you need to do is add -javaagent:path/to/glowroot.jar to your JAVA_OPTS
  2. Nothing else
  3. I'm unsure which file you are taking about?
  4. Java 6+
vijayninave commented 7 years ago

Hi Task,

If this is supported for Java 6+ , please let us know which components are compatible for eg. Jboss, weblogic, tomcat etc.?

Regards, Vijay Ninave.

Get Outlook for Androidhttps://aka.ms/ghei36

From: Trask Stalnaker Sent: Friday, August 4, 10:18 PM Subject: Re: [glowroot/glowroot] Unable to instrument Java Jboss (#254) To: glowroot/glowroot Cc: Vijay Ninave, Author

All you need to do is add -javaagent:path/to/glowroot.jar to your JAVA_OPTS Nothing else I'm unsure which file you are taking about? Java 6+ — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/glowroot/glowroot/issues/254#issuecomment-320297686, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AdTUTF6YUHnFGV8osgDaUA3OhFwFqO1Sks5sU0tagaJpZM4OtpMr.

trask commented 7 years ago

Please see https://glowroot.org/features.html

vijayninave commented 7 years ago

The steps you have provided are works for me. Appreciate your support.

trask commented 7 years ago

Great to hear, thanks