Hi,
I am trying to set up a local dispatcher to debug some issue I have the flush agent set up on author AEM instance and my dispatcher is running on the Docker container. However, when I try to test the connection and getting a 403 error, I tried to add the local host and IP of the author instance in the client list but still seeing the same error any pointers here? seeing the same error any pointers here?
[core:notice] [pid 1:tid 281473475915864] AH00094: Command line: 'httpd -d /etc/httpd -f /etc/httpd/conf/httpd.conf -D FOREGROUND -D ENVIRONMENT_DEV'
[Thu Jan 18 20:52:04.446299 2024] [dispatcher:debug] [pid 283:tid 281473457761024] [client 192.168.65.1:39089] Found farm publishfarm for localhost, referer: about:blank
[Thu Jan 18 20:52:04.446348 2024] [dispatcher:debug] [pid 283:tid 281473457761024] [client 192.168.65.1:39089] checking [/dispatcher/invalidate.cache], referer: about:blank
[Thu Jan 18 20:52:04.446392 2024] [dispatcher:warn] [pid 283:tid 281473457761024] [client 192.168.65.1:39089] Flushing rejected from 192.168.65.1, referer: about:blank
192.168.65.1 "localhost" - [18/Jan/2024:20:52:04 +0000] "GET /dispatcher/invalidate.cache HTTP/1.1" 403 199 "about:blank" "Jakarta Commons-HttpClient/3.1"
[18/Jan/2024:20:52:04 +0000] "GET /dispatcher/invalidate.cache HTTP/1.1" 403 none [publishfarm/-] 1ms "localhost"
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
The Issue has been Resolved by adding the allow IP in the farm file rather than the invalidate_any file. For some Reason AEMaaCS local setup IP need to be mentioned in the farm file rather than the invalidate_any file.
@ragucis What are the steps that you followed to run dispatcher on Docker container?
FYI hope you followed below steps before you start your docker dispatcher instance ?
Yes i have followed the same steps as outlined below. Below is how my dispatcher is being run.
~/dispatcher-sdk-2.0.169 DISP_LOG_LEVEL=Debug REWRITE_LOG_LEVEL=Debug ./bin/docker_run.sh /Users/ragucis/Downloads/aem-guides-wknd-aem-guides-wknd-3.2.0/dispatcher/src host.docker.internal:4503 80
Hi @ragucis ,
This is mainly due to IP address through which you are allowing to trigger flush is not allowed.
For more info. on it you can have look into below article:-
https://sourcedcode.com/blog/aem/how-to-setup-the-aem-dispatcher-flush-agent
You can try to add below in your dispatcher file for time being:-
# The allowedClients section restricts the client IP addresses that are # allowed to issue activation requests. /allowedClients { # deny all clients /0000 { /glob "*" /type "allow" } }
Thanks
Tarun
i did try allowing all IP's with like you mentioned but still have the same issue.
Hi @ragucis ,
Can you also check if permission is provided to the user who is trying to initiate the flush action in useradmin console.
Please assign him the appropriate permission for content folder and etc folder.
Thanks
-Tarun
Hi @TarunKumar the user is an local admin and i am testing this on my local dispacther setup so there is no issues related to access on AEM. The error message is saying flushing has been rejected from the IP through everything is allowed.
@TarunKumar @Jagadeesh_Prakash ,
I am getting the same error when flushing using curl on local docker dispatcher.
curl -k -H "CQ-Action: DELETE" -H "CQ-Handle:/content/www" -H "Content-Length: 0" -H "Content-Type: application/octet-stream" http://localhost:80/dispatcher/invalidate.cache
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access this resource.</p>
</body></html>
@ragucis Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.
Views
Replies
Total Likes
The Issue has been Resolved by adding the allow IP in the farm file rather than the invalidate_any file. For some Reason AEMaaCS local setup IP need to be mentioned in the farm file rather than the invalidate_any file.
This is because of wrong credentials as Apache is password protected.
Views
Likes
Replies
Views
Likes
Replies