SQL server connection issues

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?


2 answers

1 accepted

This widget could not be displayed.

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


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


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.

Hi gkennedy1,

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




This widget could not be displayed.
Bryan Turner Atlassian Team Feb 26, 2013


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

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

125 views 5 2
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