Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

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

Avatar

Level 3

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

1 Accepted Solution

Avatar

Correct answer by
Level 3

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

View solution in original post

2 Replies

Avatar

Correct answer by
Level 3

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