Some unknown problems may be related to network communication. Generally, httpwatch is used to check the specific situation, but httpwatch cannot be used in some places, for example:
- The server sends a request to another server and does not know whether the request is correct or not;
- Is the soap service correct?
In order to diagnose the problem, the information needs to be transparent, so with the help of a third-party interception tool similar to a proxy, such tools listen to the specified port, the received information is transferred to the specified server specified port, there are two commonly used:
1. TCP trace running on Windows
Tool: tcptrace.exe
The principle of the transit tool is as follows:
- On the host 192.168.1.186, you can directly access the test web application on port 8080 of host 192.168.1.88 and run dataexchange.
- To understand the communication between the two parties, a tool similar to a proxy is added between the two parties, so that 186 of requests sent to 88 are directly sent to the tool and then transferred to 88 servers by the tool;
- Assuming that a tool is deployed on port 186, the tool sets the listening port to port 86 and forwards port 8080 of the target 88.
You need to set TCP trace as follows:
- In dataexchange, you need to change the test address from 192.168.1.11: 8080 to 192.168.1.11: 86, then run test
Requests sent from web applications are first forwarded to the 100.88 server through the tcptrace tool.
- Or enter http: // 192.168.1.186: 86/test/anywhere, which is equivalent to accessing test on 100.88.
2. Java-only TCP trace, which can run in Linux
When the user does not have a Windows machine, need to use this version of the tool, click the link to download: TCPTrace-Java.rar
On Linux, modify start. sh parameter. The first parameter is the listening port, the second parameter is the target IP address, the third parameter is the port of the target IP address, and the fourth parameter is the encoding of the forwarding request.
Modify the parameters in start. Sh in windows.