Yum 失败,出现 [Errno 4] IOError:但 TCP 跟踪路由有效

Yum 失败,出现 [Errno 4] IOError:但 TCP 跟踪路由有效

当我尝试使用 yum info 或 yum install 连接到 yum repos 时,我收到错误:[Errno 4] IOError: <urlopen error (111, 'Connection refused')>我首先认为可能是我们的防火墙出了问题,但traceroute -T -p 80 dl.fedoraproject.org成功完成,却因wget http://dl.fedoraproject.org/pub/epel/5/i386/repodata/repomd.xml连接被拒绝而失败。我有点困惑。什么可以解释这种行为?这是一个我没有设置并且很少访问的 RHEL 5 框。DNS 解析正常,路由表中没有静态路由,我可以看到服务器上没有代理。

答案1

traceroute -T并没有像你想象的那样做。它使用 TCP SYN 数据包来探测设备是否存在。成功意味着它得到了某种响应。很可能它确实得到了响应:连接被拒绝。

以下是精细手册:

   This  method  uses well-known "half-open technique", which prevents applications on
   the destination host from seeing our probes at all.  Normally, a tcp syn  is  sent.
   For  non-listened ports we receive tcp reset, and all is done. For active listening
   ports we receive tcp syn+ack, but answer by tcp  reset  (instead  of  expected  tcp
   ack),  this way the remote tcp session is dropped even without the application ever
   taking notice.

相关内容