The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

stash cannot connect to database server with multiple databases

Andrew Swanson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 23, 2014

I downloaded the trial version of Stash for 64-bit windows and ran the setup choosing the internal database for initial evaluation of the product. My next step was to try migrating to a Microsoft SQL server we already have available that is hosting multiple different databases. When I attempt the migration I get a generic connectivity error. I'm also not super confident in the data I'm inputting in to the migration wizard fields. The server is on the same machine as the Stash installation so I've tried a variety of variations of the computer hostname with and without leading '\\', 127.0.0.1, localhost, and all of those combinations with and without the SQL server name added afterwards (localhost\infinityqs) In the database name field I've tried the database name by itself (stash_db) along with the server name appended to the front. I get the same error every time.

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:210)
	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 127.0.0.1, 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:35)
	com.atlassian.stash.internal.db.DefaultDatabaseManager.validateConfiguration(DefaultDatabaseManager.java:207)
	...
The TCP/IP connection to the host 127.0.0.1, 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:190)
	com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:241)
	com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2243)
	...

 

I have a stash user created and added to the db_owner role for the stash_db database. What am I missing? The server is configured correctly since we are currently using it for other production activities.

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Richard Bywater
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 Champions.
October 23, 2014

Are you sure that SQL Server is listening on localhost port 1433? It might be that its only listening on the external network address on port 1433 or perhaps not listening on port 1433 at all and is using a different port.

Andrew Swanson
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
October 23, 2014

Looks like I overlooked that. The server had been set to use dynamic ports. It looks like Stash can see it now but I'm on to another issue hah. Thank you for the assistance though.

TAGS
AUG Leaders

Atlassian Community Events