"Sorry, an error occurred trying to log you in. Please try again." When trying to login

Miroslav Denkov July 15, 2019

Hello,

I am completely new with atlassian apps and have no expierence with them.

After restarting the VM that holds our atlassian apps, our team has the following error when trying to login: 

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

I get the same error even if i try to login with wrong credentials.

Host is windows server 2016. 

4 answers

1 accepted

2 votes
Answer accepted
Jakub Sławiński
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.
July 15, 2019

Can you check your server logs? Do you use any external authentication like LDAP?

Miroslav Denkov July 15, 2019

I checked JIRA logs, here is what I found: 

2019-07-15 13:49:16,569 ERROR [http-nio-8090-exec-4] [confluence.pages.actions.HeartbeatAction] startActivity No content found or no permission to view content with contentId: 46694519

-- referer: http://atlassian/confluence/pages/resumedraft.action?draftId=46694519&draftShareId=8b433921-b42d-4f56-b9d6-f37ea6e48490 | url: /confluence/json/startheartbeatactivity.action | traceId: 59838313f4541917 | userName: anonymous | action: startheartbeatactivity

2019-07-15 13:49:21,025 ERROR [http-nio-8090-exec-8] [crowd.manager.application.ApplicationServiceGeneric] authenticateUser Directory 'Remote JIRA Directory' is not functional during authentication of 'user'. Skipped.

-- referer: http://atlassian/confluence/dologin.action | url: /confluence/dologin.action | traceId: 1dae63641495d81c

2019-07-15 13:49:21,029 WARN [http-nio-8090-exec-8] [confluence.impl.hibernate.ConfluenceHibernateTransactionManager] doRollback Performing rollback. Transactions:

->[com.atlassian.confluence.user.DefaultUserAccessor.authenticate]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT (Session #2071333334)

-- referer: http://atlassian/confluence/dologin.action | url: /confluence/dologin.action | traceId: 1dae63641495d81c

2019-07-15 13:49:21,030 WARN [http-nio-8090-exec-8] [atlassian.confluence.user.ConfluenceAuthenticator] authenticate OperationFailedException caught while authenticating user <user>.

-- referer: http://atlassian/confluence/dologin.action | url: /confluence/dologin.action | traceId: 1dae63641495d81c

com.atlassian.crowd.exception.runtime.OperationFailedException

 

Like I said, I'm completely new to the infrastructure and I don't know if there is LDAP functionality.

We have no problems connecting to atlassian/jira, but atlassian/confluence shows the same mistake no matter what.

Miroslav Denkov July 16, 2019

I forgot to mention that we are using JIRA instance as an authentication.

Jakub Sławiński
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.
July 16, 2019

The heartbeat error is harmless, as according to:

 

https://confluence.atlassian.com/confkb/getting-a-lot-of-heartbeataction-errors-in-the-logs-777004078.html

 

The error with authentication is similar to:

 

https://jira.atlassian.com/browse/CONFSERVER-29790

 

Can you check that you properly configured all the endpoints?

Miroslav Denkov July 16, 2019

Yes, I double checked those from application links and from atlassian/jira > JIRA user server.

I do not have local admin account to connect to atlassian/counfluence so I can't check the endpoints there.

I also did research in the sql database, all of our users have the 'T' flag in the "active" table. Is this the issue? Should they have the 'F' flag in order to authenticate?

Jakub Sławiński
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.
July 16, 2019

Can you post a full stacktrace of com.atlassian.crowd.exception.runtime.OperationFailedException?

Miroslav Denkov July 16, 2019

I'm sorry.

Is this a log file? If so, where can I find it?

Jakub Sławiński
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.
July 16, 2019

The file is the same, but you cut the logs.

 

You should have something similar as in:

 

https://community.atlassian.com/t5/Confluence-discussions/Unable-to-Log-into-Confluence-after-Update/td-p/645370

Miroslav Denkov July 16, 2019

Text is too large to fit in here. Are you OK with a dropbox link for the file?

Jakub Sławiński
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.
July 16, 2019

 

No, just post the 'caused by' section. Without that the error is meaningless.

 

I took a look at your log and you have something broken with your urls:

 

referer: http://atlassian/confluence/dologin.action | url: /confluence/dologin.action

 

I would rather expect something like:

 

referer: http://10.6.81.123:8090/dologin.action | url: /dologin.action

Like Miroslav Denkov likes this
Miroslav Denkov July 16, 2019

Here's the caused by section.

Caused by: com.atlassian.crowd.exception.ApplicationPermissionException: Forbidden (403) Encountered a "403 - Forbidden" error while loading this page. client.forbidden.exception Go to JIRA home

                at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.throwError(RestExecutor.java:522)

                at com.atlassian.crowd.integration.rest.service.RestExecutor$MethodExecutor.andReceive(RestExecutor.java:364)

                at com.atlassian.crowd.integration.rest.service.RestCrowdClient.authenticateUser(RestCrowdClient.java:141)

                at com.atlassian.crowd.directory.RemoteCrowdDirectory.authenticate(RemoteCrowdDirectory.java:177)

                at com.atlassian.crowd.directory.DbCachingRemoteDirectory.authenticateAndUpdateInternalUser(DbCachingRemoteDirectory.java:246)

                at com.atlassian.crowd.directory.DbCachingRemoteDirectory.authenticate(DbCachingRemoteDirectory.java:164)

                at com.atlassian.crowd.manager.directory.DirectoryManagerGeneric.authenticateUser(DirectoryManagerGeneric.java:273)

                at com.atlassian.crowd.manager.application.ApplicationServiceGeneric.authenticateUser(ApplicationServiceGeneric.java:181)

                at com.atlassian.crowd.embedded.core.CrowdServiceImpl.authenticate(CrowdServiceImpl.java:70)

                ... 195 more

 

The way I see it, this is an endpoint connection problem?

Jakub Sławiński
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.
July 17, 2019

Yes, are you sure the url http://atlassian/confluence/dologin.action is correct?

Like Miroslav Denkov likes this
Miroslav Denkov July 17, 2019

Yes, and I am able to connect with local account. 

We have problems with the accounts that use our JIRA instance for authentication.

When I check the application links settings, It all looks okey, but in user Directories I can't synchronise the remote JIRA directory. The following mistake is: Synchronisation failed. See server logs for details.

Here is what I've found in the log:

2019-07-17 11:49:04,178 INFO [Caesium-1-4] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache FULL synchronisation for directory [ 294913 ] starting
2019-07-17 11:49:04,454 INFO [Caesium-1-4] [atlassian.crowd.directory.DbCachingRemoteDirectory] synchroniseCache failed synchronisation complete for directory [ 294913 ] in [ 276ms ]
2019-07-17 11:49:04,464 ERROR [Caesium-1-4] [atlassian.crowd.directory.DbCachingDirectoryPoller] pollChanges Error occurred while refreshing the cache for directory [ 294913 ].
com.atlassian.crowd.exception.OperationFailedException: com.atlassian.crowd.exception.ApplicationPermissionException: Forbidden (403) Encountered a "403 - Forbidden" error while loading this page. client.forbidden.exception Go to JIRA home
at com.atlassian.crowd.directory.RemoteCrowdDirectory.searchUsers(RemoteCrowdDirectory.java:333)

Jakub Sławiński
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.
July 17, 2019
Like rubywang likes this
Miroslav Denkov July 17, 2019

Thank you for the provided link. 

I followed and did all the provided procedures, but I am stick at the part where I have to add the "Atlassian JIRA" server from Confluence/User Directories (.../plugins/servlet/embedded-crowd/directories/list).

When I make the changes and click "Test" I get the same error as described in the log file:

Connection test failed. Response from the server:
com.atlassian.crowd.exception.ApplicationPermissionException: Forbidden (403) Encountered a "403 - Forbidden" error while loading this page. client.forbidden.exception Go to JIRA home

 

I am really out of ideas at this time.

Jakub Sławiński
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.
July 17, 2019

What server url do you provide?

Miroslav Denkov July 17, 2019

The same that I used before: http://atlassian/jira

I don't think the url would be a problem, after all I can connect with the local accounts in it. I even made another new local account to test it.

Jakub Sławiński
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.
July 17, 2019

Is there any dns magic behind that url?

 

$ wget http://atlassian/jira
--2019-07-17 13:19:07-- http://atlassian/jira
Resolving atlassian (atlassian)... failed: Name or service not known.
wget: unable to resolve host address ‘atlassian’

Jakub Sławiński
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.
July 17, 2019

When I put that url to my firefox, it tries to connect to the following address:

 

https://www.atlassian.com/software/jira

 

I do not think you can authenticate with that url.

Miroslav Denkov July 17, 2019

It is. 

We have local dns that connects this domain to the server's IP. 

Both Confluence and JIRA are hosted on that local server.

Jakub Sławiński
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.
July 17, 2019

So you should double check that all the servers resolve that url correctly. Moreover, in the second thread I mentioned there is a detailed list of views to check. Have you checked them all?

Like Miroslav Denkov likes this
Miroslav Denkov July 17, 2019

Just did that, I uploaded screenshots on a new thread here. 

All servers resolve that url correctly.

0 votes
Hugo October 29, 2019

Hello, We had a similar problem here.

Our problem was solved when we reconfigured the user directory within Confluence and Jira.

First it was necessary to add an external connection with application name and password in Jira.

Then we add this connection created with these credentials in Confluence.

 

jira_config.png

confluence_config.png

0 votes
Miroslav Denkov July 17, 2019

I cannot proceed to step 3 because at step 2 the UI wont let me choose the option because when I click "Test" the test fails and I'm left there.

I used the URL's that I gave earlier, not IP's.

Jakub Sławiński
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.
July 17, 2019

Can you try with the IPs?

Miroslav Denkov July 17, 2019

Since I'm new in the company, I don't know all the IP's/ports of the Atlassian apps.

Tomorrow I will ask if someone can give them to me and try them. I will post the result here.

The syntax should be like this, right?

http://192.168.1.3:8090

Jakub Sławiński
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.
July 17, 2019

Yes, please also note that you missed the ports in your urls.

 

You should also find the ips/ports in the server configuration. Please take a look at:

https://confluence.atlassian.com/kb/how-to-create-an-unproxied-application-link-719095740.html

Miroslav Denkov July 18, 2019

Hi again,

 

First of all, thank you for all the provided solutions, I will accept your answer because you gave me so much solutions.

Turns out we had revers proxy on this server that no one told me about, so that was the problem.

 

Once again, thank you for your help.

0 votes
Miroslav Denkov July 17, 2019

11.PNG22.PNGYes, as you can see the Application Links are okey, so these connections look fine.

The problem appears with user directories.

Jakub Sławiński
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.
July 17, 2019

What about these screenshots:

 

1. the Confluence administration page User Directories (http://confluence_server:port/plugins/servlet/embedded-crowd/directories/list)
2. the Confluence administration page Edit Security Configuration (http://confluence_server:port/admin/viewsecurityconfig.action)
3. the Jira administration page Configure Application Links (http://jira_server:port/plugins/servlet/applinks/listApplicationLinks)

 

 

and the possible solution for the mismatch in the application name string:

1. Go in Jira to Administration / User Management (.../secure/admin/ConfigureCrowdServer.jspa). Delete the existing Confluence entry (if there is one) and re-create it. Use 'Confluence' as the application name and the admin password to authenticate in Jira. Save the entry and it should appear in the top of the list in "Configure User Applications'

2. Go to Confluence in Administration / User Directories (.../plugins/servlet/embedded-crowd/directories/list). Add a directory and select type 'Atlassian JIRA'. Use the internal URL to jira and the admin password, the application name has to match what you entered in step 1, for me it's just 'Confluence'. Test and save if it validates.

3. Move the Jira directory entry to the top of the list so it is the defult authorization provider. Test and Synchronise links should work correctly. If so, everything should be working correctly.

Let me know if you are able to complete the 3 steps successfully.

Miroslav Denkov July 17, 2019

The second step here is the one that I failed to proceed earlier. Now with the same result. 

Here are some more screenshots:

333.PNG444.PNG

Jakub Sławiński
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.
July 17, 2019

Can you try the mentioned solution for the mismatch in the application name string?

Miroslav Denkov July 17, 2019

Do you mean step 1: Go in Jira to Administration / User Management ...?

Because I already did that few times, without result. It appears under Configure Other Applications and that is it.

Jakub Sławiński
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.
July 17, 2019

Also with step 2 and 3? Have you used the internal URLs there?

Suggest an answer

Log in or Sign up to answer