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

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

0 vote

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

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

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Wednesday in Jira

Join our webinar: How 1B+ feature flag events helped us build the new Jira

Every time you release software, there's a bit of risk – that there's a bug, that something breaks, or that the feature doesn't resonate with customers. Feature flagging helps make high stakes s...

133 views 0 3
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