![使用 POST 方法时没有得到响应(紧急)](https://linux22.com/image/739706/%E4%BD%BF%E7%94%A8%20POST%20%E6%96%B9%E6%B3%95%E6%97%B6%E6%B2%A1%E6%9C%89%E5%BE%97%E5%88%B0%E5%93%8D%E5%BA%94%EF%BC%88%E7%B4%A7%E6%80%A5%EF%BC%89.png)
我有 3 台服务器 svrA、svrB 和 svrC。svrA 和 svrB 需要调用 Web 服务(http://example.com/api/consoleServices) 托管在 svrC 中。
现在的问题是,有时候我能够在 svrA 中获取来自 svrC 的响应,而在 svrB 中却得不到响应;有时候我能够在 svrB 中获取来自 svrC 的响应,而在 svrA 中却得不到响应。
以下是 curl 响应:svrA:
[root@svrA ~]# curl -v -X POST -H "Content-Type: application/json" -d '{"method":"login","user_id":"supAdmin","password":"xxxxxxxxxxxxxxxxxxxxxxxxxx":0,"intUserType":1,"intPortalType":"GV","ipAddress":"::1","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko\/20100101 Firefox\/60.0"}' http://example.com/api/consoleServices
* About to connect() to example.com port 80 (#0)
* Trying 192.168.24.9...
* Connected to example.com (192.168.24.9) port 80 (#0)
> POST /api/consoleServices HTTP/1.1
> User-Agent: curl/7.29.0
> Host: example.com
> Accept: */*
> Content-Type: application/json
> Content-Length: 245
>
* upload completely sent off: 245 out of 245 bytes
< HTTP/1.1 200 OK
< Date: Tue, 02 Jul 2019 06:41:26 GMT
< Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.1.30
< X-Powered-By: PHP/7.1.30
< Access-Control-Allow-Origin: *
< Cache-Control: no-cache, private
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4998
< Connection: keep-alive
< Access-Control-Allow-Origin: *
< Content-Length: 0
< Content-Type: text/html; charset=UTF-8
<
* Connection #0 to host example.com left intact
服务提供者:
[root@svrB conf]# curl -v -X POST -H "Content-Type: application/json" -d '{"method":"login","user_id":"admin","password":"xxxxxxxxxxxxxxxxxxxxxxxxxx>998ecf8427e":0,"intUserType":1,"intPortalType":"GV","ipAddress":"::1","userAgent>":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:60.0) Gecko\/20100101 Firefox\/60.0"}' http://example.com/api/consoleServices
* About to connect() to example.com port 80 (#0)
* Trying 192.168.24.9...
* Connected to example.com (192.168.24.9) port 80 (#0)
> POST /api/consoleServices HTTP/1.1
> User-Agent: curl/7.29.0
> Host: example.com
> Accept: */*
> Content-Type: application/json
> Content-Length: 245
>
* upload completely sent off: 245 out of 245 bytes
可能是什么错误