Error setting up gmail in Jira 6.3.3 (SunCertPathBuilderException)

I'm trying to setup a SMTP server in JIRA to let it email notifications and what not.

If I select Gmail / Google Apps host in the dropdown, and then fill in my details, I get a red error box after trying to test the connection:

Unfortunately no connection was possible. Review the errors below and rectify:
SunCertPathBuilderException: unable to find valid certification path to requested target

I figured this has something to do with missing SSL certificates (which seems odd. You'd figure these would be included in the package). I followed the steps in then the commandline installation.

One weird thing: JAVA_HOME is set to a path that doesn't exist. So I used full paths to install the key:

sudo /opt/atlassian/jira/jre/bin/keytool -import -alias -keystore /opt/atlassian/jira/jre/lib/security/cacerts -file public.crt

However, this doesn't help either, the error persists.

I tried using the SSL-plugin, but that also fails. (class during connection to
Strange: on the secure/admin/ConfigureSsl1.jspa page it does show the Google CN: CN=*, O=Google Inc, L=Mountain View, ST=California, C=US

I'm out of options. I can't find a solution online either, but maybe I used the wrong keywords :(

Can someone point me towards the correct direction?

---------------- EDIT --------------------

I replaced all cacerts files on the system (openJDK 1.6/1.7 dirs and the JIRA dir), but that didnt help :(

Even if I use a normal SMTP server (non-SSL/port 25) on I get the error :(

Using a secondary Google Apps acount, of which I am administrator, same results :(

------------------ EDIT ---------------------------

3 answers

1 accepted

0 votes
Accepted answer

After seeing the above error that persisted even if no SSL was required, I went on searching for other errors in the logs, which lead me to

This fixed the missing Cacert/SSL stuff. I know have an error with authentication, but that seems related to using an external JRE.

I'm opening a seperate issue for that...

Hi Thijs, the JVM shipped with JIRA should have google certificate in it already, but I've seen this error in the past and in my case the problem was that the cacerts file got corrupted somehow.

One thing you can do is download a new JAVA installation packet from Oracle site, decompress it and just replace your current cacerts file by the one from this new installation packet. (this will require JIRA restart)

I hope it helps.


see edit, unfortunately that didn't work either :(
I deletred the ._cacerts file, which seems to be used for caching, but no sigar


Some ideas,

1. check server date.

2. you may be using java from different JAVA_HOME

3. Check if you don't have "smart" gateway/proxy which captures all HTTPS traffic and replaces SSL certificate with company/gateway generated.

4. You need to restart Jira after you modify cacerts.


The server date (bash date) states local time, I expect this is correct.

I reset my JAVA_HOME vars to the jre directory in the /opt/atalssian/jira/ folder.

The VPS is hosted at the ISP in a datacentre in Amsterdam. No proxies or whatever in between.

I restarted Jira, but nothing changed. Perhaps I need to flush a cache?

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Jan 08, 2019 in Jira

How to Jira for designers

I’m a designer on the Jira team. For a long time, I’ve fielded questions from other designers about how they should be using Jira Software with their design team. I’ve also heard feedback from other ...

1,095 views 4 9
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you