標籤:blog http io ar os 使用 sp on 檔案
日前,使用apache作為某叢集的負載平衡器,按照相關的配置,在調整了相關內容後,對apache的httpd.conf檔案進行調整。加入以下內容:
<VirtualHost *:80>ProxyRequests offProxyPass / balancer://lfCluster/ stickysession=JSESSIONID nofailover=off<Proxy balancer://lfCluster>BalancerMember http://172.18.2.80:6888 loadfactor=1 route=proxyserver1 BalancerMember http://172.18.2.63:6888 loadfactor=1 route=proxyserver1 </Proxy></VirtualHost>
在加入上如內容後,本來正常的apache無法啟動了!
查看apache的後端日誌error.log,發現有以下內容:
[Tue Dec 09 10:34:51 2014] [notice] Parent: Received restart signal -- Restarting the server.
Syntax error on line 499 of C:/Apache2.2/conf/httpd.conf:
BalancerMember can not have a balancer name when defined in a location
[Tue Dec 09 10:34:51 2014] [notice] Child 3432: Exit event signaled. Child process is ending.
[Tue Dec 09 10:34:51 2014] [warn] (OS 995)由於線程退出或應用程式請求,已中止 I/O 操作。 : winnt_accept: Asynchronous AcceptEx failed.
看起來是剛增加的這些配置的問題,發生問題的499行,即是:
BalancerMember http://172.18.2.80:6888 loadfactor=1 route=proxyserver1
而異常內容是:BalancerMember can not have a balancer name when defined in a location。仔細看了下,並google一下,確認可能是某些地方的字元不準確造成的。
於是排場本行內容,發現最後對了一個空格!
去掉空格,儲存,重啟apache。
OK!
Apache作為負載平衡器的一個配置問題導致的無法啟動