使用 POST 方法时没有得到响应(紧急)

使用 POST 方法时没有得到响应(紧急)

我有 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

可能是什么错误

相关内容