Change in server hostname causes login failures
Asked by Mark Plimley:

I have Jira Core 7.5.1, Service Desk 3.8.2 and Confluence 6.6.0 installed on our server. Service Desk and Confluence are connected to each other. They both only use the Jira internal directory, configuration summary is:

Directory ID: 1  
Username: jira-admin  
Display name: Jira Admin  
Email address: tech@nxrev.com

=== Directories configured ===  
Directory ID: 1  
Name: JIRA Internal Directory  
Active: true  
Type: INTERNAL  
Created date: Thu Feb 28 11:57:51 PST 2013  
Updated date: Thu Feb 28 11:57:51 PST 2013  
Allowed operations: \[CREATE_GROUP, CREATE_ROLE, CREATE_USER, DELETE_GROUP, DELETE_ROLE, DELETE_USER, UPDATE_GROUP, UPDATE_GROUP_ATTRIBUTE, UPDATE_ROLE, UPDATE_ROLE_ATTRIBUTE, UPDATE_USER, UPDATE_USER_ATTRIBUTE\]  
Implementation class: com.atlassian.crowd.directory.InternalDirectory  
Encryption type: atlassian-security  
Attributes:  
"user_encryption_method": "atlassian-security"

A while back I changed the server hostname and updated the Base URL in Jira and Confluence. Yesterday I discovered a couple of more recently created users cannot login to confluence, but they can login to the Service Desk. On login, the Confluence page says

* Sorry, an error occurred trying to log you in. Please try again.

The atlassian-confluence.log contains the following error:

com.atlassian.crowd.exception.runtime.OperationFailedException: The following URL does not specify a valid Crowd User Management REST service: http://**oldhost.old.domain**:8080/rest/usermanagement/1/authentication?username=support%40nxrev.com

I haven't been able to find where oldhost.old.domain is still set. How can I fix this?

Thank you for assistance with this.

Mark


Answers:
author: AnnWorley
body: Hi Mark,

Please check the Jira URL in the User Directory setup in Confluence: Confluence Admin\>User Directories.

This article has more details: [Connecting Confluence to Jira applications for User Management](https://confluence.atlassian.com/doc/connecting-to-crowd-or-jira-for-user-management-229838465.html#ConnectingtoCrowdorJiraforUserManagement-ConnectingConfluencetoJiraapplicationsforUserManagement).

I look forward to hearing if users can log into Confluence as expected after updating the Jira URL in the Confluence user directory.

Thanks,

Ann

comments: author: Mark Plimley
body: That looks like the issue. When I test the Remote Jira Directory that I have, it fails because of the old server name, not the current one.

There is no "User Directories" under the Confluence Admin drop-down. I went to User management \> User Directories.

It says that I cannot edit it because I am logged in through it. This is as my admin account. I don't know what it means to log in as a locally authenticating user, or if I even have a locally authenticating user.

I checked the article you referenced and tried to add another Jira server entry so that hopefully I could delete the incorrect one. But it fails to authenticate with my jira admin account and password, even though I can login with it.

Any suggestions how I can fix this? I don't mind going into Postgres if I have to.

Mark


author: AnnWorley
body: Hi Mark,

Since you are on Confluence 6.6 you may use recovery mode to restore admin access, as described in [Restore Passwords To Recover Admin User Rights](https://confluence.atlassian.com/conf66/restore-passwords-to-recover-admin-user-rights-943962413.html). Then you may create a new User Directory or edit the existing one. Once logged in, I recommend adding a local user to the confluence-administrators group so that you have admin access when/if Jira is unavailable.

A locally authenticating user is a user from Confluence's internal directory. Please review [Managing Multiple Directories](https://confluence.atlassian.com/conf66/managing-multiple-directories-943962444.html) for details on how the user directories work together and how permissions and logins work with the user directories.

Thanks,

Ann


author: Fadoua
body: Did you update the server.xml when you changed the base URL?

comments: author: Mark Plimley
body: Faduoa,

Yes, server.xml contains the current reverse proxy URL "proxyName=." This value matches the base URL. It changed in the first place because I added Apache front end with reverse proxy for Confluence and JIRA. The reverse proxy is working great except for this one issue.

Under \<Engine name="Catalina" I have \<Host name="localhost", which it is. But the Confluence log is referencing the old host name before I configured Apache. I have not been able to find out where it is getting the old host name.

Thanks for asking.

Mark


author: Fadoua
body: Did you update the Application Link in Confluence?


author: Mark Plimley
body: The User Directory is the problem. I'm trying to figure out how to fix that.

Mark


Tags: crowd

hostname

jira-core

jira-service-desk

login