Forums

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

Unable to log in with recovery_admin

Jonathan Huss January 7, 2019

Hi,

 

I've followed the instructions on https://confluence.atlassian.com/bitbucketserver0410/lockout-recovery-process-858574265.html but when I then try to log in to Bitbucket site with the recovery_admin account and password I set in the setenv.bat file it just says "Invalid username or password."

Am I missing something? I've also tried to restart it a few times and checked the config file for typeos and blanks but all look like it should.

2 answers

1 accepted

0 votes
Answer accepted
Jonathan Huss January 7, 2019

In this case, it looks like you have Bitbucket started as a Windows Service. is that correct? – so the modification made into <Bitbucket Server installation directory>\bin\setenv.bat as suggested on the 'Lockout recovery process' article will not be picked by the instance, meaning that you won't be able to log in as recovery_admin user.

In this case, instead of trying to start up the Bitbucket from the command line, I would suggest trying to modify the Windows Service, and to do so, according to How to update the JVM configuration for a Windows service, we'll have to do as the following:

  1. Open the Windows Services list
  2. Stop the service (usually called "Atlassian Bitbucket")
  3. Open a Command Prompt "with Administrative Rights".
  4. Find the Tomcat executable (i.e. in Bitbucket Server, it is <Bitbucket Server Installation Path>\bin\tomcat8w.exe).
  5. Run the following command on the command prompt:

tomcat8w //ES//AtlassianBitbucket

  1. In the Java Options list, add the parameter suggested by the Lockout recovery process:

7.  -Datlassian.recovery.password=temporarypassword

Remembering to modify the password as you wish.

  1. Click "Apply"
  2. Start the service

Once you recover access to your Bitbucket instance you should be able to fix your administrator account and access to the instance before removing the recovery_admin user (by removing the parameter above from the service)

1 vote
Rambabu Patina _Appfire_
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 Leaders.
January 7, 2019

Hi @Jonathan Huss, Welcome to the community.

Have you started the Bitbucket manually or as a service?

Try starting your Bitbucket manually by running

<Bitbucket Server installation directory>\bin\start-bitbucket.sh (or start-bitbucket.bat on Windows)

And let us know how it goes.

Thanks,
Ram.

Jonathan Huss January 7, 2019

Hi,

 

Yes I've tried that but it only gives me a command prompt and I have no idéa how to navigate in there to change the admin account

Rambabu Patina _Appfire_
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 Leaders.
January 7, 2019

While executing the above command your bitbucket application will start and it can be accessed from the browser. And you can follow the instructions from step 3 from the page referenced by you.

You can run the command "\bin\start-bitbucket.sh -fg" for a detailed log of the application start.

Jonathan Huss January 7, 2019

Got this reply in the forum from Atlassian support which solved it:

 

In this case, it looks like you have Bitbucket started as a Windows Service. is that correct? – so the modification made into <Bitbucket Server installation directory>\bin\setenv.bat as suggested on the 'Lockout recovery process' article will not be picked by the instance, meaning that you won't be able to log in as recovery_admin user.

In this case, instead of trying to start up the Bitbucket from the command line, I would suggest trying to modify the Windows Service, and to do so, according to How to update the JVM configuration for a Windows service, we'll have to do as the following:

  1. Open the Windows Services list
  2. Stop the service (usually called "Atlassian Bitbucket")
  3. Open a Command Prompt "with Administrative Rights".
  4. Find the Tomcat executable (i.e. in Bitbucket Server, it is <Bitbucket Server Installation Path>\bin\tomcat8w.exe).
  5. Run the following command on the command prompt:

tomcat8w //ES//AtlassianBitbucket

  1. In the Java Options list, add the parameter suggested by the Lockout recovery process:

7.  -Datlassian.recovery.password=temporarypassword

Remembering to modify the password as you wish.

  1. Click "Apply"
  2. Start the service

Once you recover access to your Bitbucket instance you should be able to fix your administrator account and access to the instance before removing the recovery_admin user (by removing the parameter above from the service)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events