Hi All,
I am trying to configure Apache webserver(2.4) with Dispatcher(4.3.3) in AEM 6.5 using with docker image and container. When I execute container I am able to see requirest are going through server.For the first time error-log, access-log and dispatcher.log got created.Also I can see dispatcher initlizing messge as below.
Dispatcher initializing (build 4.3.3/apache-2.4-linux-x86_64)
[Thu Jan 02 20:51:57 2020] [D] [pid 1] farms[publish].cache.docroot = /var/www/html
[Thu Jan 02 20:51:57 2020] [I] [pid 1] Dispatcher initialized (build 4.3.3/apache-2.4-linux-x86_64)
[Thu Jan 02 20:51:57 2020] [D] [pid 1] HTTP keepalive is enabled, timeout is 60 seconds.
[Thu Jan 02 20:51:57 2020] [D] [pid 1] Dispatcher initializing (build 4.3.3/apache-2.4-linux-x86_64)
[Thu Jan 02 20:51:57 2020] [D] [pid 1] farms[publish].cache.docroot = /var/www/html
[Thu Jan 02 20:51:57 2020] [I] [pid 1] Dispatcher initialized (build 4.3.3/apache-2.4-linux-x86_64)
[Thu Jan 02 20:51:57 2020] [D] [pid 1] HTTP keepalive is enabled, timeout is 60 second
When I try to access any page hen dispatcher.log is not getting updated or any request or anything else.
does it mean my dispatcher working fine or not?
Solved! Go to Solution.
Views
Replies
Total Likes
Try accessing your dispatcher using In-Private browser tab, if you have any login cookies dispatcher will not cache things.
Thank you @ArpitVarshney.
@arunaaems506124 you can pull the dispatcher image from docker hub https://hub.docker.com/r/aemdesign/dispatcher
I have also updated it to ensure you can get JSON log output so that it can be easily consumed by log parsers. This is not as straight forward for dispatcher as it is for Apache.
Hope you find this useful.
Can you check and update below things:
Regards,
Arpit Varshney
Views
Replies
Total Likes
Views
Replies
Total Likes
Thanks for the reply.
Please find below info on your queries.
$ docker info
Client:
Debug Mode: false
Server:
Containers: 28
Running: 4
I am trying to access dispatcher :http://localhost:8089/content/we-retail.html
since i exposed port 8089 while creating docker container.
Httpd configuration :
<VirtualHost *:8089>
ServerName localhost
DocumentRoot /var/www/html
RewriteEngine on
RewriteRule ^/(.*)\.html$ /content/we-retail/$1.html [PT]
<Directory />
<IfModule disp_apache2.c>
SetHandler dispatcher-handler
ModMimeUsePathInfo On
</IfModule>
Options FollowSymLinks
AllowOverride None
</Directory>
</VirtualHost>
Dispatcher.any configuration
/rend01
{
# Hostname or IP of the render
/hostname "localhost"
# Port of the render
/port "4503"
# Connect timeout in milliseconds, 0 to wait indefinitely
/timeout "0"
# always resolve hostname
#/always-resolve "${RENDERER_RESOLVE}"
# specifies the time in milliseconds that a response is allowed to take. The default is "600000", causing Dispatcher to wait for 10 Minutes. A setting of "0" eliminates the timeout completely.
# If the timeout is reached while parsing response headers, an HTTP Status of 504 (Bad Gateway) is returned. If the timeout is reached while the response body is read, the Dispatcher will return the incomplete response to the client but delete any cache file that might have been written.
/receiveTimeout "600000"
#Specifies whether Dispatcher uses the getaddrinfo function (for IPv6) or the gethostbyname function (for IPv4) for obtaining the IP address of the render.
/ipv4 "0"
}
Virtualhost:
# Entries will be compared against the "Host" request header
# and an optional request URL prefix.
#
# Examples:
#
# www.company.com
# intranet.*
# myhost:8888/mysite
"*"
Views
Replies
Total Likes
Are you able to see your pages in webserver? try to change the dispatcher log level to debug and check.
Here is a sample configuration for dispatcher in httpd.conf:
... <IfModule disp_apache2.c> # location of the configuration file. eg: 'conf/dispatcher.any' DispatcherConfig conf/dispatcher.any # location of the dispatcher log file. eg: 'logs/dispatcher.log' DispatcherLog '|/usr/local/apache/bin/rotatelogs /var/logs/%Y-%m-%d-dispatcher.log 86400 -240' # log level for the dispatcher log # 0 Errors # 1 Warnings # 2 Infos # 3 Debug DispatcherLogLevel 3 # if turned to 1, the dispatcher looks like a normal module DispatcherNoServerHeader 0 # if turned to 1, request to / are not handled by the dispatcher # use the mod_alias then for the correct mapping DispatcherDeclineRoot 0 # if turned to 1, the dispatcher uses the URL already processed # by handlers preceeding the dispatcher (i.e. mod_rewrite) # instead of the original one passed to the web server. DispatcherUseProcessedURL 0 </IfModule>
If you wanted to see more what AEM and docker can do together. I would recommend you to go and explore AEM.design framework:
https://github.com/aem-design/aemdesign-aem-core
https://hub.docker.com/r/aemdesign/dispatcher
you can run the Docker bundle image to check it out in the showcase site, read this to get started https://aem.design/blog/2019/08/30/docker-aem-bundle
Please share your feedback as well.We are happy to help you out.
FYI @MaxBarrass
Views
Replies
Total Likes
Try accessing your dispatcher using In-Private browser tab, if you have any login cookies dispatcher will not cache things.
Thank you @ArpitVarshney.
@arunaaems506124 you can pull the dispatcher image from docker hub https://hub.docker.com/r/aemdesign/dispatcher
I have also updated it to ensure you can get JSON log output so that it can be easily consumed by log parsers. This is not as straight forward for dispatcher as it is for Apache.
Hope you find this useful.