It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Bitbucket Server upgrade from 4.0.1 to 4.1 loses connection to database (launches to setup page)

Deleted user Nov 16, 2015

I just upgraded Bitbucket Server from 4.0.1 to 4.1 and it lost its connection to the database (it comes up on the setup screen). The database is intact, so how do I tell Bitbucket where it is?

2 answers

0 votes
ThiagoBomfim Atlassian Team Nov 16, 2015

Hi Craig,

If that happens, it means you didn't point the installer (using the upgrade workflow) to your old BITBUCKET_HOME. Have you tried running the upgrade again pointing at the right home directory?


Deleted user Nov 16, 2015

Hi Thiago. I did point the installer at the old BITBUCKET_HOME, I did use the upgrade workflow, and I did try running it again. I've discovered since I originally posted that everything works perfectly if I launch Bitbucket Server using the Windows bat file. I'm only experiencing a problem if I run it as a Windows service.

Have you managed to find a pernament solution here? I have the same issue - well maybe similar. I have installed Bitbucket 4.8.5 and recently, after a server restart Bitbucket service woke up but was not able to restore database connection. It works fine when I start Bitbucket from .bat but not as Windows Service. I tried to reinstall service - did not help either...

Deleted user Oct 10, 2016

I have not, unfortunately, and I've performed several upgrades since my initial post. I'm still launching from the BAT file, which works perfectly. It's extremely annoying but at least I have a workaround, especially since Atlassian has made no effort to follow up to my last post almost a year ago.

ThiagoBomfim Atlassian Team Oct 10, 2016

Hi Michal,

What exactly failed in the solution you linked?

It looks like Bitbucket installed as a Windows service is not reading BITBUCKET_HOME even passed as a service startup option. Whenever I start Bitbucket as Windows service I got redirected to the setup site, while starting it from .bat runs my instance without any problems. Ecactly what Craig described earlier. bitbucket.png

ThiagoBomfim Atlassian Team Oct 11, 2016

Hi MIchal,

There is a double quote ( " ) before the path on disk.

Could you remove that from there and try to restart the service?

Let us know how you go, please.

Hi, the double quote is jus a leftover after I was playing with different approach of defining the parameter. Anyway, without it it also does not work sad. I have also tried reinstalling the service - without success.

Looks like Atlassian has given up on this once again. Tune in a year from now when the next user experiences this problem and the same support advice is given again.

In the meantime, this is such a significant problem that I've been referring people to GItLab when they ask for advice on a Git solution. (Unfortunately we're integrated with Jira, so we have to deal with the issue as best we can.)

I wonder if we could check it somehow in the log files from service startup what is BITBUCKET_HOME's variable value...

0 votes
ThiagoBomfim Atlassian Team Nov 16, 2015

Hi Craig,

In that case, have a look at the article below:

How did you install the service? Did you choose to have the service installed as part of the installation process of 4.0.1?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Bitbucket

Contest: Share your custom Bitbucket Pipe and win

Announced in this blog, this holiday season we’re celebrating all things CI/CD and between now and the end of 2019 we’ll be showcasing content, use cases, feature announcements and more. One featur...

755 views 2 4
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you