Curl (56) Recv failure: Connection reset by peer [TCP Retransmission]

问题描述

网络拓扑

enter image description here

PC1:

  • 环境:Centos 8.2 Linux compute-31 4.18.0-240.22.1.el8_3.x86_64 #1 SMP Thu Apr 8 19:01:30 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
  • IP:10.0.0.31
  1. ping 正常
[root@compute-31 ~]# ping 10.10.10.82
PING 10.10.10.82 (10.10.10.82) 56(84) bytes of data.
64 bytes from 10.10.10.82: icmp_seq=1 ttl=63 time=0.741 ms
From 10.0.0.1: icmp_seq=2 Redirect Host(New nexthop: 10.0.0.210)
64 bytes from 10.10.10.82: icmp_seq=2 ttl=63 time=0.404 ms
64 bytes from 10.10.10.82: icmp_seq=3 ttl=63 time=0.429 ms
64 bytes from 10.10.10.82: icmp_seq=4 ttl=63 time=0.389 ms
64 bytes from 10.10.10.82: icmp_seq=5 ttl=63 time=0.412 ms
^C
--- 10.10.10.82 ping statistics ---
5 packets transmitted,5 received,0% packet loss,time 133ms
rtt min/avg/max/mdev = 0.389/0.475/0.741/0.133 ms
  1. telnet 没问题
[root@10.0.0.31 ~]# telnet 10.10.10.82 9100
Trying 10.10.10.82...
Connected to 10.10.10.82.
Escape character is '^]'.
  1. 卷曲不好
[root@10.0.0.31 ~]# curl -v http://10.10.10.82:9100/metrics
*   Trying 10.10.10.82...
* TCP_NODELAY set
* Connected to 10.10.10.82 (10.10.10.82) port 9100 (#0)
> GET /metrics HTTP/1.1
> Host: 10.10.10.82:9100
> User-Agent: curl/7.61.1
> Accept: */*
> 
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
  1. traceroute 没问题
[root@10.0.0.31 ~]# traceroute -n -I 10.10.10.82
traceroute to 10.10.10.82 (10.10.10.82),30 hops max,60 byte packets
 1  10.0.0.1  0.172 ms  0.151 ms  0.146 ms
 2  10.0.0.210  0.209 ms  0.289 ms  0.268 ms
 3  10.10.10.82  0.600 ms  0.582 ms  0.590 ms

PC2:

  • 环境:Windows 10
  • IP:10.0.10.6

卷曲没问题

C:\Users\Jeffery>curl 10.10.10.82:9100/metrics
# HELP go_gc_duration_seconds A summary of the pause duration of garbage collection cycles.
# TYPE go_gc_duration_seconds summary
go_gc_duration_seconds{quantile="0"} 7.228e-06
go_gc_duration_seconds{quantile="0.25"} 8.679e-06
go_gc_duration_seconds{quantile="0.5"} 1.0364e-05
go_gc_duration_seconds{quantile="0.75"} 1.2266e-05
go_gc_duration_seconds{quantile="1"} 0.000641901
go_gc_duration_seconds_sum 0.139410267
go_gc_duration_seconds_count 11244

尝试1

在PC1(10.0.0.31)中,通过添加新路由10.0.0.210 ->10.10.10.82将路由路径改为route add -net 10.10.10.0 netmask 255.255.255.0 gw 10.0.0.210问题解决!但为什么? 10.0.0.1 发生了什么?

PS:旧路径是10.0.0.1 ->10.0.0.210 -> 10.10.10.82

TRY2

我在 tcpdump 中发现了一些东西,但我没有找到导致它的原因。

[root@10.0.0.31 ~]# tcpdump -n -i eno2 host 10.0.0.31 and 10.10.10.82 -w tcpdum.10.0.0.31

enter image description here

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...