Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Bitbucket SQL server Failure

Thomas Marien October 20, 2024

Hi I'm trying a trail of bitbucket for my organisation.
However I get stuck with the DB configuration and get the following message ( see image)

The credentials, db and IP are correct. The database is setup on SQL server 2022 and is part of a HA availabilitygroup.

Any advice on this? Would apreciate your help.

Thanks!
Schermafbeelding 2024-10-21 070747.png

1 answer

0 votes
Aron Gombas _Midori_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 21, 2024

What do you see in the Bitbucket log?

Chances are, that are more details there about the root cause of the problem, even a full stack trace.

Thomas Marien October 22, 2024
The configuration entered is not valid. A database connection could not be established. Please check your configuration and try again.
 com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:218)
 com.atlassian.stash.internal.migration.DefaultDatabaseMigrationService.validateConfiguration(DefaultDatabaseMigrationService.java:85)
 java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 ...
Failed to obtain JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: "encrypt" property is set to "true" and "trustServerCertificate" property is set to "false" but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. ClientConnectionId:4cedefc2-86a9-4973-99b9-ce3b7dcc5bfa
 org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:84)
 com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:35)
 com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:215)
 ...
"encrypt" property is set to "true" and "trustServerCertificate" property is set to "false" but the driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption: Error: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target. ClientConnectionId:4cedefc2-86a9-4973-99b9-ce3b7dcc5bfa
 com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:4290)
 com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1965)
 com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:3816)
 ...
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
 java.base/sun.security.ssl.Alert.createSSLException(Unknown Source)
 java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
 java.base/sun.security.ssl.TransportContext.fatal(Unknown Source)
 ...
PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
 java.base/sun.security.validator.PKIXValidator.doBuild(Unknown Source)
 java.base/sun.security.validator.PKIXValidator.engineValidate(Unknown Source)
 java.base/sun.security.validator.Validator.validate(Unknown Source)
 ...
unable to find valid certification path to requested target
 java.base/sun.security.provider.certpath.SunCertPathBuilder.build(Unknown Source)
 java.base/sun.security.provider.certpath.SunCertPathBuilder.engineBuild(Unknown Source)
 java.base/java.security.cert.CertPathBuilder.build(Unknown Source)
 ...
Thomas Marien October 22, 2024

The problem is caused by the cervercertificate. I would prefer to set trust certificate to true? Can this be done before the connectionstring is made?

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events