java.net.ConnectException: Connection refused

Atlassian JIRA | Bogdan Dziedzic [Atlassian] | 6 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

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

    atlassian.com | 10 months ago
    java.net.ConnectException: Connection refused
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 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 | 4 years ago | TeckEn Yew
    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.send()
    2. com.atlassian.mail
      SMTPMailServerImpl.send
      1. com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:169)
      1 frame
    3. com.atlassian.jira
      SendTestMail.doExecute
      1. com.atlassian.jira.web.action.admin.mail.SendTestMail.doExecute(SendTestMail.java:93)
      1 frame