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 https://confluence.atlassian.com/display/JIRA/Connecting+to+SSL+servicesand 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 google.com -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 javax.net.ssl.SSLException during connection to google.com:443...)
Strange: on the secure/admin/ConfigureSsl1.jspa page it does show the Google CN: CN=*.google.com, 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 smtp.ziggo.nl I get the error :(

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

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

3 answers

1 accepted

This widget could not be displayed.

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 https://jira.atlassian.com/browse/JRA-39526

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...

This widget could not be displayed.

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.

Cheers

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

This widget could not be displayed.

Hi,

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.

Andris.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

137 views 2 0
Join discussion

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