How to collect Artifactory thread dumps?

How to collect Artifactory thread dumps?

AuthorFullName__c
Ariel Kabov
articleNumber
000001338
ft:sourceType
Salesforce
FirstPublishedDate
2016-10-06T13:35:37Z
lastModifiedDate
2024-03-10T07:48:20Z
VersionNumber
9

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).