java.net.ConnectException: Connection refused

Atlassian JIRA | TeckEn Yew | 3 years ago
  1. 0

    h3. Steps to Reproduce: # Setup a JNDI mail server according to [this documentation|https://confluence.atlassian.com/pages/viewpage.action?pageId=42795030] # Under SMTP Host section in the JIRA Outgoing Mail Server configuration, set the *Protocol* to *SECURE_SMTP* and save the configuration # Send a test mail and the following message will thrown as JIRA can't connect to localhost: {code} An error has occurred with sending the test email: com.atlassian.mail.MailException: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 465; nested exception is: java.net.ConnectException: Connection refused at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:201) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:149) at com.atlassian.jira.plugins.mail.webwork.SendTestMail.doExecute(SendTestMail.java:107) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) {code} h3. Expected Results: Send test mail successful. Actual Results: The test mail can't send successfully, even though normal mail notifications work fine h3. Workaround: Set the Protocol to SMTP and send test mail will be succesful. h3. Note: The Protocol configuration has no impact on the mail functionality as notification still able to send out of JIRA as long as the JNDI configuration is correct.

    Atlassian JIRA | 3 years ago | TeckEn Yew
    java.net.ConnectException: Connection refused
  2. 0

    h3. Steps to Reproduce: # Setup a JNDI mail server according to [this documentation|https://confluence.atlassian.com/pages/viewpage.action?pageId=42795030] # Under SMTP Host section in the JIRA Outgoing Mail Server configuration, set the *Protocol* to *SECURE_SMTP* and save the configuration # Send a test mail and the following message will thrown as JIRA can't connect to localhost: {code} An error has occurred with sending the test email: com.atlassian.mail.MailException: javax.mail.MessagingException: Could not connect to SMTP host: localhost, port: 465; nested exception is: java.net.ConnectException: Connection refused at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:201) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:149) at com.atlassian.jira.plugins.mail.webwork.SendTestMail.doExecute(SendTestMail.java:107) at webwork.action.ActionSupport.execute(ActionSupport.java:165) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83) at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39) at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31) at webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16) {code} h3. Expected Results: Send test mail successful. Actual Results: The test mail can't send successfully, even though normal mail notifications work fine h3. Workaround: Set the Protocol to SMTP and send test mail will be succesful. h3. Note: The Protocol configuration has no impact on the mail functionality as notification still able to send out of JIRA as long as the JNDI configuration is correct.

    Atlassian JIRA | 3 years ago | TeckEn Yew
    java.net.ConnectException: Connection refused
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Unable to Send Mail due to Could not connect to SMTP Host - Atlassian Documentation

    atlassian.com | 6 months ago
    java.net.ConnectException: Connection refused

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.net.ConnectException

      Connection refused

      at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId()
    2. com.atlassian.mail
      SMTPMailServerImpl.send
      1. com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:201)
      2. com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:149)
      2 frames
    3. com.atlassian.jira
      SendTestMail.doExecute
      1. com.atlassian.jira.plugins.mail.webwork.SendTestMail.doExecute(SendTestMail.java:107)
      1 frame
    4. webwork.action
      ActionSupport.execute
      1. webwork.action.ActionSupport.execute(ActionSupport.java:165)
      1 frame
    5. com.atlassian.jira
      JiraActionSupport.execute
      1. com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:83)
      1 frame
    6. webwork.interceptor
      ChainedInterceptor.intercept
      1. webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39)
      2. webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31)
      3. webwork.interceptor.ChainedInterceptor.intercept(ChainedInterceptor.java:16)
      3 frames