阿里雲機器telnet smtp.163.com 25 報 Connection timed out

問題描述:

一批阿里雲機器,發現其中一部分機器沒有辦法訪問smtp.qiye.163.com服務器。相應的業務(docker容器部署)出現報錯,在容器裏面和宿主機上執行 telnet smtp.qiye.163.com 25 均出現了報錯。
報錯信息如下:
[root@new ~]# telnet smtp.qiye.163.com 25
Trying 123.125.50.10...
telnet: connect to address 123.125.50.10: Connection timed out
Trying 123.125.50.11...
telnet: connect to address 123.125.50.11: Connection timed out

[root@new ~]# ping 123.125.50.10
PING 123.125.50.10 (123.125.50.10) 56(84) bytes of data.
64 bytes from 123.125.50.10: icmp_seq=1 ttl=52 time=36.2 ms
64 bytes from 123.125.50.10: icmp_seq=2 ttl=52 time=36.1 ms
64 bytes from 123.125.50.10: icmp_seq=3 ttl=52 time=36.1 ms
64 bytes from 123.125.50.10: icmp_seq=4 ttl=52 time=36.1 ms
64 bytes from 123.125.50.10: icmp_seq=5 ttl=52 time=36.1 ms
^C
--- 123.125.50.10 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 36.170/36.187/36.232/0.209 ms


[root@iZwz96060sxkql7ghg525zZ ~]# ping 123.125.50.11
PING 123.125.50.11 (123.125.50.11) 56(84) bytes of data.
64 bytes from 123.125.50.11: icmp_seq=1 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11: icmp_seq=2 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11: icmp_seq=3 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11: icmp_seq=4 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11: icmp_seq=5 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11: icmp_seq=6 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11: icmp_seq=7 ttl=51 time=38.7 ms
^C
--- 123.125.50.11 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6009ms
rtt min/avg/max/mdev = 38.606/38.704/38.768/0.050 ms


[root@new ~]# ping smtp.qiye.163.com
PING smtp.qiye.163.com (123.125.50.11) 56(84) bytes of data.
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=1 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=2 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=3 ttl=51 time=38.6 ms
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=4 ttl=51 time=38.7 ms
64 bytes from 123.125.50.11 (123.125.50.11): icmp_seq=5 ttl=51 time=38.6 ms
^C
--- smtp.qiye.163.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4005ms
rtt min/avg/max/mdev = 38.631/38.699/38.770/0.182 ms

[root@new ~]# telnet 123.125.50.11 25
Trying 123.125.50.11...
telnet: connect to address 123.125.50.11: Connection timed out




原因分析:

1、查看問題機器本身的防火牆

[root@new ~]# systemctl status firewalld   #檢查了問題機器的防火牆,是關閉的
● firewalld.service - firewalld - dynamic firewall daemon
  Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
  Active: inactive (dead) since Wed 2018-01-31 15:52:28 CST; 2 months 6 days ago
    Docs: man:firewalld(1)
 Process: 27972 ExecStart=/usr/sbin/firewalld --nofork --nopid $FIREWALLD_ARGS (code=exited, status=0/SUCCESS)
Main PID: 27972 (code=exited, status=0/SUCCESS)

Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
[root@new ~]#

2、換端口訪問,發現將25端口換成465端口,就是可以正常訪問的:
[root@new ~]# telnet smtp.qiye.163.com 465
Trying 123.125.50.10...
Connected to smtp.qiye.163.com.
Escape character is '^]'.
^C^CConnection closed by foreign host.
[root@new ~]#


最後參考https://www.v2ex.com/amp/t/393296文檔發現可能是因爲阿里雲過濾掉了25端口。



解決方法:

聯繫阿里雲售後,對方提供了手動申請解封25端口的方法:https://help.aliyun.com/knowledge_detail/56130.html  需手動申請解封25端口

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章