遇到一个奇葩问题,访问我们自己的网站接口,有的网段访问正常, 有的网段访问,有时正常有时报 curl(56) Recv failure: Connection reset by peer 而且同一个网段访问也是这样 。

在本机上访问一直都是报这样的错误。

服务器的防火墙关闭了,ping没有丢包,telnet 端口正常,机器也重启了,还是不行,实在找不到解决办法,只能要求换机器了。

下面是用tcpdump抓包

# tcpdump -i bond0 host ip地址

###正常数据包

listening on bond0, link-type EN10MB (Ethernet), capture size 262144 bytes
10:20:06.251835 IP shpaas-container-c2-008.14492 > 10.7.34.137.http: Flags [S], seq 3133217419, win 29200, options [mss 1460,sackOK,TS val 2884918391 ecr 0,nop,wscale 9], length 0
10:20:06.254947 IP 10.7.34.137.http > shpaas-container-c2-008.14492: Flags [S.], seq 400517749, ack 3133217420, win 4380, options [mss 1460,nop,nop,TS val 8530366 ecr 2884918391,sackOK,eol], length 0
10:20:06.254998 IP shpaas-container-c2-008.14492 > 10.7.34.137.http: Flags [.], ack 1, win 29200, options [nop,nop,TS val 2884918395 ecr 8530366], length 0
10:20:06.255064 IP shpaas-container-c2-008.14492 > 10.7.34.137.http: Flags [P.], seq 1:108, ack 1, win 29200, options [nop,nop,TS val 2884918395 ecr 8530366], length 107: HTTP: HEAD /openApi/zwdtcert/login/login.do HTTP/1.1
10:20:06.257916 IP 10.7.34.137.http > shpaas-container-c2-008.14492: Flags [.], ack 108, win 4487, options [nop,nop,TS val 8530369 ecr 2884918395], length 0
10:20:06.274944 IP 10.7.34.137.http > shpaas-container-c2-008.14492: Flags [P.], seq 1:161, ack 108, win 4487, options [nop,nop,TS val 8530386 ecr 2884918395], length 160: HTTP: HTTP/1.1 401 Unauthorized
10:20:06.274973 IP shpaas-container-c2-008.14492 > 10.7.34.137.http: Flags [.], ack 161, win 30016, options [nop,nop,TS val 2884918415 ecr 8530386], length 0
10:20:06.275207 IP shpaas-container-c2-008.14492 > 10.7.34.137.http: Flags [F.], seq 108, ack 161, win 30016, options [nop,nop,TS val 2884918415 ecr 8530386], length 0
10:20:06.278058 IP 10.7.34.137.http > shpaas-container-c2-008.14492: Flags [.], ack 109, win 4487, options [nop,nop,TS val 8530389 ecr 2884918415], length 0
10:20:06.278783 IP 10.7.34.137.http > shpaas-container-c2-008.14492: Flags [F.], seq 161, ack 109, win 4487, options [nop,nop,TS val 8530390 ecr 2884918415], length 0
10:20:06.278817 IP shpaas-container-c2-008.14492 > 10.7.34.137.http: Flags [.], ack 162, win 30016, options [nop,nop,TS val 2884918418 ecr 8530390], length 0
10:20:22.977354 IP shpaas-container-c2-008.17868 > 10.7.34.137.http: Flags [S], seq 3278439648, win 29200, options [mss 1460,sackOK,TS val 2884935117 ecr 0,nop,wscale 9], length 0
10:20:22.980484 IP 10.7.34.137.http > shpaas-container-c2-008.17868: Flags [S.], seq 763138052, ack 3278439649, win 4380, options [mss 1460,nop,nop,TS val 8547091 ecr 2884935117,sackOK,eol], length 0
10:20:22.980543 IP shpaas-container-c2-008.17868 > 10.7.34.137.http: Flags [.], ack 1, win 29200, options [nop,nop,TS val 2884935120 ecr 8547091], length 0
10:20:22.980656 IP shpaas-container-c2-008.17868 > 10.7.34.137.http: Flags [P.], seq 1:108, ack 1, win 29200, options [nop,nop,TS val 2884935120 ecr 8547091], length 107: HTTP: HEAD /openApi/zwdtcert/login/login.do HTTP/1.1
10:20:22.983543 IP 10.7.34.137.http > shpaas-container-c2-008.17868: Flags [.], ack 108, win 4487, options [nop,nop,TS val 8547094 ecr 2884935120], length 0
10:20:23.000406 IP 10.7.34.137.http > shpaas-container-c2-008.17868: Flags [P.], seq 1:161, ack 108, win 4487, options [nop,nop,TS val 8547111 ecr 2884935120], length 160: HTTP: HTTP/1.1 401 Unauthorized
10:20:23.000436 IP shpaas-container-c2-008.17868 > 10.7.34.137.http: Flags [.], ack 161, win 30016, options [nop,nop,TS val 2884935140 ecr 8547111], length 0
10:20:23.000708 IP shpaas-container-c2-008.17868 > 10.7.34.137.http: Flags [F.], seq 108, ack 161, win 30016, options [nop,nop,TS val 2884935140 ecr 8547111], length 0
10:20:23.003547 IP 10.7.34.137.http > shpaas-container-c2-008.17868: Flags [.], ack 109, win 4487, options [nop,nop,TS val 8547114 ecr 2884935140], length 0
10:20:23.003793 IP 10.7.34.137.http > shpaas-container-c2-008.17868: Flags [F.], seq 161, ack 109, win 4487, options [nop,nop,TS val 8547114 ecr 2884935140], length 0
10:20:23.003815 IP shpaas-container-c2-008.17868 > 10.7.34.137.http: Flags [.], ack 162, win 30016, options [nop,nop,TS val 2884935143 ecr 8547114], length 0 ###异常数据包
10:21:27.336118 IP shpaas-container-c2-008.6987 > 10.7.34.137.http: Flags [S], seq 2469240435, win 29200, options [mss 1460,sackOK,TS val 2884999475 ecr 0,nop,wscale 9], length 0
10:21:27.339227 IP 10.7.34.137.http > shpaas-container-c2-008.6987: Flags [S.], seq 4274905813, ack 2469240436, win 4380, options [mss 1460,nop,nop,TS val 8611447 ecr 2884999475,sackOK,eol], length 0
10:21:27.339280 IP shpaas-container-c2-008.6987 > 10.7.34.137.http: Flags [.], ack 1, win 29200, options [nop,nop,TS val 2884999479 ecr 8611447], length 0
10:21:27.339389 IP shpaas-container-c2-008.6987 > 10.7.34.137.http: Flags [P.], seq 1:108, ack 1, win 29200, options [nop,nop,TS val 2884999479 ecr 8611447], length 107: HTTP: HEAD /openApi/zwdtcert/login/login.do HTTP/1.1
10:21:27.342223 IP 10.7.34.137.http > shpaas-container-c2-008.6987: Flags [.], ack 108, win 4487, options [nop,nop,TS val 8611450 ecr 2884999479], length 0
10:21:31.342331 IP 10.7.34.137.http > shpaas-container-c2-008.6987: Flags [R.], seq 1, ack 108, win 4487, length 0

curl(56) Recv failure: Connection reset by peer的更多相关文章

  1. CentOS7: How to resolve curl#56 - "Recv failure: Connection reset by peer"

    Issue: When you execute Yum installation or update, you may encounter following error: Loaded plugin ...

  2. [GitHub] git push的时候报错 fatal: unable to access 'http://github.com/xxx/xxx.git/': Recv failure: Connection reset by peer

    参考了两种方法: 1. 解决fatal: unable to connect to github.com问题 http://blog.csdn.net/greenqingqingws/article/ ...

  3. docker 部署net core程序 curl访问地址 提示 Connection reset by peer

    最近研究netcore 部署到docker上.在参考https://www.cnblogs.com/subendong/p/8992285.html教程之后,部署成功.但是curl访问对应的主机端口地 ...

  4. recv() failed (104: Connection reset by peer) while reading response header from upstream

    2017年12月1日10:18:34 情景描述: 浏览器执行了一会儿, 报500错误 运行环境:  nginx + php-fpm nginx日志:  recv() failed (104: Conn ...

  5. nginx recv() failed (104: Connection reset by peer) while reading response header from upstream解决方法

    首先说下 先看 按照ab 每秒请求的结果 看看 都有每秒能请求几个 如果并发量超出你请求的个数 会这样 所以一般图片和代码服务器最好分开 还有看看io瓶ding 和有没有延迟的PHP代码执行 0 先修 ...

  6. nginx错误分析 `104: Connection reset by peer`

    故障描述 应用从虚拟机环境迁移到kubernetes环境中,有些应用不定时出现请求失败的情况,且应用没有记录任何日志,而在NGINX中记录502错误.我们查看了之前虚拟机中的访问情况,没有发现该问题. ...

  7. pytorch bug: for step,data in enumerate(loader)+Connection reset by peer

    单GPU跑的程序,而且是在docker中,迭代了几百步后,程序突然崩掉了, 程序停在了 for step,data in enumerate(loader),下面是部分bug信息 Traceback ...

  8. Docker: connection reset by peer

    想来,对docker的学习和实践,已经一年有余了,而我关于这样的文章,只有为数不多的几篇.今天借使用docker中发生的一种异常情况为例,写此篇幅. 这个是在centos7.0 ..netcore2. ...

  9. Netty 中 IOException: Connection reset by peer 与 java.nio.channels.ClosedChannelException: null

    最近发现系统中出现了很多 IOException: Connection reset by peer 与 ClosedChannelException: null 深入看了看代码, 做了些测试, 发现 ...

随机推荐

  1. Centos6.5镜像下载

    CentOS6.5系统安装 1.首先打开网易开源镜像站: http://mirrors.163.com/ 当然,大家也可以使用阿里开源镜像站:http://mirrors.aliyun.com/ 2. ...

  2. php实现支付宝在线支付和扫码支付demo

    ### php实现支付宝在线支付和扫码支付demo 背景:在做一个公众号时增加了h5端,需要接入支付,非微信环境,选择了支付宝,以下简单记录下实现过程,并做了简单的封装,拿来即可使用,注意:本项目只是 ...

  3. Linux文件删除,但是df -hT之后磁盘空间没有释放

    Linux 磁盘空间总是报警,查到到大文件,删除之后,df看到磁盘空间并没有释放. 查找了下发现系统对rm进行了alias   ,因为Linux对删除操作没有回收站机制,对rm操作进行了自定义,对删除 ...

  4. Luogu4770 NOI2018你的名字(后缀自动机+线段树合并)

    先考虑l=1,r=n,并且不要求本质不同的情况.对原串建SAM,将询问串在上面跑,得到每个前缀的最长匹配后缀即可得到答案. 然后考虑本质不同.对询问串也建SAM,统计每个节点的贡献,得到该点right ...

  5. Session和Cookie的原理

    1.session和cookie的存储 session一般保存在服务端文件中,php.ini中有个配置项--session.save_path='';这个里面填写的路径,将会使session文件保存在 ...

  6. (六)发送、接收SOAP消息(1)

    一.为什么要用soap 原本我们使用web服务都是根据wsdl生成客户端(生成一堆java文件)然后再调用,本章节讲解如何用soap消息来替代这种方式. 二.SOAP消息格式 SOAP(简单对象访问协 ...

  7. 编译openwrt backfire过程中出现的问题

    参考的步骤如链接: http://www.right.com.cn/forum/forum.php?mod=viewthread&tid=124604 在make menuconfig的时候出 ...

  8. 重构与反思-<重构代码的7个阶段>有感

    https://coolshell.cn/articles/5201.html/comment-page-2#comment-1932554 过去半年基本上完整经历了这个文章的各个阶段,看完文章结合自 ...

  9. Eclipse 设置代码模板

    checkstyle插件 安装 从 http://sourceforge.jp/projects/sfnet_eclipse-cs/releases/ 下载 net.sf.eclipsecs-upda ...

  10. list通过lambda 表达式去重,筛选

    List<User> distinctList = new ArrayList();User user1 = new User();user1.setId("111") ...