Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

SDK local instance - Restart - Error 503 authentication

Avatar

Level 2

Hi!

I am working with an author instance. I have a sdk file and I have created a new instance, without any content or additional configuration, it's an empty and clean instance. I restart it and it does not work again. 503 service unathorized error is thrown.

 

org.apache.sling.engine.impl.SlingHttpContext handleSecurity: Possible reason is missing Repository service. Check AuthenticationSupport dependencies.

 

I have not tried to fix repository or index because it does not have sense on an clean instance, but I do not understand which mistake breaks my instance.

Any suggestions?

Thanks!

 

9 Replies

Avatar

Level 4

Hi @ana_belen_cano_ 

The 503 error Basically Indicates sling not able to connect to repository. It may be corruption Or last install broke it.

try these steps

  1. try accessing your crx/de if that redirection works login there check if any package is showing an errorScreenshot (213)_LI.jpg
  2. go to your system/console/bundles and see if all your bundles are in active state.
  3. if you don't find any issues anywhere there must be a mismatch in the versions you are using (eg: using java 11 for aem 6.4) .
  4. if your a backup of your project in your local, then you can turn off your AEM instance and delete your quickstart and do a fresh install.

try these and update us.

thanks

Avatar

Level 2

Thanks for your suggestions!!

It is a strange behavior. I have a clean instance with SDK version (2021.9.5852.20210917T073206Z-210800) and I have java 11. 

I have created a mvn project with archetype and when I compile, my instance fails. 

I have all bundles active, I have deleted index folder, but I can not start instance correctly again. It is a bit frustrating because everything is clean (project and instance) and when I compile, instance dead and I have to generate another. 

 

Thanks!

Avatar

Level 4

do you see any error message in your error.logs file.? (located in quickstart/logs/error.logs file),

this might give us the reason for this issue.!

if not just delete your quickstart and do a fresh install

 

Avatar

Level 2

I see generic error "org.apache.sling.engine.impl.SlingHttpContext handleSecurity: Possible reason is missing Repository service. Check AuthenticationSupport dependencies.".

 

My problem is how to identify what reason breaks my instance. I cannot create a instace per day, it is impossible to work like this. Mvn project and code are empty, created recently so it do not have sense this situation

Avatar

Employee Advisor

Hi @ana_belen_cano_ ,

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/aem-restart-issue-authenti...

Have a look at this since your fresh instance is also leading you to such errors.

However, I echo @Pavan_Kalyan 's thought to dig into ERROR logs and share the same if possible. Thanks.

Avatar

Community Advisor

@ana_belen_cano_ 

503 service unathorized error may indicate a corrupt instance. 

However if possible can you also try to switch to java 8 and see if same issue exists?

Avatar

Level 2

Hi! I can not use java 8, AEM as Cloud Service (my instance is a SDK file jar) requires at least Java 11 .  Thanks for your suggestion!.

Avatar

Community Advisor

@ana_belen_cano_ Looks like repository is corrupted. Please change the ERROR log level to DEBUG and the tail the logs.

1. Check whether your Apache Sling Authentication Service Bundle is active or not (http://localhost:4502/system/console/bundles/)- if not active then try to activate it manually.
2. Stop the AEM instance - Go to folder crx-quickstart/repository/remove folder index -> Start the AEM
3. Go for a re-indexing - http://www.wemblog.com/2011/12/how-to-rebuild-index-in-cq5-wem.html"
4. Delete the file if exist -> /author/crx-quickstart/launchpad/felix/cache.lock

 

Regards,

Raja

Avatar

Level 2

Hello,

 

Finally I found what breaks my instance. When a project is created, there is a configuration file which when you restart instance breaks it. 

 

Related info:  github.com/adobe/aem-project-archetype/issues/852

 

Thanks all!