1

Default Tomcat 8.5 logs do not appear to show any failed requests, or anything about the SSL handshakes. Specifically the localhost log and catalina.out

See this question for context about the type of failed request: Intermittent Curl 35 error when using self signed certificate on Tomcat

This question seems to indicate that it is not possible....? Tomcat access logs - are failed requests included?

I tried turning on debug, but still couldn't find anything related to a failed request.

atlas_scoffed
  • 183
  • 1
  • 7
  • Are you checking all logs? The `localhost_access.log` should contain the `500` errors. Application specific logs may end up in `localhost..log` or in application specific logs. – Piotr P. Karwasz Jan 20 '20 at 22:16
  • It's not actually a 500 server error, it doesn't seem to get that far. There is effectively no response from the server. As if it's failing during the SSL handshake. I'm using Tomcat with APR for SSL. – atlas_scoffed Jan 21 '20 at 05:12

1 Answers1

1

If you want to log the connection details, you need to increase to log levels of loggers org.apache.coyote and org.apache.tomcat.util.net, by putting:

org.apache.tomcat.util.net.level = FINE
org.apache.coyote.level = FINE

in $CATALINA_BASE/conf/logging.properties and increasing the log level of some handler, e.g.:

java.util.logging.ConsoleHandler.level = FINE

whose messages eventually end up in catalina.out.

This requires a server restart. You should be able to do the same thing through JMX (e.g. jconsole), without a restart.

Piotr P. Karwasz
  • 5,748
  • 2
  • 11
  • 21
  • 1
    I just had to set org.apache.coyote.http2.level to FINE and that gave me a stack of output. Not sure if it's exactly the one I'm looking for yet. But there is an EOF Exception in there, so good place to start. – atlas_scoffed Jan 21 '20 at 10:31