我在集群configuration的JBOSS 5.2应用服务器前面使用了Apache 2.2。 群集configuration的两个节点驻留在不同的主机上。 此configuration托pipe在Linux服务器上。
在此configuration中,我使用位于Web服务器和Jboss应用程序服务器之间的BIG IP(F5)负载平衡器。
在其中一个应用程序服务器故障切换的情况下,负载平衡工作正常,并将请求从集群的一个节点路由到另一个节点。 但是,我的Apache Web服务器无法将请求路由到群集的工作节点,并给出请求的应用程序服务器不可伸缩的错误。 但是,当我重新启动Apache服务器似乎工作正常,我能够访问该应用程序。
看来,Apache正在caching的应用程序服务器的url和caching不刷新时,我尝试访问故障转移发生后的Web服务器的URL。
下面是我使用的httpd.confconfiguration:
<VirtualHost 10.38.205.100:443> 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 SSLCipherSuite ALL:!ADH:!EXPORT:!SSLv2:RC4+RSA:+HIGH:+MEDIUM #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 </Proxy> ## 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 </Location> <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" </IfModule> </VirtualHost>
请纠正我,如果我在某个地方错了。 任何帮助,将不胜感激 。 谢谢 ..!!
在互联网上进行了大量的研究之后,昨天我才解决了这个问题。 这个问题似乎与DNScaching。 我的apache服务器无法解决故障转移的情况下的DNS条目,它使用陈旧的DNS条目,并指向失败的节点。 当我重新启动Apache服务器,它是能够parsing正确的DNS条目,并完全正常工作。为了摆脱重新启动到Apache服务器的情况下,故障转移我已经使用了一个参数“disablereuse = On”随着ProxyPass参数如下: ProxyPass / https:// myapp.abc.stg.asd:8443 / disablereuse = on现在apache在故障转移的情况下工作正常。