`

邮件服务器配置错误Unknown SMTP host:

阅读更多

今天在linux上配置jira邮件服务器,居然报错,同样的配置在windows上运行没有问题,

windows下配置:

 

windows 邮件发送成功信息:

Your test message has been sent successfully to jin.fang@bytime.com.cn .

DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "mail.bytime.com.cn", port 25, isSSL false
220 mail.bytime.com.cn Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at  Fri, 13 Mar 2009 17:03:17 +0800
DEBUG SMTP: connected to host "mail.bytime.com.cn", port: 25

EHLO jinfang

 

 

linux 邮件发送失败信息

An error has occurred with sending the test email:
com.atlassian.mail.MailException: javax.mail.MessagingException: Unknown SMTP host: mail.bytime.com.cn;
  nested exception is:
 java.net.UnknownHostException: mail.bytime.com.cn
 at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:191)
 at com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:88)
 at webwork.action.ActionSupport.execute(ActionSupport.java:153)
 at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54)
 at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
 at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:211)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:73)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
 at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
 at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:192)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:120)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
 at com.atlassian.jira.web.filters.JIRAProfilingFilter.doFilter(JIRAProfilingFilter.java:16)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.jira.web.filters.ActionCleanupDelayFilter.doFilter(ActionCleanupDelayFilter.java:43)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.jira.web.filters.RequestCleanupFilter.doFilter(RequestCleanupFilter.java:50)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.johnson.filters.AbstractJohnsonFilter.doFilter(AbstractJohnsonFilter.java:72)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.gzipfilter.GzipFilter.doFilter(GzipFilter.java:79)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.core.filters.AbstractEncodingFilter.doFilter(AbstractEncodingFilter.java:37)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at com.atlassian.jira.appconsistency.db.DatabaseCompatibilityEnforcerFilter.doFilter(DatabaseCompatibilityEnforcerFilter.java:39)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:541)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
 at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
 at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
 at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
 at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
 at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
 at java.lang.Thread.run(Thread.java:595)
Caused by: javax.mail.MessagingException: Unknown SMTP host: mail.bytime.com.cn;
  nested exception is:
 java.net.UnknownHostException: mail.bytime.com.cn
 at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1211)
 at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:311)
 at javax.mail.Service.connect(Service.java:233)
 at javax.mail.Service.connect(Service.java:134)
 at javax.mail.Service.connect(Service.java:86)
 at com.sun.mail.smtp.SMTPTransport.connect(SMTPTransport.java:144)
 at javax.mail.Transport.send0(Transport.java:150)
 at javax.mail.Transport.send(Transport.java:80)
 at alt.javax.mail.TransportImpl.send(TransportImpl.java:18)
 at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:177)
 ... 63 more


DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG: getProvider() returning javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc]
DEBUG SMTP: useEhlo true, useAuth false
DEBUG SMTP: trying to connect to host "mail.bytime.com.cn", port 25, isSSL false

 

 

 

解决办法:

 

如上图。在windows中设置了dns服务器

而我在linux下没有设置dns服务器

如果把上图的dns服务器去掉,重启jira服务,则发送邮件的结果和linux下一样。

嗨,就这么个小问题,搞了一天,郁闷呀,现在回想还真是有道理:不能上网怎么去访问邮件服务器mail.bytime.com.cn呢?

分享到:
评论

相关推荐

    Liunx 连接不上SMTP服务器解决方案

    检查代码中的端口设置是否与SMTP服务器的实际配置一致。 接着,检查防火墙设置。Linux系统中的iptables或ufw防火墙可能阻止了出站连接到SMTP服务器。使用`sudo iptables -L`或`sudo ufw status`查看防火墙规则,...

    Oracle10G控制台解决办法-Io 异常:Unknown host specified

    Oracle10G控制台解决办法-Io 异常:Unknown host specified解决方法

    Java实现发送邮件功能时碰到的坑

    首先,问题出现在尝试使用中国移动的邮箱发送邮件时,系统抛出了`javax.mail.MessagingException: Unknown SMTP host: mail.chinamobilesz.com`异常,这表明Java程序无法找到指定的SMTP服务器。SMTP(Simple Mail ...

    JDBC driver

    Sybase官方的JDBC驱动程序——jConnect 驱动类名:com.sybase.jdbc3.jdbc.SybDriver 连接URL:jdbc:sybase:Tds:host:port/database?property_name=value

    nodejs npm错误Error:UNKNOWN:unknown error,mkdir 'D:\Develop\nodejs\node_global'at Error

    今天小编就为大家分享一篇关于nodejs npm错误Error:UNKNOWN:unknown error,mkdir 'D:Developnodejsnode_global'at Error,小编觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随小编来看看...

    nodejs npm错误Error:UNKNOWN:unknown error,mkdir ‘D:\Develop\nodejs\node_global’at Error

    错误原因 在设置npm的cache和predix时,因为使用参考其他教程照抄,而没有修改为本机对应路径,本机上并没有这个地址,因此造成了...Error: UNKNOWN: unknown error, mkdir ‘D:\Develop\nodejs\node_global’ at Error

    信息安全_数据安全_Analyst Unknown Cyber Range:A Standard.pdf

    信息安全_数据安全_Analyst Unknown Cyber Range:A Standard 安全设计 安全行业 应急响应 APT 安全实践

    R数据可视化手册

    主要是讲ggplot2的。

    samba的编译安装20160615_1154.7z

    Samba-4.1.14服务器安装和配置 http://www.2cto.com/os/201408/327930.html 【Linux笔记】sambav4.1.9源码安装及基本使用说明 http://blog.sina.com.cn/s/blog_627617bf0101s4ps.html samba4.1.6源代码部署及...

    Go-mailck-golang库用于实现基于smtp的email校验

    2. **连接SMTP服务器**:库将尝试连接到电子邮件地址域名对应的SMTP服务器。这通常涉及到DNS查询来找到MX(邮件交换器)记录,这些记录指示了处理特定域邮件的服务器。 3. **身份验证**:一旦连接建立,`mailck`...

    张孝祥Java邮件开发详解(最全的文档记录)

    现代SMTP服务器为了防止垃圾邮件,通常要求身份验证。 4. **JavaMail API**:JavaMail API提供了创建、发送和接收邮件的功能。主要有三个核心类: - `Message`类:代表电子邮件,用于创建和解析邮件内容。 - `...

    Linux下配置完整安全的DHCP服务器详解.doc

    Linux 下配置完整安全的 DHCP 服务器详解 DHCP(Dynamic Host Configuration Protocol,动态主机配置协议)是一种网络协议,用于自动提供 IP 地址、子网掩码和路由信息给计算机。它使得网络管理员可以更方便地管理 ...

    FreeBSD邮件服务器安装

    根据给定文件的信息,本文将详细介绍如何在FreeBSD系统上安装和配置邮件服务器,包括Postfix、vm-pop3d、OpenWebMail以及反垃圾邮件和病毒扫描组件ClamAV与Amavis-new等。 ### 一、环境准备 文档中提到的操作系统...

    解决Linux ping: unknown host

     ping: unknown host www.baidu.com  首先确定已经连接上路由器,并且路由器能够访问外网,可以通过访问网关进行确定  [root@localhost ~]# ping 8.8.8.8  PING 192.168.1.1 (192.168.1.1) 56(84) bytes of ...

    Java日期时间使用总结及项目中遇到的问题

    Java中的日期时间处理是开发过程中常见的任务,Java提供的API包括`java.util.Date`,`java.util.Calendar`,以及`java.time`包中的类。这里主要讨论`java.util.Date`和`java.text.DateFormat`。...

    springcloud项目,解决unknown问题

    6. **自动配置问题**:Spring Boot的自动配置特性可能会因为配置文件中的错误或缺失导致问题。检查`application.yml`或`application.properties`,确认所有必要的配置项都已正确设置。 7. **插件冲突**:有些IDEA...

    解决ping unknown host

    解决ping unknown host

    smtp协议中文PDF

    - 这条命令指示SMTP服务器准备接收邮件的具体内容。 - **响应**: 接收SMTP将确认准备好接收邮件数据,通常返回`354 Start mail input; end with <CRLF>.<CRLF>`。 - **邮件内容** - 邮件内容包括邮件头部和邮件...

Global site tag (gtag.js) - Google Analytics