无法在Cygwin上启动HAProxy

时间:2012-11-10 00:02:24

标签: 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

任何想法都将不胜感激,谢谢!

2 个答案:

答案 0 :(得分:3)

简单回答,正如我所料。我的用户" haproxy"在有问题的行中引用:

stats socket /tmp/haproxy.socket uid haproxy 模式770级管理员

本地计算机上没有必要的权限。一旦设置好,它就会很好。

答案 1 :(得分:1)

很高兴知道它仍然适用于cygwin,这是什么版本的haproxy?我不知道Windows BTW支持UNIX套接字。或者也许它们是通过命名管道模拟的?

相关问题