桌面虚拟机下安装centos然后安装opennms,当监控报警,邮件发送遇到的问题

大圈 发布于 2015/06/11 11:25
阅读 427
收藏 0

当我测试一个服务Lost时,日志文件如下:更换过163邮箱,阿里云企业邮箱,也都开启了SMTP服务,都报这个错误。

2015-06-10 18:03:05,237 ERROR [Thread-2722] o.o.n.n.JavaMailNotificationStrategy: send: Error sending notification.

org.opennms.javamail.JavaMailerException: Java Mailer messaging exception: javax.mail.MessagingException: Unknown SMTP host: smtp.sina.com ;
  nested exception is:
        java.net.UnknownHostException: smtp.sina.com
        at org.opennms.javamail.JavaMailer.sendMessage(JavaMailer.java:458) ~[opennms-javamail-api-16.0.0.jar:?]
        at org.opennms.javamail.JavaMailer.mailSend(JavaMailer.java:250) ~[opennms-javamail-api-16.0.0.jar:?]
        at org.opennms.netmgt.notifd.JavaMailNotificationStrategy.send(JavaMailNotificationStrategy.java:71) [opennms-services-16.0.0.jar:?]
        at org.opennms.netmgt.notifd.ClassExecutor.execute(ClassExecutor.java:69) [opennms-services-16.0.0.jar:?]
        at org.opennms.netmgt.notifd.NotificationTask.run(NotificationTask.java:269) [opennms-services-16.0.0.jar:?]
Caused by: javax.mail.MessagingException: Unknown SMTP host: smtp.sina.com
        at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1970) ~[mail-1.4.5.jar:1.4.5]
        at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642) ~[mail-1.4.5.jar:1.4.5]
        at javax.mail.Service.connect(Service.java:295) ~[mail-1.4.5.jar:1.4.5]
        at org.opennms.javamail.JavaMailer.sendMessage(JavaMailer.java:445) ~[opennms-javamail-api-16.0.0.jar:?]

        ... 4 more


这是我的配置文件内容

org.opennms.core.utils.useJMTA=false
#
# These properties define the Mail authentication.
#
#org.opennms.core.utils.authenticate=false
#org.opennms.core.utils.authenticateUser=opennms
#org.opennms.core.utils.authenticatePassword=opennms
#org.opennms.core.utils.starttls.enable=false

org.opennms.core.utils.fromaddress=wfsauto@sina.com
org.opennms.core.utils.mailHost=smtp.sina.com
org.opennms.core.utils.authenticate=true
org.opennms.core.utils.authenticateUser=wfsauto@sina.com
org.opennms.core.utils.authenticatePassword=xxxxx
org.opennms.core.utils.transport=smtp
org.opennms.core.utils.debug=true
org.opennms.core.utils.charset=UTF-8
org.opennms.core.utils.starttls.enable=false

这个问题弄了很久都没搞定,希望可以得到帮助。谢谢!


加载中
返回顶部
顶部