查看日志 tail -n 500 /var/log/ambari-server/ambari-server.log | grep ERROR -A 10 报以下错误
30 八月 2019 15:35:24,380 ERROR [alert-dispatch-4] EmailDispatcher:172 - Unable to dispatch notification via Email
com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.163.com, 25; timeout -1;
nested exception is:
java.net.UnknownHostException: smtp.163.com
at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:2053)
at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:697)
at javax.mail.Service.connect(Service.java:386)
at javax.mail.Service.connect(Service.java:245)
at javax.mail.Service.connect(Service.java:194)
at javax.mail.Transport.send0(Transport.java:253)
at javax.mail.Transport.send(Transport.java:124)
- 查看防火墙设置 防护墙已关闭
[root@siger-master ~]# systemctl status firewalld
● firewalld.service - firewalld - dynamic firewall daemon
Loaded: loaded (/usr/lib/systemd/system/firewalld.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:firewalld(1)
-
查看邮箱告警设置 没有错误
-
查看smtp.com 和 25端口状态 也都能通
[root@siger-master ~]# ping smtp.163.com
PING smtp.163.com (220.181.12.11) 56(84) bytes of data.
64 bytes from m12-11.163.com (220.181.12.11): icmp_seq=1 ttl=53 time=50.6 ms
64 bytes from m12-11.163.com (220.181.12.11): icmp_seq=2 ttl=53 time=46.5 ms
64 bytes from m12-11.163.com (220.181.12.11): icmp_seq=3 ttl=53 time=43.2 ms
^C
--- smtp.163.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 43.205/46.803/50.690/3.062 ms
[root@siger-master ~]# telnet smtp.163.com 25
Trying 220.181.12.17...
Connected to smtp.163.com.
Escape character is '^]'.
220 163.com Anti-spam GT for Coremail System (163com[20141201])
^C
- 更换 smtp server
pop.163.com
查看网卡DNS1设置