Return value<h2>Moved</h2>

question:

In " restful application/x-www-form-urlencoded Send SMS ", after deploying to the server, request content, the returned value is:  <h2>Moved</h2>

I was confused about this return value, and asked if the other party had received the request, and the other party said no. This high probability is because the network is different, the actual return value should be

I/O error on POST request for "http://118.118.2.242:8080/sms/send.do": 
Operation timed out (Connection timed out); nested exception is java.net.ConnectException: Operation timed out (Connection timed out)

Why is <h2>Moved</h2> returned? It may be a relatively friendly return set by the system for services that cannot be connected, but this is not conducive to troubleshooting.

deal with:

First, the ping 118.118.2.242 on the server timed out, and the network is different.

Then go to the config configuration file and add 118.118.2.242 access (similar to a whitelist). After restarting the service, the request will be normal again.

Summarize:

        If the return value is special, such as <h2>Moved</h2>, it is not specific, first ask the other party if they have received it, if not, it is basically a problem of network failure. A whitelist of network access addresses needs to be added.

Guess you like

Origin blog.csdn.net/qq_35461948/article/details/130971401