Highlighted

Accessing /services giving 404

trc41594544

28-07-2020

If i try accessing any servlet with /services i am getting the below error. I do not see the entry in access logs also. This is Author instance and it does not have any dispatcher in front of it. 

 

Screen Shot 2020-07-28 at 8.38.18 AM.png

I do not see any where in AEM that it is blocked . If i access our instance with any random text, i am seeing it in access logs but not any thing that starts with /services/ . I am not getting 404 as expected for any other URL's other than anyone with /services/

 

We have /services/ path present in the Apache Sling servlet configuration. 

Screen Shot 2020-07-28 at 8.06.20 PM.png

 

Please let me know with thoughts. 

Replies

Highlighted

jbrar

Employee

28-07-2020

Might be something to do with redirects. Check if you have anything under /etc/map

 

Also, use JCR Resolver(/system/console/servletresolver) to check the path and Servlet resolver(/system/console/servletresolver) to check which servlet will be serving this path.

Highlighted

vanegi

Employee

28-07-2020

Are you able to access the same servlet via publish server directly but not by dispatcher? If that is the case, then its most likely related to

CSRF, Referrer Filter, Headers, dispatcher configs.

 

Can you check Referrer Filter configuration in /configMgr and the ajax call request-headers? Could you share the request/response screenshot with headers? What do you see in the dispatcher logs for the same request?

 

Apache Sling Referrer Filter:

If the servlet is invoked externally then make sure the host name of the source system is added to the Allow Hosts section of the Apache Sling Referrer Filter

 

vanegi_0-1595945083951.jpeg

 

 

Highlighted

trc41594544

28-07-2020

There is nothing under /etc/map and also when i try the servlet path which starts with /services , it is resolving as expected.
Highlighted

trc41594544

28-07-2020

This is author only. Code is not deployed in publishers. Servlet is invoked internally in AEM, it is not coming from external systems. It is happening only with /services/ and nothing else. Every other call with different paths works.
Highlighted

trc41594544

28-07-2020

correction to my comment. Any servlet path with /services/ is not resolving as expected. It is giving me the above error as in screenshot and it happens only with /services/
Highlighted

Nupur_Jain

MVP

28-07-2020

Hi @trc41594544 

 

Can you check if there is any filter rule to block /services/ request in dispatcher.any file? As you mentioned that there is no entry in access.log, it is more likely that the request is not even going to publisher and 404 is being thrown by dispatcher.

 

Check /filter section of the dispatcher to check for rule which might look like this:

/0012 { /type "deny" /method "GET" /url "/services/*" }

 

Hope it helps!

Thanks!

Nupur

Highlighted

Nupur_Jain

MVP

28-07-2020

Hi @trc41594544 

 

can you then check if path /services/ is present "Exceutions Paths" in "Apache Sling Servlet/Script Resolver and Error Handler" configuration.

Refer the below screenshot:


Screenshot from 2020-07-28 20-05-50.png

Highlighted

sunjot16

Employee

28-07-2020

You can check how your request is being processed/forwarded in /system/console/requests console.

 

You can also check the incoming requests in request.log, access.log and the reason for failure in error.log.

 

Also try enabling DEBUG logger for your custom servlet. That may also help.

 

Hope these help. 🙂