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: 

SQL server connection issues

gkennedy1
February 26, 2013

Hi all,

I set up a new instance of stash, selected SQL server as the external database and entered all the details correctly.

The setup continued correctly and all was good...

until I shut down TomCat and restarted it. Then I started getting this error message.

A fatal error has occurred

The following problem occurred which prevents Atlassian Stash from starting correctly:

  • The database, as currently configured, is not accessible.

I reinstalled stash from scratch and tried again, just stopping and starting TomCat and got the same error.

Can anyone provide any insight?

Thanks,
Greg

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

2 votes
Answer accepted
gkennedy1
February 26, 2013

Worked it out. The stash-config.properties contained this:

jdbc.url=jdbc:sqlserver://servername\instance:59993;databaseName=Stash;

which has an unescaped \ in it. I put in an extra one to make it:

jdbc.url=jdbc:sqlserver://servername\\instance:59993;databaseName=Stash;

and it worked fine when I restarted TomCat.

Obviously the setup procedure sets up the connection correctly but the restart which reads this file doesn't.

cofarrell
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.
February 26, 2013

Hi gkennedy1,

This is a known issue in Stash 2.1 due to new MSSQL drivers.

https://jira.atlassian.com/browse/STASH-3108

Cheers,

Charles

1 vote
Bryan Turner
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 26, 2013

Greg,

Unfortunately, the reason this happened is that you're using a "feature" Stash actually doesn't have; it just happens to accidentally work correctly on the setup and migration screens. I assume you entered "servername\instance" in the hostname box, since Stash doesn't have a separate text field for instance names. This usage is not actually supported. Stash just doesn't have an explicit check to prevent \ in the hostname. Because it's not supported, when the setup/migration changes are persisted to stash-config.properties, the \ is not escaped because it was not expected to be there.

You may want to vote for/watch https://jira.atlassian.com/browse/STASH-3108, which is the issue that was created to track this.

Apologies for the inconvenience!
Bryan Turner

TAGS
AUG Leaders

Atlassian Community Events