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

Unable to login in recovery mode using recovery_admin user

I have setup Team in space on windows using docker

So to setup Jira in recovery mode i have used the following steps:

 

1. Stop crowd

2. Stop Jira

3. Go to /opt/atlassian/inst/jira/bin and opened the setenv.sh file

make the entry in setenv.sh file like below:

JVM_SUPPORT_RECOMMENDED_ARGS='-Datlassian.recovery.password=Raghav'

 

4.After that i have first restart Crowd and then started the Jira then trying to login to Jira using below credentials:

recovery_admin

Raghav

 

But error is incorrrect username or password.

Please suggest what is missed or what needs to be done

1 answer

0 votes
Andy Heinzer Atlassian Team Jan 23, 2020

Hi Raghav,

I understand that you are running a Jira Server using docker, and are trying to recover the login credentials.  It seems like you are trying to follow the steps in the KB Restore Passwords To Recover Admin User Rights.

Those steps should work, however if you skip step #3 of that guide and started Jira as a service, then this won't work. There are different locations for setting this between Windows and Linux host environments that Jira will run on top of.  For example in Linux/Unix system, you need to edit that $JIRAINSTALL/bin/setenv.sh file.  But for Windows systems that file is actually $JIRAINSTALL/bin/setenv.bat.  More complicating is that if this is a Windows machine, it's possible that this bat file is not used at all.  That can happen if Jira is set to run as a service in Windows.  If that happens there is another separate place to configure this.  More details in Setting properties and options on startup.

Try that first. Please let me know the results.  If that doesn't work, I'd be interested to learn more details about your environment here.

Andy

Dave Chevell Atlassian Team Jan 23, 2020

It's worth noting that if you're using our official Docker image, the "best" way to set `JVM_SUPPORT_RECOMMENDED_ARGS` is by passing it as an environment variable to the image, e.g.:

docker run -d --name jira -e JVM_SUPPORT_RECOMMENDED_ARGS=-Datlassian.recovery.password=Raghav -p 8080:8080 atlassian/jira-software:latest
Like # people like this

Hi @Andy Heinzer  and @Dave Chevell  thanks for your input in this

@Dave Chevell  I am not using official docker image in this i am currently following the documentation for Team in space installation using docker which is mentioned on Atlassian website

 

@Andy Heinzer  i am making the changes in setenv.sh file before i stop Jira using stop-jira in ubuntu linux image used in docker for windows. and after i made the changes i am starting  Jira using start-jira not as service using 

/etc/init.d/jira start

 So i donot we need to make change in setenv.bat as it is not used because windows is used as host os nothing else. Please correct if i am wrong and suggest what should i do thanks in advance.

 

Raghav  

Also @Andy Heinzer  I am trying to do the same i am getting this error for that i have attached the screenshot please check and suggesterror_recovery_login.PNG

Like Andy Heinzer likes this
Andy Heinzer Atlassian Team Jan 24, 2020

Thanks for that additional screenshot @Raghav Gupta, I can see that Jira is seeing at least this startup property, otherwise you would not see that yellow info box on the login page. 

My concern here is that our documentation doesn't explicitly say to use single quotes here, but it seems you are here. Perhaps that is causing an unexpected value for your password here.  If that were true then you could try the password value of:

Raghav'

instead to see if this works. If it does, then my suspicion is confirmed.

Or alternatively, try changing the argument in setenv.sh to:

JVM_SUPPORT_RECOMMENDED_ARGS=-Datlassian.recovery.password=Raghav

Save that file, and restart Jira once more to see if it then accepts the expected password.

Let us know the results.

Andy

Hi @Andy Heinzer ,

 i have tried whole process by parameters using single quotes,double quotes and without any quote as you suggested to use but still i am facing this issue. So please let me know the root cause here.

 

Thanks in advance,

Raghav

Andy Heinzer Atlassian Team Jan 27, 2020

Hi @Raghav Gupta 

I have tried to reproduce the problem you have described here.  But so far, I have not been able to.  Each time I set the startup option of

-Datlassian.recovery.password=Raghav

In my $JIRAINSTALL/bin/setenv.sh file inside the JVM_SUPPORT_RECOMMENDED_ARGS= parameter, with single quotes or double quotes, then restart Jira, I'm always able to login with the username of:

recovery_admin

and the password of:

Raghav

I am curious if perhaps because your setup is integrated with Crowd that this might be altering the results from the way I'm testing this out.  Perhaps if the Crowd user directory also has a user account with the name 'recovery_admin' this feature might not be working as intended, but my understanding of this feature was this when this startup option was set in Jira it allows the password set there to work with that username regardless of other user directories setup within Jira right now.

Alternative to this approach, I'm curious if there is another means by which we could recover or reset the Jira admin password here.  We have an older guide over in https://confluence.atlassian.com/jira/retrieving-the-jira-administrator-192836.html

If you have access to the SQL database that Jira is running in, then it would be possible to walk throw the Scenario A in that document to query the database to find a user that has the global Jira system administrator permission.  That guide that has additional steps you can take to either reset the admin's password via SQL, or potentially add a new admin account via SQL.   Either way could potentially grant you admin access to this Jira site even if the startup options above are not working as expected here.

I am having exactly the same problem.  The recovery_admin user/password is not working.  I am trying move a crowd/jira/confluence server from an existing server to a new server, and in the process convert them to using Docker.

I was able to get Crowd and Confluence working and integrated, but Jira doesn't want to accept the recovery_admin password (set up identically as I did for Confluence).  I get the same yellow box telling me jira is running in recovery mode, but user/pwd for recovery_admin isn't working (and they are properly set in the docker-compose file)

Suggest an answer

Log in or Sign up to answer
TAGS

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