Dynatrace Agent installed on CA Access Gateway (SPS) to monitor performance.
When enabling the Custom error page on the CA Access Gateway (SPS), it was observed that Tomcat is Evaluating the Exception properly and Redirecting to the correct Error page, however, for some reason, the 500 Status generated by Tomcat for the Error page is not being committed.
Use case as Follows:
- Error page Enabled on CA Access Gateway (SPS) (1).
- http_socket_timeout was set to 2 min, meaning CA Access Gateway will wait for a Response from the backend for 2 min. If not request received, Tomcat will issue a Timeout:
Exception along with 500 Status
[Noodle.java][Noodle::doGet][][][][][][][][][][][][][][][][java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method)]
[Thread performing the required IO interupted. might be the connection time out.]
[Thread performing the required IO interupted. might be the connection time out.]
[ErrorPageImpl.java][ErrorPageImpl::displayMessage][][][][][][][][][][][][][][][][ after calling generateHTML, message: <HTML><HEAD><TITLE>Secure Proxy Server - Error Report</TITLE><style>body { font-family: verdana, Georgia, Arial, "Times New Roman", Times, serif; }</style></HEAD><BODY><H1><center>Secure Proxy Server - Error Report</center></H1><H2>Error Details</H2><TABLE><TR VALIGN="TOP"><TD><H3>Request URI</H3></TD><TD>:</TD><TD>/YourResourceHere</TD></TR><TR VALIGN="TOP"><TD><H3>Error Type</H3></TD><TD>:</TD><TD>SPS Exception</TD></TR><TR VALIGN="TOP"><TD><H3>Error Code</H3></TD><TD>:</TD><TD>Noodle_InteruptedIOException</TD></TR><TR VALIGN="TOP"><TD><H3>Error Message</H3></TD><TD>:</TD><TD>Thread performing the required IO interupted. might be the connection time out.</TD></TR></TABLE></BODY></HTML>]
- The issue is the 500 Generated by Tomcat is not being set correctly, instead, from the mod_jk trace, it was observed that the message returned to the client (browser) was Status 200 instead which is leading to a blank page displayed on the browser side instead of the error message:
[debug] jk_ajp_common.c (739): (ajp13) status = 200