Mail Handler java.net.SocketException: socks Error

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

A mail handler fails to send notifications. Testing connection to the mail server is successful, but connection errors still exist in the logs.

The following appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 2013-01-10 10:48:15,606 ERROR [Servicedesk Mail] QuartzWorker-0 ServiceRunner Test Support [10002]: Error connecting to host 'mail.example.net.au' as user 'servicedesk@example.net.au' via protocol 'pop3': javax.mail.MessagingException: Connect failed; nested exception is: java.net.SocketException: socks javax.mail.MessagingException: Connect failed; nested exception is: java.net.SocketException: socks at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:210) at javax.mail.Service.connect(Service.java:295) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:201) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:356) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:252) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:61) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:47) at org.quartz.core.JobRunShell.run(JobRunShell.java:195) at com.atlassian.multitenant.quartz.MultiTenantThreadPool$MultiTenantRunnable.run(MultiTenantThreadPool.java:72) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:520) Caused by: java.net.SocketException: socks

Cause

The cause of this error is still being investigated. The only known cause has been upgrading to a newer JIRA release. In JIRA 5.x, socks_port, socks_host columns were added to the mailserver table in the database. It's suspected that there may be a problem with the records in the table due to that upgrade task. However, this has not been verified as the cause.

Resolution

  1. Take note of the current incoming IMAP mail server settings

  2. Recreate a new mail server identical to the current existing one as per Configuring JIRA to Receive Email from a POP or IMAP Mail Server

  3. Delete the old mail server

  4. Verify if the mail handler is now corrected and sending notifications

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.