How to collect Artifactory thread dumps?

Ariel Kabov
2019-08-12 13:55

The following methods are sorted and prioritized.

In some of the methods, you are required to obtain the PID of the tomcat process.
On Windows:$ netstat -ano | findstr <PORT>
*With <PORT> being the port Artifactory id running on (default is 8081)

On Linux use:$ ps -aef | grep java

Method #1 – Running ‘$ kill -3 <PID>’ 
The thread dump will be printed to the catalina.out file.
Please note that when Artifactory isn’t running as a service, the dump will go to the STDOUT of the shell session that runs the server and won't go to the timestamped catalina.out file.

Method #2 – Using the Support Bundle’s built-in thread dump collector

Method #3 – Using ‘JStack’

  • Navigate to ‘{JAVA_HOME}/bin
  • *Run $ ./jstack -l <PID> > "artifactory.$(date +%Y%m%d%H%M%S).td"

*Note that the user executing jstack has to be the same user who owns the JVM process or have sufficient privileges to access it (means that usually you have to run this as the 'artifactory' user).