Dispatcher access issue for etc node

Avatar

Avatar
Ignite 1
Level 1
rahulb31017943
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile

Avatar
Ignite 1
Level 1
rahulb31017943
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile
rahulb31017943
Level 1

12-01-2021

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.

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

647 likes

Total Posts

607 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile

Avatar
Establish
MVP
BrianKasingli
MVP

Likes

647 likes

Total Posts

607 posts

Correct reply

239 solutions
Top badges earned
Establish
Ignite 1
Give Back 5
Give Back 3
Give Back 10
View profile
BrianKasingli
MVP

12-01-2021

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. 

 

Answers (3)

Answers (3)

Avatar

Avatar
Validate 1
MVP
ArpitVarshney
MVP

Likes

136 likes

Total Posts

185 posts

Correct reply

36 solutions
Top badges earned
Validate 1
Establish
Give Back 5
Give Back 3
Give Back 25
View profile

Avatar
Validate 1
MVP
ArpitVarshney
MVP

Likes

136 likes

Total Posts

185 posts

Correct reply

36 solutions
Top badges earned
Validate 1
Establish
Give Back 5
Give Back 3
Give Back 25
View profile
ArpitVarshney
MVP

12-01-2021

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

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,141 likes

Total Posts

3,167 posts

Correct reply

1,084 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Coach
Employee
Jörg_Hoh
Employee

Likes

1,141 likes

Total Posts

3,167 posts

Correct reply

1,084 solutions
Top badges earned
Coach
Give back 600
Ignite 5
Ignite 3
Ignite 1
View profile
Jörg_Hoh
Employee

18-01-2021

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

Avatar
Ignite 1
Level 1
rahulb31017943
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile

Avatar
Ignite 1
Level 1
rahulb31017943
Level 1

Likes

0 likes

Total Posts

12 posts

Correct reply

0 solutions
Top badges earned
Ignite 1
Give Back
View profile
rahulb31017943
Level 1

21-01-2021

@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.