Connection Jira / BitBucket To MS SQL Server 2016 (Dev Edition)

OminousOlive August 2, 2016

So I have a single test server (Windows 10) running SQL Server 2016 Developer Edition 

I have also installed JIRA and Bitbucket onto this server

I am trying to setup these two applications to use a locally installed SQL 2016 developer edition DB.

  • Remote Connection is enabled

  • Default port 1433 is selected

  • AV is turned off 

  • I can access the db via ssms
  • Firewall is turned off
  • SQL instance is the default name

Just to test I created a data link file and tested a remote connection to the DB via that as well (which connects fine)

Not sure why the 2 applications cannot see the database server though

 

When I enter the details into the JIRA DB setup section I get

Error connecting to database

Network error IOException: Connection refused: connect

Connection refused: connect

 

When I enter the same credentials into BitBucket I get

The configuration entered is not valid. A database connection could not be established. Please check your configuration and try again.

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:230)
	com.atlassian.stash.internal.migration.DefaultMigrationService.validateConfiguration(DefaultMigrationService.java:85)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	...
Could not get JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host Kraken, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
	org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:80)
	com.atlassian.stash.internal.db.DefaultDatabaseValidator.validate(DefaultDatabaseValidator.java:44)
	com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:227)
	...
The TCP/IP connection to the host Kraken, port 1433 has failed. Error: "connect timed out. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".
	com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:191)
	com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:242)
	com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2280)
	...

Does anyone have any ideas about what might be the issue?

2 answers

1 vote
inlabLIMS September 30, 2016

My problem is the same.

The answer for MY problem is: Open SQL Server Configuration Manager -> Protocols for SQL SQLEXPRESS, select Properties of TCP/IP. In the tab IP Addresses, set the TCPPort in section IPAll to 1433.

https://coderanch.com/t/306316/JDBC/databases/SQLServerException-TCP-IP-connection-host

0 votes
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 8, 2016

It's pretty much what the error says - the applications are being refused access to the database, it's not responding to the applications.

Check the database logs to see if there's anything appearing to connect to it first, but I also notice

  • you're using a host name (Kraken) - is that resolving to the right machine?
  • You're using the native Microsoft jdbc drivers, which are known to be pretty much useless (caveat - I only know this about using them with JIRA, I can't speak for Bitbucket), and you should be using the jtds driver
  • From memory 2016 is not yet supported by either application

Suggest an answer

Log in or Sign up to answer