Install the Apache server and mod_jk module.
On Fedora, the package containing Apache HTTP Server is named httpd.
You will probably need to build and install mod_jk from sources. In this case, the httpd-devel package might be useful.
Verify that the
mod_jk.so file is existing in
On Ubuntu, the packages are named apache2 and libapache2-mod-jk.
Set up Apache to use
If you use Fedora and recent version of Apache (2.2+), put the
Do not forget to load the module by appending the following line to
LoadModule jk_module modules/mod_jk.so
mod-jk.conf file looks like this:
... JkWorkersFile workers.properties # Where to put jk logs JkLogFile /var/log/apache2/mod_jk.log # Set the jk log level [debug/error/info] JkLogLevel debug # Select the log format JkLogStampFormat "[%a %b %d %H:%M:%S %Y]" # JkOptions indicates to send SSK KEY SIZE JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories # JkRequestLogFormat #JkRequestLogFormat "%w %V %T" JkMountFile uriworkermap.properties # Add shared memory. # This directive is present with 1.2.10 and # later versions of mod_jk, and is needed for # for load balancing to work properly JkShmFile /var/log/apache2/jk.shm # Add jkstatus for managing runtime data <Location /jkstatus/> JkMount status </Location> ...
In Ubuntu, typically during installation of libapache2-mod-jk, the mod_jk is enabled automatically,
as well as their symlinks under
You need to edit
/etc/apache2/mods-available/jk.conf with the content above.
Set up workers in
/etc/apache2/ for Ubuntu) and
In this step, use the node names which are assigned to -Djboss.node.name.
workers.properties file looks like this:
# Define list of workers that will be used # for mapping requests worker.list=loadbalancer,status # modify the host as your host IP or DNS name worker.node1.port=8009 worker.node1.host=192.168.210.101 worker.node1.type=ajp13 worker.node1.lbfactor=1 ## modify the host as your host IP or DNS name worker.node2.port=8009 worker.node2.host=192.168.210.102 worker.node2.type=ajp13 worker.node2.lbfactor=1 # Load-balancing behaviour worker.loadbalancer.type=lb worker.loadbalancer.method=Session worker.loadbalancer.balance_workers=node1,node2 worker.loadbalancer.sticky_session=1 #worker.list=loadbalancer worker.status.type=status
uriworkermap.properties file should look like this:
/portal=loadbalancer /portal/*=loadbalancer /eXo*=loadbalancer /eXoResources*/*=loadbalancer /exo*=loadbalancer /exo*/*=loadbalancer /web=loadbalancer /web/*=loadbalancer /integration=loadbalancer /integration/*=loadbalancer /dashboard=loadbalancer /dashboard/*=loadbalancer /rest=loadbalancer /rest/*=loadbalancer /jpp_branding_skin|/*=loadbalancer /jpp-branding-skin|/*=loadbalancer /jpp-branding-extension|/*=loadbalancer /status=status /status/*=status
You have configured everything properly, but are still unable to access the portal via Apache.
When accessing eXo Platform via Apache, you get the "503 Service Temporarily Unavailable" response.
The cluster itself is working and you can access individual eXo Platform nodes directly.
mod_jk is working,
but Tomcat is reported as likely not to be running on the specified port.
If you are using Fedora, SELinux might be stopping https from accessing something important, e.g. jk.shm. Check SELinux alerts to see if that is the case.
Ideally, you would create a policy to deal with this. A quick workaround is to temporarily disable SELinux to allow Apache
to initialize the
mod_jk connector properly. You can do this using the following command: