If you have this:
1) Tomcat listening in HTTP, not HTTPS
2) ssh access to the machine
3) administrator access to the machine
and are on Linux (or Unix in general, but my command is linux specific)
do this as root:
tcpdump -nnpi any -s0 -vvv -w /tmp/dump.pcap port 8080
After the request you're interested in are done press CTRl+C
from your client, assuming it's linux but on win you can use putty or
whatever:
scp remote-machine:/tmp/dump.pcap .
wireshark dump.pcap
Done.
P.S.
If your tomcat's HTTP Connector isn't listening at port 8080 change the
port accordingly in my tcpdump command
On 06/17/2015 08:04 PM, Milinda Perera wrote:
Hi all,
Thanks for suggestions,
Actually I want to log all HTTP / HTTPS requests from client applications
to my Tomcat server and the Response sent back to the client. And logging
requests and payloads are not target specific application running in the
Tomcal server, which means all the request to the Tomcat server and all the
responses from the Tomcat server
My requirement cannot be fulfilled with external tools like wireshark
because:
1. unable to log HTTPS requests and responses
2. And I need to get logged requests and responses in server side log
files without external tools.
by changing *org.apache.coyote.level=FINE *in log properties logs HTTP
requests to the server, but does not log response.
Highly appreciate if you guys can share your thoughts to achieve this.
Thanks,
Milinda
On Wed, Jun 17, 2015 at 5:56 PM, André Warnier <a...@ice-sa.com> wrote:
Frederik Nosi wrote:
It helps only with HTTP though, no HTTPS or at least not easily.
While we are at this, are you trying to debug a SOAP / REST connection
from your application running on Tomcat to another server or a connection
coming from outside to your Tomcat?
On 06/17/2015 11:16 AM, Mark Thomas wrote:
On 17/06/2015 10:10, Milinda Perera wrote:
Hi,
I need to log HTTP payload content for debugging purposes.
Use Wireshark. That has the added benefit of not having any unwanted
side-effects on your application.
Mark
If this is for one debugging session, you could also simply use an add-on
to a browser (such as Fiddler2 for IE), and record the full exchanges there.
It has the advantage that you see the complete traffic in both directions
(headers and content), and that you can easily switch between different
presentations of the data, and save it to file if you need to. And
depending on what you are looking for, it may be a lot easier to handle
than Wireshark.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org