Enable/Disable Tomcat Java SSL Debug
search cancel

Enable/Disable Tomcat Java SSL Debug

book

Article ID: 204215

calendar_today

Updated On:

Products

Continuous Delivery Director

Issue/Introduction

CDD Plugins need to communicate securely with other 3rd party integrations. How do we enable/disable Java SSL debugging for the Java used by Tomcat?

Environment

Release : 7.3

Component : CONTINUOUS DELIVERY DIRECTOR

Cause

Enabling java ssl debugging is not usually necessary. But this might help if you believe a certificate has been added to your truststore, but for some reason are still receiving PKIX errors. The debug information, often written to the catalina logs, will show you the certificates in your truststore and the SSL Handshake (with the details of certificates used by the handshake) when communicating with a remote system via SSL. 

Resolution

Depending on how Tomcat was installed/setup, there is often one of the following files:

  • <Tomcat_Install_Dir>/bin/catalina.sh
  • /usr/sbin/tomcat8

 

Add/Remove the following lines after the initial lines in this file that set JAVA_OPTS:

# Adding Java Debugging.

JAVA_OPTS="$JAVA_OPTS -Djavax.net.debug=all"

 

Additional Information

Additional Java SSL information is available here: 

https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html

https://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#Debug