UnknownHostException: smtp.gmail.com JIRA Software (v7.12.)

Litus Maldives Pvt Ltd January 2, 2019

1). first i enabled Less Secure Apps 

2). i tested SECURE_SMTP protocol with port 465 and TLS unchecked and SMTP protocol with port 587 and TLS checked those follow as;

465.PNGport 587.PNG

this is my log file

 

An error has occurred with sending the test email:
com.atlassian.mail.MailException: com.sun.mail.util.MailConnectException: Couldn't connect to host, port: smtp.gmail.com, 465; timeout 100000;
nested exception is:
java.net.UnknownHostException: smtp.gmail.com
at com.atlassian.mail.server.impl.SMTPMailServerImpl.sendWithMessageId(SMTPMailServerImpl.java:225)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:162)
at com.atlassian.jira.plugins.mail.webwork.SendTestMail.doExecute(SendTestMail.java:107)

 

 

 

 

 

1 answer

0 votes
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 2, 2019

Hi! 

 

Your problem related to the DNS resolving on the installed server. 

Could you login into server through ssh, and check dns resolving by command

nslookup smtp.gmail.com

 

After fixing this one problem,  you can check on Jira configuration side.

 

 

Cheers,

Gonchik Tsymzhitov

Litus Maldives Pvt Ltd January 4, 2019

Capture.PNG

i tried, it's said above error

Litus Maldives Pvt Ltd January 4, 2019

i hosted in digitalocean 

Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 5, 2019

Well, that's pretty clear - the server does not have a working DNS, so it can't look up any other systems.

You could put an ip address in for gmail, but that should be regarded as a temporary kludge to get it working for now. 

What you need to do is fix the broken DNS on the server.  That's not really an Atlassian related problem, and depends on the operating system on your server.  You might need to talk to digital ocean to get it fixed, but as you've got root on the server you could probably fix it yourself.  Look at the network settings for it and add at least one DNS server for it.

Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 5, 2019

Hi! 

Let's add this one 

sudo sh -c "echo nameserver 8.8.8.8 >> /etc/resolv.conf"

 

And after your DNS will work if 53 port enabled :) 

 

Cheers,

Gonchik

Suggest an answer

Log in or Sign up to answer