Expand my Community achievements bar.

Enhance your AEM Assets & Boost Your Development: [AEM Gems | June 19, 2024] Improving the Developer Experience with New APIs and Events

503 cq AuthenticationSupport service missing. Cannot authenticate request.

Avatar

Level 3

Hi ,

Instance am working when I opened today suddenly started stating AuthenticationSupport service missing. Cannot authenticate request.

I find all the bundles are active , status of Apache Sling Authentication Serviceorg.apache.sling.auth.core is active and I tried deleting index folder under crx-quickstart/repository and restarting the server but nothing worked ,

Startup is happening but still authentication error persists

18.12.2018 21:32:36.438 *ERROR* [qtp1998025192-167] org.apache.sling.engine.impl.SlingHttpContext handleSecurity: AuthenticationSupport service missing. Cannot authenticate request.

18.12.2018 21:32:36.438 *ERROR* [qtp1998025192-167] org.apache.sling.engine.impl.SlingHttpContext handleSecurity: Possible reason is missing Repository service. Check AuthenticationSupport dependencies.

Please help .. any pointers...Thanks in advance

13 Replies

Avatar

Employee Advisor

Possible reason is missing Repository service. means that Oak repository service isn't registered successfully. In other words, repository isn't available to do authentication for Apache Sling. There might be numerous reasons behind repository not coming up.

Just check if you are starting the AEM as super/admin user.

Thanks

Wasil

Avatar

Level 3

Hi Thanks for the reply ...am starting aem as admin, yesterday my machine got shut abnormally and till last night everything is working fine ....that's the only thing which went wrong last day....will there be anything else which gets corrupted because of abnormal system shutdown which might have caused this???

Avatar

Employee Advisor

You should refer to error.log and check for errors if anything could be fixed. If you have backup please restore.

Thanks

Wasil

Avatar

Level 3

Error.log is showing Authentication Service error apart from this there is no other error as no upgrade is done, I do not have current instance backup where I have my code that's the sole reason I need help to restore the instance  please

Avatar

Level 3

Bundles url is accessible and I do find all bundles are active from the start this issue happened

Avatar

Employee Advisor

Create DEBUG logger for "org.apache.jackrabbit.oak.segment" in http://<host>:<port>/system/console/slinglog in a separate log file. Restart the instance, check what information we get there.

Avatar

Level 3
In the debug  log for oak segment I do see Segment not found error
org.apache.jackrabbit.oak.segment.SegmentNotFoundException
org.apache.jackrabbit.oak.segment.SegmentNotFoundException: Segment f5c15052-5c4c-4931-a8bd-e502ac2bb2fd not found
     at org.apache.jackrabbit.oak.segment.file.FileStore$8.call(FileStore.java:602)
     at org.apache.jackrabbit.oak.segment.file.FileStore$8.call(FileStore.java:542)
     at org.apache.jackrabbit.oak.segment.SegmentCache.getSegment(SegmentCache.java:95)
     at org.apache.jackrabbit.oak.segment.file.FileStore.readSegment(FileStore.java:542)
     at org.apache.jackrabbit.oak.segment.SegmentId.getSegment(SegmentId.java:125)
     at org.apache.jackrabbit.oak.segment.Record.getSegment(Record.java:70)
     at org.apache.jackrabbit.oak.segment.MapRecord.getEntry(MapRecord.java:160)
     at org.apache.jackrabbit.oak.segment.MapRecord.getEntry(MapRecord.java:192)
     at org.apache.jackrabbit.oak.segment.MapRecord.getEntry(MapRecord.java:192)
     at org.apache.jackrabbit.oak.segment.MapRecord.getEntry(MapRecord.java:192)
     at org.apache.jackrabbit.oak.segment.SegmentNodeState.getChildNode(SegmentNodeState.java:412)
     at org.apache.jackrabbit.oak.plugins.index.property.strategy.UniqueEntryStoreStrategy.count(UniqueEntryStoreStrategy.java:190)
     at org.apache.jackrabbit.oak.plugins.index.property.strategy.UniqueEntryStoreStrategy.count(UniqueEntryStoreStrategy.java:204)
     at org.apache.jackrabbit.oak.plugins.index.property.PropertyIndexPlan.<init>(PropertyIndexPlan.java:148)

Avatar

Level 3

Other than backup is there anything in particular I can do under crx-quickstart to resolve this and get the instance back...because fully active nd working instance suddenly crashed but still I find all bundles r active ..please help

Avatar

Employee Advisor

You should find the latest good revision as mentioned on page[1] by using oak-run jar. Stop the instance, follow steps 1-6 and then try to bring up the instance.

Thanks

Wasil

[1] Fix Inconsistencies in the repository when SegmentNotFound Issue is reported in AEM 6.x

Avatar

Level 10

The logs clearly indicate that the segment has gone missing, deleted or corrupted or converted to .bak file. You would need to restore segmentnodestore to a last known good configuration which was sometime before the crash happened. You mentioned that all bundles are active which means the issue is not something that could be fixed by just restarting bundles.

The repository backup should be taken so that you have the master copy for various reasons including if you plan to contact customer care in future. If you do not take a backup and perform a wrong step, there is a possibility the repository might be lost forever and would have to setup AEM from scratch.

Avatar

Level 1

You can re-run your aem instancy from console and as admin, try:

  1. Delete crs-quickstart folder.
  2. Open your console as administrator (that is important).
  3. Position yourself in your aem-sdk folder.
  4. Run the following command: 
    java -XX:MaxPermSize=256m -Xmx1024M -jar your-instance-name.jar
    I got that code from: https://experienceleague.adobe.com/docs/experience-manager-65/deploying/deploying/deploy.html?lang=e... 

That worked for me, i hope it works for you.