Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session
SOLVED

Dispatcher access issue for etc node

Avatar

Level 2

Hi,

I am trying to read a property from /etc/abx/xyz/*   path which has stored data through the system user. I am fetching the node property value through the sling model on a page where I want to use this data,  It is working fine both in local and publish instances but when I check on dispatcher it is not working. I have checked the dispatcher logs which show a 404 not found message.

I have added a filter rule i.e is /0151 { /type "allow" /url "/etc/abx/*" }, it is not working.

Can anyone help me with this.

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Your dispatcher.any configuration looks correct. The best way to pinpoint the underlying cause of this issue will be to debug this. Enable your Apache web server and dispatcher logs, try the configurations below. At the same time, in your AEM development environment tail /crx-quickstart/logs/error.log. WIth all these logs available to you, the cause will present itself immediately. Good luck!

<IfModule disp_apache2.c>
...
DispatcherLogLevel 4 // trace mode
</IfModule>

...
<VirtualHost>
...
LogLevel info rewrite:trace5
</VirtualHost>

The logs would give you a detailed explanation of whether the resource has constraints or not. 

 

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @rahulb31017943 

 

I have just noticed that you want to read a property located at /etc/abx/xyz/* and the corresponding dispatcher rule is /0151 { /type "allow" /url "/etc/xyz/*" } which doesn't seem to be right to allow /etc/abx/xyz/*. Could you please try updating your rule like below:

/0151 { /type "allow" /url "/etc/abx/xyz/*" }

 

Regards,

Arpit

 

Avatar

Correct answer by
Community Advisor

Your dispatcher.any configuration looks correct. The best way to pinpoint the underlying cause of this issue will be to debug this. Enable your Apache web server and dispatcher logs, try the configurations below. At the same time, in your AEM development environment tail /crx-quickstart/logs/error.log. WIth all these logs available to you, the cause will present itself immediately. Good luck!

<IfModule disp_apache2.c>
...
DispatcherLogLevel 4 // trace mode
</IfModule>

...
<VirtualHost>
...
LogLevel info rewrite:trace5
</VirtualHost>

The logs would give you a detailed explanation of whether the resource has constraints or not. 

 

Avatar

Employee Advisor

If I understand you correctly, you are doing this access as part of a SlingModel, meaning that your browser does not a request to /etc/. Is that correct?

Because in that case the dispatcher itself is not involved, because it just receives a HTML response from publish, and the dispatcher does not know how the publish internally assembled this response. In that case your problem is different.

Avatar

Level 2

@Jörg_Hoh 

Thank you Jorg.

Yes, we are using the sling model to read etc property data, If we move the same data to /content folder then sling model is able to read the data and display it on the page.