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

How to connect to external SQL Server 2017 database with TLS 1.2

Gabriel October 21, 2019

We upgraded our database server to Windows Server 2019 running SQL Server 2017 and hardened everything following PCI standards, limiting connections to TLS 1.2. This has meant tweaking connection strings to use newer drivers for everything connecting to it, but I can't get our local Bamboo server to connect. I get error:

"bamboo java.sql.SQLexception I/O Error: db server closed connection"

I assume I need to update our dated Bamboo version or use a different driver, but I'm flailing a bit and any help would be much appreciated. Here's my current bamboo configuration (without db server/name):

  • Driver name: jTDS Type 4 JDBC Driver for MS SQL Server and Sybase
  • Driver class name: net.sourceforge.jtds.jdbc.Driver
  • Driver version: 1.2.2
  • Database URL: jdbc:jtds:sqlserver://<database_server>:1433/<database_name>
  • Hibernate dialect: net.sf.hibernate.dialect.SQLServerIntlDialect

Probably relevant:

  • Java version: 1.7.0_25
  • Bamboo version: 5.5.1

Is this as simple as updating my Bamboo version? Thanks for any help!

1 answer

0 votes
Shankar Asam {Appfire}
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 22, 2019

Hi,

Could you try the recommendations from links given below and check it (although they are not for Bamboo - but should work),

Buggy driver and proper connection strings,

https://confluence.atlassian.com/confkb/cannot-connect-confluence-to-ms-sql-server-using-force-encryption-591594220.html

Load SQL certs into JAVA keystore,

https://confluence.atlassian.com/jirakb/unable-to-connect-to-ms-sql-server-due-to-db-server-closed-connection-296911255.html

 

-Shankar

Gabriel October 24, 2019

I tried both suggestions, but am still getting the same error. 

The database server does indeed enforce SSL (required for PCI compliance) so your second link seemed to be on the right track. I followed the instructions at https://confluence.atlassian.com/adminjiraserver070/connecting-to-ssl-services-779356667.html and imported the certificate into the trust store at $JAVA_HOME/jre/lib/security/cacerts ($JAVA_HOME/lib/security/cacerts does not exist). However, this didn't change the error.

I tried various combinations of enabling SSL in the connection string and changing the JAVA_OPTS environment variable as described in your first link as well.

I read that SQL Server 2017 wasn't supported on earlier versions of Bamboo. Is this true regardless of configuration changes?

Thanks!

Shankar Asam {Appfire}
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 24, 2019

I didn't find the supported platform for Bamboo 5.5.1 but I did it for 5.13.x

https://confluence.atlassian.com/bamboo0513/supported-platforms-857079483.html

As per the above, it seems SQL server 2017 was not supported for 5.13 and I assume it's same case for 5.5.1 as well

 

-Shankar

Gabriel October 25, 2019

It seems I should just go ahead and update our Bamboo server to the newer version and hopefully it will resolve the connection problems. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events