Debugging AEM Servers: How to use jmap and jstack linux commands | Community
Skip to main content
New Participant
August 3, 2017
Solved

Debugging AEM Servers: How to use jmap and jstack linux commands

  • August 3, 2017
  • 2 replies
  • 3746 views

Hi Everyone,

I recently had a post with adobe daycare and they said they were unable to help due to the lack of files provided for analysis. They asked specifically for log files (which I provided) and thread dump files (which I did not have created).

Their instructions for future queries was to use "jstack" command to create thread dumps for them to help analyze and provided this URL for instructions:  Take thread dumps from a JVM.

I first determined the PID that JVM was running on using:

"ps -el | grep java" which returns 21777 as the java PID.

However, when I attempt to run the command "jstack -l 21777 >> threaddump.log"  I was met with the error "21777: well-known file is not secure".

I then tried "jstack -l -F 21777 >> threaddump.log" and i was met with a sun.jvm.hotspot.debugger.DebuggerException: cannot open a binary file

I then did some more research on the internet I found that I had to use the jstack command from the same UID that created the process, this UID is consistently "crx" which I do not have access to.

What am I doing wrong / what are my next steps to solving this?

Thank you!

Ian

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by iannovic

Hi,

Yes I was, but the document fails to mention that the correct way to take a threaddump in AEM servers right now is by using the "sudo /usr/local/bin/threaddump" command. I think this was a tool written by someone at adobe that exists on all the servers.

Maybe have someone update that document to reflect that to avoid future confusion

2 replies

iannovicAuthorAccepted solution
New Participant
August 4, 2017

Hi,

Yes I was, but the document fails to mention that the correct way to take a threaddump in AEM servers right now is by using the "sudo /usr/local/bin/threaddump" command. I think this was a tool written by someone at adobe that exists on all the servers.

Maybe have someone update that document to reflect that to avoid future confusion

smacdonald2008
New Participant
August 3, 2017

Were you successful following this doc? 

Take thread dumps from a JVM