Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Problem connecting to the database on jira 6.2.7

Valentin Plisson October 16, 2020

Hello atlassian community,

For a customer and as part of a release upgrade we installed several jira, one jira 6.2.7 and one jira 8.5.5. For the Jira 8 the configuration went well, unlike the Jira 6, because we have a connection error to the database, probably due to an SSL certificate.

server.xml

<Connector port="8443" protocol="org.apache.coyote.http11.Http11Protocol"
              maxHttpHeaderSize="8192" SSLEnabled="true"
              maxThreads="150" minSpareThreads="25"
              enableLookups="false" disableUploadTimeout="true"
              acceptCount="100" scheme="https" secure="true"
              clientAuth="false" sslProtocol="TLS" useBodyEncodingForURI="true"
              sslEnabledProtocols="TLSv1,TLSv1.1,TLSv1.2,TLSv1.3"
              keyAlias="sgcacert" keystorePass="changeit"
              keystoreFile="/opt/atlassian/jira/jre/lib/security/cacert"/>

 

My file dbconfig.xml (I hide the ip for the client's confidentiality)

<url>jdbc:postgresql://192.XXX.XX.XXX:12400/jiraassuhml?ssl=true</url>

We have 2 errors, one on the Atlassian-jira.log which says : 

2020-10-16 12:16:36,831 localhost-startStop-1 ERROR [NoModule] Error getting datasource via DBCP: JdbcDatasourceInfo{uri='jdbc:postgresql://192.XXX.XX.XXX:12400/jiraassuhml?ssl=true', driverClassName='org.postgresql.Driver', username='uassuhml', password='********', isolationLevel='null', connectionProperties=null, connectionPoolInfo=ConnectionPoolInfo{maxSize=20, minSize=20, initialSize=null, maxIdle=20, maxWait=30000, sleepTime=300000, lifeTime=600000, deadLockMaxWait=600000, deadLockRetryWait=10000, validationQuery=null, minEvictableTimeMillis=null, timeBetweenEvictionRunsMillis=null, poolPreparedStatements=null, testOnBorrow=null, testOnReturn=null, testWhileIdle=null, maxOpenPreparedStatements=null, numTestsPerEvictionRun=null, removeAbandonedTimeout=300, validationQueryTimeout=null, defaultCatalog=null}}

java.lang.RuntimeException: javax.management.InstanceAlreadyExistsException: com.atlassian.jira:name=BasicDataSource


Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target


Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

 

And another one on our browser when we go to the machine's ip "Could not determine database type".

To solve these problems we have followed these 2 documentations :

  • Link 1 : 

https://confluence.atlassian.com/adminjiraserver/running-jira-applications-over-ssl-or-https-938847764.html

  • Link 2 : 

https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-error-779355358.html

  • Link 3 : 

https://confluence.atlassian.com/jirakb/jira-server-functionality-fails-due-to-instancealreadyexistsexception-320110851.html

but we still can't get our jira 6 instance working.

Is there a difference in configuration for database connections between jira 6 and 8? We would like to have a HTTP and HTTPS connection with the Fabio reverse proxy.

I stay at your disposal if needed,
Regards,

2 answers

0 votes
Daniel Ebers
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.
October 25, 2020

The source of the problem could be surely on both ends, on the host which is Jira 6 on - but also the database host which is intended to serve the database.

Although it is not possible to give a 100% matching advise (due to lacking possibilities to debug this "live" on your end) the symptoms you documented suggest Jira (the v6 host) cannot contact the database - due to SSL problems. Are you using a self-signed certificate? Is the certificate still valid?
In the first step I'd recommend to compare certificates or the database servers - something must be still missing.

0 votes
Charlie Misonne
Community Champion
October 20, 2020

I don't think keystoreFile="/opt/atlassian/jira/jre/lib/security/cacert" is right. cacerts is the truststore of the JRE. It can not be your actual certificate.
Any chance you mixed that up? The steps are described in your "Link 1"

You should aslo check whether the database version you are using is compatible with Jira 6.2. If your database is newer than the supported versions on this page that could be an issue. https://confluence.atlassian.com/jira062/supported-platforms-588581513.html

Suggest an answer

Log in or Sign up to answer