Errors and problems in running software manifest often in very interesting and non-obvious cases. A problem in location A manifests itself only with an unrelated error message in a different location B.
We also have one example of such a situation in AEM, and that’s the famous “Authentication support missing” error message. I see often the question “I got this error message; what should I do now?”, and so I decided: It’s time to write a blog post about it. Here you are.
“Authentication support missing” is actually not even correct: There is no authentication module available, so you cannot authenticate. But in 99,99% of the cases this is just a symptom. Because the default AEM authentication depends on a running SlingRepository service. And a running Sling repository has a number of dependencies itself.
I want to highlight 2 of these dependencies, because they tend to cause problems most often: The Oak repository and the RepositoryInitializer service. Both must be up and be started/run succesfully until the SlingRepository service is being registered succesfully. Let’s look into each of these dependencies.
The Oak repository
The Oak repository is a quite complex system in itself, and there are many reasons why it did not start. To name a few:
- Consistency problems with the repository files on disk (for whatever reasons), permission problems on the filesystem, full disks, …
- Connectivity issues towards the storage (especially if you use a database or mongodb as storage)
- Messed up configuration
If you have an “authentication support missing” message, you first check should be on the Oak repository, typically reachable in the AEM error.log. If you have an ERROR messages logged by any “org.apache.jackrabbit.oak” class during the startup, this is most likely the culprit. Investigate from there.
Sling Repository Initializer (a.k.a. “repoinit”)
Repoinit is designed to ensure that a certain structure in the repository is provided, even before any consumer is accessing it. All of the available scripts must be executed, and any failure will immediate terminate the startup of the SlingRepositoryService. Check also my latest blog post on Sling Repository Initializer for details how to prevent such problems.
Repoinit failures are typically quite prominent in the AEM error.log, just search for an ERROR message starting with this:
*ERROR* [Apache SlingRepositoryStartup Thread #1] com.adobe.granite.repository.impl.SlingRepositoryManager Exception in a SlingRepositoryInitializer, SlingRepositoryservice registration aborted …
These are 2 biggest contributors to this “Authentication support missing” error messages. Of course there are more reasons why it could appear. But to be honest, I only have seen these 2 cases in the last years.
I hope that this article helps you to investigate such situations more swiftly.