报错:curl: (56) Recv failure: Connection reset by peer

测试环境问题:

时间:2019-03-15 10:14:54
手机:15968854799
信息:时间:2019.03.15 10:14:51 主机名:Zabbix server 监控项:Agent ping为Up (1) 信息:Zabbix agent on Zabbix server is unreachable for 5 minutes,请及时处理。
描述:问题: Zabbix agent on Zabbix server is unreachable for 5 minutes
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   348    0     0  100   348      0   4702 --:--:-- --:--:-- --:--:--  4702
curl: (56) Recv failure: Connection reset by peer
    ###2019-03-15 10:14:54:发送完毕---------------------

后来去CURL 百度页面也不能通!

[root@localhost ~]# curl www.baidu.com
curl: (56) Recv failure: Connection reset by peer

在查问题过程中看到可能是https的问题。就加了https!!

/tmp # curl -I https://baidu.com
HTTP/1.1 302 Moved Temporarily
Server: bfe/1.0.8.18
Date: Fri, 15 Mar 2019 02:38:07 GMT
Content-Type: text/html
Content-Length: 161
Connection: keep-alive
Location: http://www.baidu.com/

竟然通了。。。。后面就在脚本的接口地址 http加上https 就好了。。。。

 

posted @ 2019-03-15 10:39  ShengLeQi  阅读(44395)  评论(0编辑  收藏  举报