我正在尝试在 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 级管理员

在本地计算机上没有必要的权限。一旦设置好,它就可以正常启动。

关于cygwin - 无法在 Cygwin 上启动 HAProxy,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/13317797/

10-11 04:51
查看更多