I am using Apache 2.2 in front of my JBOSS 5.2 application server in a cluster configuration . The two nodes of the cluster configuration resides on different host . This configuration is hosted on Linux servers .

In this configuration I am using a BIG IP (F5) Load Balancer , which sits in between the Web server and Jboss application servers .

In case of failover of one of the application server , the load balance is working fine and is routing the request from one node of cluster to the other node . But my apache web server is not able to route the request to working node of cluster and gives the error that the application server being requested is not rachable. However when I restart the apache server it seems to work fine and I am able to access the application .

It seems that apache is caching the the application server url and cache is not getting refreshed when I try to access the web server URL after the failover occurs .

Below is the httpd.conf configuration that I am using :

DocumentRoot /var/www
ErrorLog /etc/httpd/logs/error.log
TransferLog /etc/httpd/logs/access_log
CustomLog /etc/httpd/logs/ssl_access.log combined
# Enable Server on this Virtual host
SSLEngine on
# Disable SSLV2 in  favour of more robust SSLV3
SSLProtocol all -SSLv2
# List of supported cryptografic server cipher suites
#Apache Server certificate
SSLCertificateFile /home/users/domain.com.ssl/MyWebServer.crt
#Apache server private key
SSLCertificateKeyFile /home/users/domain.com.ssl/MyWebServer.key
#Chain Certificate
SSLCertificateChainFile /home/users/domain.com.ssl/cat.txt
# It's mandatory for apache to authenticate the client's certificates
SSLVerifyClient none
SSLVerifyDepth 10

ProxyRequests Off
ProxyPreserveHost On

<Proxy *>
Order deny,allow
Allow from all
## Load Balancer url : https://myapp.abc.stg.asd:8443/
SSLProxyEngine on
ProxyPass / https://myapp.abc.stg.asd:8443/
ProxyPassReverse / https://myapp.abc.stg.asd:8443/

<Location />
Order allow,deny
Allow from all

<IfModule mod_expires.c>
ExpiresActive On
ExpiresDefault "access plus 1 seconds"
ExpiresByType text/html "access plus 1 seconds"
ExpiresByType image/gif "access plus 120 minutes"
ExpiresByType image/jpeg "access plus 120 minutes"
ExpiresByType image/png "access plus 120 minutes"
ExpiresByType text/css "access plus 60 minutes"
ExpiresByType text/javascript "access plus 60 minutes"
ExpiresByType application/x-javascript "access plus 60 minutes"
ExpiresByType text/xml "access plus 60 minutes"

Please correct me If I am wrong somewhere . Any help would be appreciated . Thanks ..!!


After a lot of study on the Internet , I was able to resolve the issue yesterday . The issue seems to be with DNS caching . My apache server was not able to resolve the DNS entry in case of failover and it was using the stale DNS entry and pointing to the node wich has failed . And when I restart the apache server it was able to resolve correct DNS entry and works perfectly fine.To get rid of restarting to apache server in case of failover I have used one parameter "disablereuse=On" Along with ProxyPass parameter as below : ProxyPass / https:// myapp.abc.stg.asd:8443/ disablereuse=on Now apache is working fine in case of failover .

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.