Cygwin上无法启动HAProxy
问题描述:
我试图在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
任何想法,将不胜感激,谢谢!按照我的预期,简单的答案是
答
简单的答案。我的用户“HAProxy的”,这是有问题的行中引用:
统计插座/tmp/haproxy.socket的uid HAProxy的模式770级admin
没有在本地计算机上的必要的权限。一旦建立起来,它开始很好。
答
很高兴知道它仍然在cygwin上工作,haproxy的这个版本是什么?我不知道在Windows上BTW支持UNIX套接字。或者,也许他们通过命名管道模拟?
嗨@Willy Tarreau,它的HAP 1.4.22。不知道在Unix套接字的问题,因为我知道很少关于这个问题(因此noob问题)。我只是想设置一个本地LB来测试RabbitMQ集群,Cygwin/HAP组合被推荐为相对容易的解决方案。我使用的配置主要是一个例子中的剪切和粘贴。如果你有任何知识传授这个问题,它将不胜感激。谢谢! – swannee