Frequent Logout in AEM Environment. | Community
Skip to main content
tushaar_srivastava
Level 6
July 15, 2019
Solved

Frequent Logout in AEM Environment.

  • July 15, 2019
  • 9 replies
  • 7279 views

Hi,

I am facing frequent Logout issue in my development environment :4502

Scenario: whenever I sign in into Dev environment user: admin ; password: admin, and in between working my instance get automatically Logout.

So,please suggest me How to stop this frequent Logout until we click on Logout button.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by cal-netsolution

Hi Tushar, you can go to OSGI configuration, http://localhost:4502/system/console/configMgr and search for Apache jackrabbit oak TokenConfiguration. The Token expiration should have default value as 43200000 milliseconds, i.e. 12 hours (This suggests that AEM logout after inactivity of 12 hours). Check in you case if anything has been modified in this field.

If this helped, pls mark it as 'helpful'

9 replies

cal-netsolution
cal-netsolutionAccepted solution
Level 2
July 15, 2019

Hi Tushar, you can go to OSGI configuration, http://localhost:4502/system/console/configMgr and search for Apache jackrabbit oak TokenConfiguration. The Token expiration should have default value as 43200000 milliseconds, i.e. 12 hours (This suggests that AEM logout after inactivity of 12 hours). Check in you case if anything has been modified in this field.

If this helped, pls mark it as 'helpful'

tushaar_srivastava
Level 6
July 15, 2019

Thanks, but even after applying the above property I still My Dev environment automatically get logged-out

I am getting this after Dev loggout,

cal-netsolution
Level 2
July 15, 2019

Can you try restarting your dev instance, as per my experience before, if we do any changes to Apache jackrabbit oak TokenConfiguration it will show authentication failed message.

After restart it should work properly,and the value you have edited 43200000 should be saved. Also check your error logs if you see any other error. If the issue still persists, please do check the error logs, what kind of error it is throwing. And one more thing what was the value of the Token expiration before you have edited it?

kautuk_sahni
Community Manager
Community Manager
July 15, 2019

Are you seeing this on fresh instance Or is this happening after some custom deployment?

Do you see error in error.log? Which AEM version are you on? Also, are you having multiple AEM instance open in same browser (not sure if this is Bug, but something happend with me 1.5 years back | it is like connecting to AEM with several users in the same browser tabs: the switch between the different tabs cannot work because i assume they all share the same session, aka the authentication cookie.)?

@Joerg Hoh Any inputs?

Kautuk Sahni
alexaj563593
July 15, 2019

Ya I'm also having same problem with me while doing my assignment thank you for your help.

joerghoh
Adobe Employee
Adobe Employee
July 15, 2019

That's a strange behavior indeed. Have you tried a different browser already? Just to eliminate the chance that a faulty browser plugin kills your cookies.

anujg3325839
Adobe Employee
Adobe Employee
July 16, 2019

You want to reset the hash algo if the config is not taking effect.

for this [0]  configuration

[0] http://host:port/system/console/configMgr/org.apache.jackrabbit.oak.security.authentication.token.TokenConfigurationImpl

open and click on reset button. This will reset the hash algo. and restart the AEM environment.

also please refer to the - How to set the Oak login token session expiration

BrijeshYadav
Level 5
July 16, 2019

Hi Tushar,

You can open crx/de and delete configuration node at  /apps/system/config/org.apache.jackrabbit.oak.security.authentication.token.TokenConfigurationImpl.config.

Restart aem and it will reset it to default configuration values.

kpawan
Level 2
March 23, 2022

We faced the same problem and unfortunately we cannot even login to crx to follow what has been mentioned in this forum. Following are the steps I took to fix this -

 

Problem : 1. Not able to access /system/console/configMgr

                 2. Not able to login to crx and thus could not delete  /apps/system/config/org.apache.jackrabbit.oak.security.authentication.token.TokenConfigurationImpl.config as per suggestion by @brijeshyadav 

                 3. Sytem restart didn't helped.

 

Fix :  1. Stop aem instance.

         2. Go to /crx-quickstart/launchpad/config/org/apache/jackrabbit/oak/security/authentication/token

         3.  Look for file TokenConfigurationImpl.config (on linux cat the file)

          4. You will see tokenRefresh flag has changed to "True" or tokenExpiration value has been modified to                 be too low. For example for us it was like below -

              

 

 

            5. Delete this file and restart the instance or replace this file with other instance same file where it is working perfectly file. For me I took the file from QA to Dev publish server. Following is the expected configuration -

             

          6. Restart this instance.

This fix my problem.

 

Hope this helps!!