AuthenticationSupport service missing

Jordan Sheen
3 min readFeb 2, 2021
handleSecurity: AuthenticationSupport service missing. Cannot authenticate request.” handleSecurity: Possible reason is missing Repository service. Check AuthenticationSupport dependencies.

This is the worst of the worst error messages in Adobe Experience Manager (AEM). I would say it’s the most anxiety inducing for me over SegmentNotFound errors because at least with a SegmentNotFound you can guess you may need to restore. This one may have a path, it’s just not clearly displayed in a stack trace. I want to write out an approach I’ve learned for trying to resolve this.

What is it?

The AuthenticationSupport service missing error is logged when Sling can’t connect to the repository. (See the Apache Sling code here.) It can occur for a number of reasons. Some of which include:

However, I’m not confident that’s a comprehensive list.

When it does happen, it’s possible that you can reach the OSGI console and nothing else. Things like the AEM login page, or package manager would all just return a 503. Your only source of hope is the error log, thread dumps, and most importantly — heap dumps.

How to Analyze It

Error Log

The first and easiest thing to do is see what is reporting in the error log.

Stop AEM, clear out the error.log, and start it up. In the case of a misconfigured datastore, you will hit an error pretty fast indicating that AEM can’t connect to it. If you’re running this in AWS or Azure you then need to jump down the rabbit hole of verifying the datastore config, IAM roles or access keys. The rule of thumb is that any ERROR message in the error.log before the AuthenticationSupport error should be investigated. However, they may not always be the source of the problem, which leads you to the next step.

Thread Dumps

Thread dumps are best taken when the log is in the continuous loop of writing the error. Then, it’s a matter of seeing what threads are running. If there is a thread consuming high CPU, you can likely point to that. If the system appears to be completely idle, that’s indicative of something else. If when you see that there is a really busy thread, it’s helpful to go investigate it in the heap dump.

Heap Dumps

I noted earlier that one case is long reindexing. My heap dump fu is pretty weak, but the idea here is that viewing the Thread Analyzer tab in Eclipse’s MAT can help you see which threads had locks on the biggest objects. In one instance, searching through MAT pointed not only at what object was biggest, but the blob in the datastore being read and which index was reading it.

Time

There is a chance that sometimes this error will go away on its own. That’s usually a case where something else was just taking up the time, cleared, and let everything continue.

Conclusion

This is the general approach I’ve taken in trying to identify the real cause of an “AuthenticationSupport service missing” error. Unfortunately, often the time crunch to getting a resolution prevents getting everything you need to determine what the cause is. You just need to remember in the moment to be getting as much data as possible.

Good luck!

--

--

Jordan Sheen

AEM Cloud Subject Matter Expert (CSME) focused on improving devops for AEM