Apache作為負載平衡器的一個配置問題導致的無法啟動

來源:互聯網
上載者:User

標籤: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作為負載平衡器的一個配置問題導致的無法啟動

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.