Issue with long authorization
Asked by ??????? ????????:

Hi all.

Situation: no Confluence user has logged in for a long time (at night, for example). The first user who tries to log in will be forced to wait a long period of time on the login screen before entering Confluence. If immediately after this the same or another user logs into Confluence again, everything will happen quickly. After a few hours have passed, the situation will happen again. What could be the problem with authorization?

Our Confluence does not use AD autorization.

Thanks!


Answers:
author: Shannon S
body: Hello,

Welcome to Atlassian Community. It's nice to meet you!

Is your Confluence site only using the internal Confluence directory for user management, or do you use Jira or something else?

What version of Confluence are you using? Could you have a look at the [Confluence Server Logs](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html) and let me know the stack trace you receive when you try to login when it takes a long time? Make sure to compare the timestamp with the time that you triggered the problem.

Thank you for your help.

Shannon

comments: author: ??????? ????????
body: Thank you for you reply!

1. Our Confluence site only using the internal Confluence directory for user management.

2. Version of Confluense is 7.1.0

3. Where I can find the stack trace? I download zip with Confluence Server Logs... and?


author: Shannon S
body: Hello,

Thank you for confirming.

To find your stack trace, I directed you to the [Confluence Server logs](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html?_ga=2.214671379.560139139.1582539112-1642555208.1571221417) documentation. Have you had a look at that yet? It lets you know where in your server logs you can see the log files. If you don't have direct access to the server, you'll want to get your server admin involved.

The .zip file you're referring to is something else; that's the [Support Zip](https://confluence.atlassian.com/support/create-a-support-zip-790796819.html) that can be obtained for the purpose of sending in on a support case. You can also see the logs there, but it's best if you tail the logs on the server as the error is occurring so you know for sure which error is caused by your actions.

Let me know if you have any trouble!

Regards,

Shannon


author: ??????? ????????
body: Hi Shannon!

In \\Atlassian\\Confluence\\logs directory I see txt files only... For example [catalina.2020-03-03](https://dropmefiles.com/gaNzH) But I can not find here "stack trace" :-(


author: Shannon S
body: Hi there,

Have you had a chance to review the article I linked you above? It should help you to find your log files:
> Note that the default location is the Confluence **home directory** , not the application server's log file. The home directory is specified in `<confluence-installation>/confluence/WEB-INF/classes/confluence-init.properties`.

Unless you have manually set your home directory to \\Atlassian\\Confluence, then that isn't the right place. That Catalina log file does not exist in the home directory, but in your Confluence installation directory.

Please check your home directory. You should find your log files there.

Let me know if you have any trouble.

Shannon


author: ??????? ????????
body: Hi Shannon!

I think that I understand it:

1. I go to \\Atlassian\\Confluence\\confluence\\WEB-INF\\classes dir.

2. In confluence-init.properties file I see home dir: confluence.home = C:\\\\Atlassian\\\\Application Data\\\\Confluence .

3. Now I go to \\Atlassian\\Application Data\\Confluence\\logs dir.

4. I see [atlassian-confluence.txt](https://dropmefiles.com/AxNN3)` and` [atlassian-confluence.log](https://dropmefiles.com/99fYx)[.1](https://dropmefiles.com/99fYx) there

And what should I do next?


author: Shannon S
body: Hello!

Thank you for sharing that. I've had a look, but the log you shared is from February, and doesn't show any activity since then.

There could be two possibilities here:

1. Your system administrator set a custom log location and they're located in a different place.
2. The log4j process crashed, or is hung, thus not producing any logs.

For situation #1:

Have a look at the [Changing the destination of the log files](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html#WorkingwithConfluenceLogs-Changingthedestinationofthelogfiles) section from the article I shared previously, [Working with Confluence Logs](https://confluence.atlassian.com/doc/working-with-confluence-logs-108364721.html). Essentially, you need to look in the same **classes** directory as you did for the confluence-init.properties file, there's a file called **log4j.properties** . Open that file, and look for the section called **Logging Location and Appender**. You can check there to see what the destination is, or you can share with me that file and then I can see where it should be located for you.

For situation #2:

I am going to refer to the [Configuring Logging](https://confluence.atlassian.com/doc/configuring-logging-181535215.html) documentation. Note that you need to be logged in as System Administrator to perform these steps.

1. Choose the**cog icon ![](https://confluence.atlassian.com/doc/files/747833194/747833195/2/1517274813281/cog.png)** , then choose **General Configuration**.
2. Select '**Logging and Profiling** ' in the '**Administration** ' section of the left-hand panel.
3. Under '**Log4j Logging** ', click **Diagnostic** and then click **Production**.

This action should restart the log4j service and force a new log file to be created.

Finally, if all else fails, I would recommend that you perform a restart of your Confluence site and see if that resolves the issue.

Take care,

Shannon


author: ??????? ????????
body: Hi Shannon!

Look [this log](https://dropmefiles.com/uiaei) please. Now I see activity since


author: Shannon S
body: Hello,

Thank you for sharing that. These log files go back to February 18th, so could you please tell me the exact date and time that you replicated the login issue so I can trace it to a given error message?

Thank you!

Shannon


author: ??????? ????????
body: This log is from February 18 to March 11, 2020. Look at the end of the file please. The error should be at the end of this log.


author: Shannon S
body: Hello,

I've had a look at the log file you sent, and there's just too much information there to be able to narrow down to your issue specifically.

I'll need to know exactly the time and date that you had the Confluence user attempt to log-in.

When I look at your log files, going from the 11th of March backwards, there are no relevant errors. There's a series of WARN and INFO messages that are purely informative.

The first error I see is on the 10th and is the one mentioned here:

* [CONFSERVER-54189](https://jira.atlassian.com/browse/CONFSERVER-54189) *Heartbeat Error Thrown While Editing Template and Blueprint*

However, that message isn't likely related to the issue you're currently experiencing.

Let's try to get more specific to narrow this down.

1. From my understanding, the issue only occurs when someone logs into the first time in a long time? But once they login, everyone else is able to login quickly? Do I have that right?
2. Are all users able to replicate this issue?
3. Do you encounter this issue in multiple places?
4. Are you behind a firewall or proxy? If you bypass that, does it work faster?
5. Do the logins every timeout, or do they all eventually authenticate successfully?

You can enable some debug logging to get more specific information about your login issue:

1. Following [User Management and Login Issues Troubleshooting - Enabling User Management Logging,](https://confluence.atlassian.com/confkb/user-management-and-login-issues-troubleshooting-180847174.html) enable DEBUG level logging for the following packages:  

   ```
   com.atlassian.usercom.atlassian.confluence.use
   ```

2. Begin the process to [Generate a HAR file](https://confluence.atlassian.com/kb/generating-har-files-and-analysing-web-requests-720420612.html) to record your browser activity when reproducing the slow login. You can inspect this later to see what other sources might be causing your login to be slow.
3. Reproduce the slow login, make a note of the date and time.
4. Now, remove the DEBUG level to prevent the logs from growing large.
5. Having a look at the Confluence log file, please share any error messages that you encounter while the long login is occurring.

It's best to share only the relevant information here since the error message can be indexed by search engines, in case anyone is having the same error messages.

Let me know if you have any trouble with that.

Shannon


author: ??????? ????????
body: Hi Shannon!

For the last three days I have been watching for authorization.
> 1. From my understanding, the issue only occurs when someone logs into the first time in a long time? But once they login, everyone else is able to login quickly? Do I have that right?

*Yes, your are right.*
> 2. Are all users able to replicate this issue?

*Yeah.*
> 3. Do you encounter this issue in multiple places?

*Yeah.*
> 4. Are you behind a firewall or proxy? If you bypass that, does it work faster?

*Different users try different options. The result is the same :-(*
> 5. Do the logins every timeout, or do they all eventually authenticate successfully?

*I did not understand your question... Every morning, when users come to work, the first user experiences problems with authorization. It takes a very long time. I noticed a pattern - 6 minutes in each case. That is, the first user to enter the confluence enters the username and password and can only log in after 6 minutes.*

I followed your instructions and this is what I got. I try to login from 07:52 to 07:57

```
2020-03-19 07:52:32,736 WARN [Caesium-1-4] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job LaasPerformanceLoggingJob#LaasPerformanceLoggingJob completed unsuccessfully with response JobRunnerResponse[runOutcome=ABORTED,message='LaaS performance logging is turned off']
-- referer: http://161.8.221.50:8090/setup/setupadministrator-start.action | url: /setup/finishsetup.action | traceId: a57a472e088e0cdb | userName: anonymous | action: finishsetup
2020-03-19 07:57:32,737 WARN [Caesium-1-4] [impl.schedule.caesium.JobRunnerWrapper] runJob Scheduled job LaasPerformanceLoggingJob#LaasPerformanceLoggingJob completed unsuccessfully with response JobRunnerResponse[runOutcome=ABORTED,message='LaaS performance logging is turned off']
-- referer: http://161.8.221.50:8090/setup/setupadministrator-start.action | url: /setup/finishsetup.action | traceId: a57a472e088e0cdb | userName: anonymous | action: finishsetup
2020-03-19 07:57:41,686 WARN [http-nio-8090-exec-25] [confluence.util.profiling.DefaultActivityMonitor] close Exceeded the threshold of 60000 ms: ActivitySnapshot{startTime=1584586300795, threadId=5729, threadName='http-nio-8090-exec-25', userId='turchenko.vn', type='web-request', summary='/'}
-- url: / | traceId: 2af14230b0f43959 | userName: turchenko.vn | referer: http://mis:8090/login.action?os_destination=%2F
2020-03-19 07:57:42,733 INFO [http-nio-8090-exec-14] [synchrony.service.http.SynchronyRequestExecutor] execute Initiating request PUT http://127.0.0.1:8091/synchrony/v1/data/Synchrony-5be87353-646d-3f7c-ad3a-a697beac3dec/confluence-327685 HTTP/1.1 for 327685
2020-03-19 07:57:43,044 INFO [http-nio-8090-exec-14] [synchrony.service.http.SynchronyRequestExecutor] execute Initiating request PUT http://127.0.0.1:8091/synchrony/v1/data/Synchrony-5be87353-646d-3f7c-ad3a-a697beac3dec/confluence-327685 HTTP/1.1 for 327686
```

I dont see any errors... and you?

[And this is my HAR file](https://dropmefiles.com/BzkbG)


author: Shannon S
body: Hello [@??????? ????????](/t5/user/viewprofilepage/user-id/3749104),

Regarding your comment:
> *I did not understand your question... Every morning, when users come to work, the first user experiences problems with authorization. It takes a very long time.*

What I was asking is, when it takes a long time for authentication, do you ever get a timeout message? It sounds like from your reply that it does eventually authenticate, after 6 minutes. Do I have that right?

I had a look at your HAR file, and indeed, I can see that it took 6.023 seconds to load. You can compare that using the [Google Apps HAR Analyzer](https://toolbox.googleapps.com/apps/har_analyzer/).

I do see on the long request, there's this message under **Timing**:

![CleanShot 2020-03-20 at 14.43.49.png](https://community.atlassian.com/t5/image/serverpage/image-id/87367i7D7DB9DFE0E660D8/image-dimensions/495x282?v=v2 "CleanShot 2020-03-20 at 14.43.49.png")

When I asked about your firewall or proxy, you said that "different users try different options." Can you let me know what you mean by that? Have your users tested outside of your company firewall without being connected to a VPN or any other proxy network? If your server admin has a local proxy set up on the Confluence server, then you will also need to bypass that. See [How to Bypass a Proxy to Test Network Connectivity](https://confluence.atlassian.com/confkb/how-to-bypass-a-proxy-to-test-network-connectivity-402031184.html) for more details.

It seems that it may be an internal issue. However, I would be happy to raise at ticket for you with Support if you continue to have issues. Then we can work with you to confirm where the issue lies and how you can solve it. Please let me know and I can do that for you.

Regards,

Shannon


author: ??????? ????????
body: Hi Shannon!
> What I was asking is, when it takes a long time for authentication, do you ever get a timeout message? It sounds like from your reply that it does eventually authenticate, after 6 minutes. Do I have that right?

Yes, you are right.
> When I asked about your firewall or proxy, you said that "different users try different options." Can you let me know what you mean by that?

I connected via proxy and without it, from VPN too - the result is the same :-( The problem is definitely not in the connection.

Thank you for helping me!


author: Shannon S
body: Thank you for confirming that with me [@??????? ????????](/t5/user/viewprofilepage/user-id/3749104).

Would it be alright with you if I raise a ticket in your name? I'd like to have support get a look at your logs because this is more complicated than we'd be able to solve over Community.

Regards,

Shannon


author: ??????? ????????
body: Of course. Thanks!


author: Shannon S
body: [@??????? ????????](/t5/user/viewprofilepage/user-id/3749104),

My deepest apologies for the delay. I've gathered the information so far and raised a support ticket in your name. I will be watching the case to see what we can find out.

The log files you originally attached here are now expired. Could you obtain a copy of your Support Zip that you mentioned earlier, and attach it to the ticket I just created? It will help if you can also attach a more recent HAR file from when your first user tries to log in.

Thank you!

Shannon


author: ??????? ????????
body: Hello Shannon!

My problem is resolved :-)

The problem was with the network brendmauer which blocking the Universal Plugin Manager.  
Solution: Unblock Universal Plugin Manager or disable it.

Thank you for your helping!!!


author: Shannon S
body: Hi there,

Thank you for confirming! Glad it was resolved for you.

I'll go ahead and include this link for the future, if anyone else is encountering issues, here's how they can check for problems connecting to UPM, including if it's blocked their network:

* [Problems Connecting to the Atlassian Marketplace](https://confluence.atlassian.com/upm/problems-connecting-to-the-atlassian-marketplace-273875718.html)

Again, glad to hear your issue has been resolved! Take care, and have a pleasant rest of your week.

Regards,

Shannon


Tags: confluence-server

server