2012-11-10 64 views
3

我試圖在Cygwin上啓動HAProxy。當我這樣做,我得到如下回應:Cygwin上無法啓動HAProxy

$ /usr/local/sbin/haproxy -f /usr/local/sbin/haproxy.cfg 
[ALERT] 313/180006 (4008) : cannot change UNIX socket ownership 
          (/tmp/haproxy.socket). Aborting. 
[ALERT] 313/180006 (4008) : [/usr/local/sbin/haproxy.main()] 
          Some protocols failed to start 
          their listeners! Exiting. 

看起來它是由於我的配置文件中的以下行,當我要毀掉這是啓動:

stats socket /tmp/haproxy.socket uid haproxy mode 770 level admin 

整個配置:

global 
log 127.0.0.1 local0 info 
stats socket /tmp/haproxy.socket uid haproxy mode 770 level admin 
maxconn 1000 
daemon 

defaults 
log global 
mode tcp 
option tcplog 
option dontlognull 
retries 3 
option redispatch 
maxconn 1000 
timeout connect 5s 
timeout client 120s 
timeout server 120s 

listen rabbitmq_local_cluster 127.0.0.1:5555 
mode tcp 
balance roundrobin 
server rabbit_0 127.0.0.1:5673 check inter 5000 rise 2 fall 3 
server rabbit_1 127.0.0.1:5674 check inter 5000 rise 2 fall 3 

listen private_monitoring 127.0.0.1:8100 
mode http 
option httplog 
stats enable 
stats uri /stats 
stats refresh 5s 

任何想法,將不勝感激,謝謝!按照我的預期,簡單的答案是

回答

3

簡單的答案。我的用戶「HAProxy的」,這是有問題的行中引用:

統計插座/tmp/haproxy.socket的uid HAProxy的模式770級admin

沒有在本地計算機上的必要的權限。一旦建立起來,它開始很好。

1

很高興知道它仍然在cygwin上工作,haproxy的這個版本是什麼?我不知道在Windows上BTW支持UNIX套接字。或者,也許他們通過命名管道模擬?

+0

嗨@Willy Tarreau,它的HAP 1.4.22。不知道在Unix套接字的問題,因爲我知道很少關於這個問題(因此noob問題)。我只是想設置一個本地LB來測試RabbitMQ集羣,Cygwin/HAP組合被推薦爲相對容易的解決方案。我使用的配置主要是一個例子中的剪切和粘貼。如果你有任何知識傳授這個問題,它將不勝感激。謝謝! – swannee