On Stash startup: A fatal error has occurred

I have this exact issue: https://confluence.atlassian.com/display/STASHKB/The+database,+as+currently+configured,+is+not+accessible

The difference is that I'm running on Linux, connecting to SQL Server (not the internal DB) and the service is running as the root user. The root user owns and has proper permissions to STASH_HOME.

This error showed up right after I switched the link /opt/atlassian-stash-latest from /opt/atlassian-stash-2.1.0 to /opt/atlassian-stash-2.1.1.

My question: What changed in the point release that might cause this on Linux and how do I fix it?

Everything worked fine under 2.1.0. I'm hoping I don't have to reinitilize STASH_HOME from scratch.


4 answers

1 accepted

0 votes
Accepted answer

My problem was found in the <STASH_HOME>/stash-config.properties file. The SQL Server jdbc connection string that worked under 2.1.0 did not work under 2.1.1. The key difference is that I use a named instance on my SQL Server.

Below I have the two jdbc connection strings:

Broken (worked under 2.1.0 not 2.1.1)




This solution may be specific to my environment but if you run into this issue on Linux, you might want to check the jdbc connection string in your <STASH_HOME>/stash-config.properties file.

Seb Ruiz Atlassian Team Feb 11, 2013

Thanks Matt,

We've raised an issue for this to ensure that other SQLServer users don't run into this as well. Most appreciate the diagnosis!



Hi Matt,

This is most surprising given that the major fix for 2.1.1 was a Javascript change only. This obviously shouldn't be causing the error you're seeing. It's more likely that there is a connection problem to the database (or something like that). Your STASH_HOME directory will be fine and won't require any reinitialization.

At this point it would be handy to see the full exception which tell us more. If you wouldn't mind creating a support ticket with your full logs attached that will help us dialog the problem further.




0 votes
Seb Ruiz Atlassian Team Feb 08, 2013

Hi Matt,

The best thing to do here would be to raise a support ticket at http://support.atlassian.com - there we can identify the root cause of the issue and hopefully it's not a bug in Stash.

Out of interest, which database server are you using?


0 votes
Bryan Turner Atlassian Team Feb 11, 2013


First off, thanks for taking the time both to raise the question and to post your answer with your solution. As one of the Stash developers, I'm sorry for the inconvenience.

Correct me if I'm wrong, but did you install Stash 2.1.0 and set it up (or migrate it) to SQL Server, and then restart to upgrade to 2.1.1? I'm guessing when you configured it you entered "myServer\namedInstance" in the hostname box, and migration or setup completed normally. The upgrade to 2.1.1 was probably the first time you had restarted the server after that.

As Charles has correctly pointed out, there are no changes to how the database is accessed between 2.1.0 and 2.1.1 (though 2.1.2 does include fixes for SQL Server 2005 users). However, I believe that you have uncovered a bug in how our database configuration screens work. I've raised https://jira.atlassian.com/browse/STASH-3108 to fix that issue.

To sum up, "myServer\namedInstance" in the hostname box will correctly connect to SQL Server during migration or setup, but the first time the system is restarted, because saving the configuration did not escape the \ (because that usage not actually supported by Stash), the \ is lost and the value becomes "myServernamedInstance", which causes the connection to fail.

Your solution is fine, or you could modify the configuration manually and change it to this:


That should also connect correctly. This has the additional advantage that your details will appear correctly (with only a single \) on the database configuration screens in Stash.

Please watch the linked issue to be updated on when a fix for this bug will be shipped.

Best regards
Bryan Turner

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Canada

Happy New Year - First AUG of the year - great success

Hi Everyone, Hope everyone had a great holiday season and is ready for an exciting 2019.  We had our first AUG last night featuring Tempo Timesheets.  A great presentation and lots of int...

17 views 0 1
View post

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