Recording failed HTTP requests with tcpdump

I have a Java webapp running inside Tomcat 7.0.22, from time to time there are HTTP requests that cause HTTP 500(Unexpected exceptions in my application) in production env. To reproduce these errors in an intermediate environment, I usually started tcpdumpand recorded all the HTTP traffic, and then used WireShark to filter packets with http.response.code != 200 or 204 or 302and started to “follow the HTTP stream” for each response, thereby giving me a query that caused this error. Then I can re-run this cURL request in the staging environment.

My question is:

  • How can this procedure be performed automatically?
  • Is there a way to achieve the same effect (for reproducing errors) using any other technique? (maybe some Filterinside Tomcat)

thank

Alex

+3
source share
1 answer

There are tools that provide such functionality. In fact, they even do more: they usually use your Java code to determine which module is responsible for the failure.

Correlsense, . , , . newrelic.com, , Correlsense, , ,

+1

All Articles