Distributions
Ubuntu
Fedora
CentOS
中文资源站
网易开源镜像站
dafsic
V2EX  ›  Linux

telnet 差不多 50 次之内,就会出现超时,为什么啊?

  •  
  •   dafsic · Dec 30, 2019 · 4593 views
    This topic created in 2352 days ago, the information mentioned may be changed or developed.

    telnet 一个机器的端口,正常情况很快,无规律的偶尔会超时,strace 到一次。错误地方在 tcp 连接处。

    connect(3, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("xx.xx.xx.xx")}, 16) = -1 ETIMEDOUT (Connection timed out)

    然后我就没办法继续了,内核版本 4.15.0-52。有大佬有经验不?

    3 replies    2020-01-03 16:08:51 +08:00
    helloworld007
        1
    helloworld007  
       Dec 31, 2019
    在服务端 tcpdump 抓个包(指定端口抓包),用 wireshark 分析看看客户端的请求到了服务器没有?
    排查下是网络问题还是服务器处理程序问题?我估计大部分情况是网络问题。
    最简单的方法是咨询服务器网络提供者
    dafsic
        2
    dafsic  
    OP
       Dec 31, 2019 via Android
    @helloworld007 服务是别人公司的,客户端抓包,只有 syn 没 ACK。我有两个客户端,在不同的机器上,只有一个偶尔超时,所以不会是对端的问题。就是我这个服务器的问题,但是不会找问题原因。
    dilu
        3
    dilu  
       Jan 3, 2020
    一个是抓包,一个是用 strace 跟踪 telnet 命令看看系统调用。只能想到这些了。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1625 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 16:23 · PVG 00:23 · LAX 09:23 · JFK 12:23
    ♥ Do have faith in what you're doing.