Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.

Home page (sites) 503 issue after restart

Avatar

Level 2

I have on normal ams instance and i have created archetype 37 project. When I create service user config inside config folder and test instance it will work.

At the same time when I restart the instance home page gives me " http error 503 servletresolver service missing, cannot service requests missing issue".

When I remove this service user config again, it works fine.

 

Please help me with this issue.

8 Replies

Avatar

Community Advisor

Hi @sudarshanreddy ,

This is a known issue due to the presence of a repoinit config file in the project deployed, resulting in a repository initialization error causing HTTP 503 on AEM. Do follow the below steps

  • Navigate /apps/spa/osgiconfig/config/org.apache.sling.jcr.repoinit.RepositoryInitializer~spa.cfg.json
  • Delete .cfg.json or replace it's script into a -.config

Reference: https://github.com/adobe/aem-project-archetype/issues/852

Or check these links:

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

Hope that helps!
Regards,

Santosh

Avatar

Level 2

Thanks @SantoshSai 

 

But this issue is with new service user config file.

I had done replacing script from .cfg.json to .config and tried but it dint work.

When I remove that service user config, it starts working.

Avatar

Community Advisor

@sudarshanreddy Could you please pass that service user config to check if possible?

Avatar

Level 2

 

@SantoshSai  config file name is : org.apache.sling.serviceusermapping.impl.ServiceUserMapperImpl.cfg

 

and the content in it is:

// Configuration created by Apache Sling JCR Installer
{
"require.validation":true,
"user.enable.default.mapping":true,
"required.principal.validators":[
"org.apache.sling.jcr.resource.internal.JcrSystemUserValidator",
"com.adobe.granite.repository.impl.SystemPrincipalsValidation"
],
"required.user.validators":[
"org.apache.sling.jcr.resource.internal.JcrSystemUserValidator",
"com.adobe.granite.repository.impl.SystemUserValidation"
],
"user.default":"admin",
"user.mapping":[
"company.xyz.core:eventingService=serviceuser"
]
}

Avatar

Level 4

Hi @sudarshanreddy , I am having the same problem right now, how exactly did you remove the service user config? I'm not sure how. 

Avatar

Level 4

Hi @sudarshanreddy , just to be correct you deleted the ServiceUserMappingImpl.cfg in the file explorer right?

Avatar

Level 2

require.validation":true,
"user.enable.default.mapping":true,
"required.principal.validators":[
"org.apache.sling.jcr.resource.internal.JcrSystemUserValidator",
"com.adobe.granite.repository.impl.SystemPrincipalsValidation"
],
"required.user.validators":[
"org.apache.sling.jcr.resource.internal.JcrSystemUserValidator",
"com.adobe.granite.repository.impl.SystemUserValidation"
],

 

this validation causes issues.

Please remove and try.

Avatar

Community Advisor

This issue happens when Repository Initialization fails due to repo init files in code. To get exact root cause,

  1. Shut down your AEM instance.
  2. Clean error.log file
  3. Start AEM instance and search for logs related to repo init.

You will be able to see some errors coming on restart which is not allowing to execute repo init script fully. Even if single repo init fails, this issue comes. Please refer below example it will give you some idea.

Suppose you are giving permission on a folder /etc/xyz using repo init and the folder /etc/xyz does not exist in your code and in AEM so when you will restart, 503 error will come. So to fix this we need to add a step to create folder /etc/xyz before giving permission on the folder.