Unable to connect to the mail server due to Google 2-Step Verification
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
When trying to setup Jira Service Management mail handler, the following appears in the atlassian-jira.log
:
1
2
3
4
2014-10-08 12:35:57,763 http-bio-8080-exec-22 ERROR user 755x8272x1 1mpdtre xxx.xxx.xxx.xxx /rest/servicedesk/1/servicedesk/TASK/incomingemail/validateemailforcreation [servicedesk.squalor.email.MailServerVerifier] Unable to connect to the server at imap.gmail.com due to the following exception: Unfortunately Jira Service Management couldn't connect to the mail server. Here is what the mail server said: "Invalid credentials xxxxxxxx"
2014-10-08 21:48:02,953 http-bio-8080-exec-10 ERROR user 1308x9993x1 cza7uz xxx.xxx.xxx.xxx /rest/servicedesk/1/servicedesk/TASK/incomingemail/validateemailforcreation [servicedesk.squalor.email.MailServerVerifier] Unable to connect to the server at imap.gmail.com due to the following exception: Unfortunately Jira Service Management couldn't connect to the mail server. Here is what the mail server said: "[ALERT] Please log in via your web browser: http://support.google.com/mail/accounts/bin/answer.py?answer=78754 (Failure)"
2014-10-09 08:50:05,495 http-bio-8080-exec-19 ERROR user 530x10417x1 1lqv8al xxx.xxx.xxx.xxx /rest/servicedesk/1/servicedesk/TASK/incomingemail/validateemailforcreation [servicedesk.squalor.email.MailServerVerifier] Unable to connect to the server at imap.gmail.com due to the following exception: Unfortunately Jira Service Management couldn't connect to the mail server. Here is what the mail server said: "[AUTHENTICATIONFAILED] Invalid credentials (Failure)"
2014-10-09 08:50:21,197 http-bio-8080-exec-7 ERROR user 530x10420x1 1lqv8al xxx.xxx.xxx.xxx /rest/servicedesk/1/servicedesk/TASK/incomingemail/validateemailforcreation [servicedesk.squalor.email.MailServerVerifier] Unable to connect to the server at imap.gmail.com due to the following exception: Unfortunately Jira Service Management couldn't connect to the mail server. Here is what the mail server said: "Connection dropped by server?"
Cause
Google 2-Step Verification has been setup into the mail
Workaround
Disable the 2FA verification, OR
Generate an app password for Jira, so that Jira could pass the 2FA verification. Sign in using App Password
Was this helpful?