我试图用一个“空”配置文件启动haproxy (版本1.5.8 2014/10/31),我得到:
user@server:~$ sudo service haproxy start
[....] Starting haproxy: haproxy[ALERT] 126/120540 (7363) : Starting frontend GLOBAL: cannot bind UNIX socket [/run/haproxy/admin.sock]虽然它已经启用了:
user@server:~$ cat /etc/default/haproxy
# Set ENABLED to 1 if you want the init script to start haproxy.
ENABLED=1配置文件:
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
stats socket /run/haproxy/admin.sock mode 660 level admin
stats timeout 30s
user haproxy
group haproxy
daemon
# Default SSL material locations
ca-base /etc/ssl/certs
crt-base /etc/ssl/private
# Default ciphers to use on SSL-enabled listening sockets.
# For more information, see ciphers(1SSL).
ssl-default-bind-ciphers kEECDH+aRSA+AES:kRSA+AES:+AES256:RC4-SHA:!kEDH:!LOW:!EXP:!MD5:!aNULL:!eNULL
ssl-default-bind-options no-sslv3
defaults
log global
mode http
option httplog
option dontlognull
timeout connect 5000
timeout client 50000
timeout server 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http有人知道为什么不能开始吗?
发布于 2015-10-27 02:35:56
Haproxy需要写到/run/haproxy/admin.sock,但是它不会为您创建目录。首先创建目录/run/haproxy/或将stats socket设置为不同的路径。
发布于 2017-03-27 19:24:28
我遇到了这个问题,必须删除/run/haproxy/admin.sock文件,HAProxy才能成功地重新启动。我只能认为它在我中止了一个yum update命令后就被破坏了。糟了!
发布于 2021-10-14 22:14:07
在将pfSense从2.4.5更新到2.5.2之后,我就面临着这个问题。正如@datacarl所说,使用来自mkdir -p /run/haproxy/的命令pfSense非常有效。
https://stackoverflow.com/questions/30101075
复制相似问题