Can't login after restoring backup
Asked by Wubbe:

We have JIRA (version 7.11.1) running on one server and Confluence (version 6.12.1) running on another server. We want both JIRA and Confluence on the same (1st) server. We installed a Confluence from scratch on the JIRA server and during installation created an admin account. Next we created a full backup on the existing Confluence (xml + attachments) and restored this in the new Confluence installation. Now we are unable to use the newly installed Confluence, the (installation created) admin account, any (on the other server working) confluence accounts and any non existing (just trying) account results in an Network error message at login in Confluence.

We are suspecting this is related due to missing configuration in either JIRA or Confluence for using authentication, several knowledge articles found but none seem to help us further; anyone have any ideas?


Answers:
author: Wubbe
body: Issue solved. Restoring Confluence data on a new server overwrites also the remote Jira directory details. With creating a local Admin account on Confluence, before backup and restore we could logon after restore on the new server. Next we could remove the old (incorrect) remote Jira directory and create an connection to the correct Jira

comments: author: Alok Nigam
body: in which file to remove jira connection


author: 0xF0F
body: You have to take care your CATALINA_OPTS var is preserved, when setting this, so on linux the line should look like:

    -Datlassian.recovery.password="new password" ${CATALINA_OPTS}

and on windows:

    -Datlassian.recovery.password="new password" %CATALINA_OPTS%


author: josh
body: Did you have a local admin account on the original server that you restored from?

The account you created when you set up the new server was erased when you performed the restore procedure.

If you can't get into this account, you may need to look into this procedure [https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html](https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html?)

You weren't using Jira as the directory for Confluence, were you?

comments: author: Wubbe
body: Hi, JIRA and Confluence currently have there own user administration. Both the original JIRA and Confluence have no local admin, properly a named user (with admin rights) was used for the setup.

We'll try the recovery, how do we start Confluence manually, not as a service (how its setup now)?


author: josh
body: This page should help with manual start/stop: <https://confluence.atlassian.com/doc/start-and-stop-confluence-838416264.html>


author: Wubbe
body: So we stopped Confluence and added the below line in setenv.bat

    -Datlassian.recovery.password="new password"

Next we started Confluence manually, not with

start Confluence run `<installation-directory>\bin\start-confluence.bat `

`but with`

start Confluence run <installation-directory>\startup-bundled-jre.bat

`Trying login on using recovery_admin (username) and the password set in setenv.bat the same error (network issue) popped up`


author: josh
body: Can you copy the exact text of the error from the logs here?


author: Wubbe
body: The log files are pending, the one thing I can share now is the error I get when trying to change a password on the new Confluence:

com.atlassian.crowd.exception.runtime.OperationFailedException: org.apache.http.conn.HttpHostConnectException: Connect to localhost:5000 \[localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1\] failed: Connection refused: connect  
at com.atlassian.crowd.embedded.core.CrowdServiceImpl.updateUserCredential(CrowdServiceImpl.java:318)

caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:5000 \[localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1\] failed: Connection refused: connect  
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:159)

caused by: java.net.ConnectException: Connection refused: connect  
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)


author: Wubbe
body: From the logs I noticed this particular error message, after performing the recovery correctly:

2018-11-06 08:02:58,080 ERROR \[http-nio-8090-exec-3\] \[crowd.manager.application.ApplicationServiceGeneric\] authenticateUser Directory 'Remote JIRA Directory' is not functional during authentication of 'recovery_admin '. Skipped.


author: Wubbe
body: Another one related to the recovery_admin:

2018-11-06 08:02:58,087 WARN \[http-nio-8090-exec-3\] \[atlassian.confluence.user.ConfluenceAuthenticator\] authenticate CommunicationException caught while authenticating user \<recovery_admin \>

-- referer: [http://localhost:8090/login.action?os_destination=%2Findex.action\&permissionViolation=true](https://urldefense.proofpoint.com/v2/url?u=http-3A__localhost-3A8090_login.action-3Fos-5Fdestination-3D-252Findex.action-26permissionViolation-3Dtrue&d=DwQFAg&c=eIGjsITfXP_y-DLLX0uEHXJvU8nOHrUK8IrwNKOtkVU&r=OdaDAG4is3cilXdSctyp-8LnCk8xQaBQUO-2HiCwlNw&m=Al04dtDTEqjnGzqnCxrplQTl6vjL4JwTLAAvaLmiBYY&s=j_whZC4jluGM4k6CWF82qJe6nbOfzpC9qlXWKUoYzQ4&e=) \| url: /dologin.action \| traceId: 2b3981288a78c167

com.atlassian.crowd.exception.runtime.CommunicationException

Caused by: org.apache.http.conn.HttpHostConnectException: Connect to localhost:5000 \[localhost/127.0.0.1, localhost/0:0:0:0:0:0:0:1\] failed: Connection refused: connect

Caused by: java.net.ConnectException: Connection refused: connect


Tags: confluence-server

server