Jenkinsを正確に構成しました Outlookを介してJenkinsの電子メール通知を構成するにはどうすればよいですか?
数日前は正常に機能していましたが、最近失敗し始めました。私のジェンキンスはジェンキンスver。 2.1、Jenkinsver。にアップグレードしました。 2.33しかし、それでも運がない。これがエラーログです。
javax.mail.MessagingException: Could not connect to SMTP Host: smtp.office365.com, port: 587;
nested exception is:
Java.net.ConnectException: Connection timed out: connect
at com.Sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.Java:1934)
at com.Sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.Java:638)
at javax.mail.Service.connect(Service.Java:317)
at javax.mail.Service.connect(Service.Java:176)
at javax.mail.Service.connect(Service.Java:125)
at javax.mail.Transport.send0(Transport.Java:194)
at javax.mail.Transport.send(Transport.Java:124)
at hudson.tasks.Mailer$DescriptorImpl.doSendTestMail(Mailer.Java:581)
at Sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at Sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at Sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at Java.lang.reflect.Method.invoke(Unknown Source)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.Java:335)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.Java:175)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.Java:108)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.Java:124)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.Java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.Java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.Java:876)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.Java:236)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.Java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.Java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.Java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.Java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.Java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.Java:790)
at org.Eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.Java:812)
at org.Eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.Java:1669)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.Java:135)
at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.Java:59)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.Java:132)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.Java:126)
at org.Eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.Java:1652)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.Java:49)
at org.Eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.Java:1652)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.Java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.Java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.Java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.Java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.Java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.Java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.Java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.Java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.Java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.Java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.Java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.Java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.Java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.Java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.Java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.Java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.Java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.Java:171)
at org.Eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.Java:1652)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.Java:49)
at org.Eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.Java:1652)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.Java:82)
at org.Eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.Java:1652)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.Java:30)
at org.Eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.Java:1652)
at org.Eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.Java:585)
at org.Eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.Java:143)
at org.Eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.Java:553)
at org.Eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.Java:223)
at org.Eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.Java:1127)
at org.Eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.Java:515)
at org.Eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.Java:185)
at org.Eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.Java:1061)
at org.Eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.Java:141)
at org.Eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.Java:97)
at org.Eclipse.jetty.server.Server.handle(Server.Java:499)
at org.Eclipse.jetty.server.HttpChannel.handle(HttpChannel.Java:311)
at org.Eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.Java:257)
at org.Eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.Java:544)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.Java:77)
at Java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at Java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at Java.lang.Thread.run(Unknown Source)
Caused by: Java.net.ConnectException: Connection timed out: connect
at Java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at Java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
at Java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
at Java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
at Java.net.AbstractPlainSocketImpl.connect(Unknown Source)
at Java.net.PlainSocketImpl.connect(Unknown Source)
at Java.net.SocksSocketImpl.connect(Unknown Source)
at Java.net.Socket.connect(Unknown Source)
at com.Sun.mail.util.SocketFetcher.createSocket(SocketFetcher.Java:286)
at com.Sun.mail.util.SocketFetcher.getSocket(SocketFetcher.Java:231)
at com.Sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.Java:1900)
... 77 more
実際、当社はSMTPサーバーを変更し、メールの送信を許可していなかったすべての開いているデフォルトポートをブロックしました。
新しい構成を取得し、正常に機能しています。
1) SMTP Server: ourSMTP.smtp.com
2) Port: our_port_no.
3) No Authentication required.
4) SSL Unchecked.
OutlookSMTPにはTLSが必要です... jenkins.xml(インストールディレクトリにあります)に引数を追加します
<service>
...
<arguments>-Dmail.smtp.starttls.enable=true ...
選択する Manage Jenkins > Configure System
および設定:
Jenkins Location:
System Admin e-mail address:
[email protected]
E-Mail Notification:
SMTP server: smtp.office365.com
[Under Advanced...]
Use SMTP Authentication: checked
User Name: [email protected]
Password: [ValidUser's email password]
Use SSL: [UNCHECKED!!]
SMTP Port: 587