Hi,
I'm running apache dispatcher on the same host as my publisher. When the dispatcher attempts to pull a page from the publisher, it gets a 401 error. On the publisher i see:
21.08.2015 12:31:16.389 *INFO* [qtp853142502-51] org.apache.sling.auth.core.impl.SlingAuthenticator handleLoginFailure: Unable to authenticate anonymous user: UserId/Password mismatch.
Why is the publisher requiring authentication from the dispatcher module, and how can i fix this?
Matt
Solved! Go to Solution.
The solution to my problem is as below:
WebServer conf under vhosts.d needs to have this entry for Authorization, else requests to AEM Publish from Dispatcher would not go as anonymous user rather it will be as none "-" user and hence the request will be rejected from AEM Publisher.
#This is required for Web Server to talk with AEM instance
RequestHeader unset Authorization
Have you selected SSL as default in 'transport' tab when you have set the flush agent in publish ?
Views
Replies
Total Likes
Hi,
what happens when you try to access the URL directly on the publish instance, does it require authentication?
When you try any other content, does it result in the same errors?
If you still have geometrixx, any issues accessing that content?
Regards,
Opkar
Views
Replies
Total Likes
also do you see any error in the dispatcher.log
Views
Replies
Total Likes
Hi,
I am facing same problem and I can access the URL directly on browser. But when the dispatcher is calling the AEM Publisher I see:
org.apache.sling.auth.core.impl.SlingAuthenticator handleLoginFailure: Unable to authenticate admin: UserId/Password
I checked the AEM Publish Dispatcher Flush and Test Connection is successful.
On access log I see when I hit the URL from browser, it serves 200 Ok and user is "anonymous". When the same is triggered internally from dispatcher to publisher, I see "-" (none) user
I did select SSL as default in 'Transport' tab when I set the flush agent in publish.
Dispatcher.log
============
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Found farm parts for dev.mysite.com
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] checking [/content/mysite/en.header.html]
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] cachefile does not exist: /opt/HTTPServer/vhosts/ssl.mysite.com/content/mysite/en.header.html
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] try to create new cachefile: /opt/HTTPServer/vhosts/ssl.mysite.com/content/mysite/en.header.html
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] cache-action for [/content/mysite/en.header.html]: CREATE
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Connected to backend rend01 (10.143.208.244:4503)
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: Authorization
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: Cache-Control
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: Pragma
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: User-Agent
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: Host
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: Accept
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: Via
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: X-Forwarded-For
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: X-Forwarded-SSL
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: X-Forwarded-SSL-Cipher
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: X-Forwarded-SSL-Session-ID
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] Adding request header: Server-Agent
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] response.status = 401
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] response.headers[Date] = "Fri, 07 Jul 2017 05:09:17 GMT"
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] response.headers[WWW-Authenticate] = "Basic realm="Sling (Development)""
[Fri Jul 07 05:09:17 2017] [D] [6862(140141883156224)] response.headers[X-Powered-By] = "Jetty(9.2.9.v20150224)"
[Fri Jul 07 05:09:17 2017] [I] [6862(140141883156224)] "GET /content/mysite/en.header.html" 401 - 4ms
AEM Publish Server access.log - Publisher called from dispatcher for first request after clearing cache on WebServer from eSpot
=======================================================================================================
This does not work or cache content on WebServer from the AEM Publisher.
11.114.208.244 - - 07/Jul/2017:15:44:06 +0000 "GET /content/mysite/en.header.html HTTP/1.1" 401 - "-" "Java/1.7.0"
11.114.208.244 - - 07/Jul/2017:15:44:07 +0000 "GET /content/mysite/en/espots/category.fragment.html HTTP/1.1" 401 - "-" "Java/1.7.0"
11.114.208.244 - - 07/Jul/2017:15:44:07 +0000 "GET /content/mysite/en.footer.html HTTP/1.1" 401 - "-" "Java/1.7.0"
AEM Publish Server access.log - Publisher called from dispatcher for first request after clearing cache on WebServer - eSpot URL is hit on browser directly
============================================================================================================================
https://dev.mysite.com/en.header.html - This was hit directly from browser - This works and content is cached from Publisher on to the WebServer
10.143.208.244 - anonymous 07/Jul/2017:15:51:52 +0000 "GET /content/mysite/en.header.html HTTP/1.1" 200 44011 "-" "Java/1.8.0_60"
Here it identifies the request user as anonymous, unlike when it does not work in first case. This also shows a different version of java.
Views
Replies
Total Likes
The solution to my problem is as below:
WebServer conf under vhosts.d needs to have this entry for Authorization, else requests to AEM Publish from Dispatcher would not go as anonymous user rather it will be as none "-" user and hence the request will be rejected from AEM Publisher.
#This is required for Web Server to talk with AEM instance
RequestHeader unset Authorization
Views
Likes
Replies