haproxy无法启动,报cannot bind UNIX socket [/var/run/haproxy/info.sock

LINUX 专栏收录该内容
132 篇文章 1 订阅

haproxy无法启动,报cannot bind UNIX socket [/var/run/haproxy/info.sock 

[root@localhost haproxy]# systemctl restart haproxy.service
[root@localhost haproxy]# systemctl status haproxy.service
● haproxy.service - HAProxy Load Balancer
   Loaded: loaded (/usr/lib/systemd/system/haproxy.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Wed 2019-11-06 12:54:34 CST; 1s ago
  Process: 22122 ExecStart=/usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid $OPTIONS (code=exited, status=1/FAILURE)
 Main PID: 22122 (code=exited, status=1/FAILURE)

Nov 06 12:54:34 localhost.localdomain systemd[1]: Started HAProxy Load Balancer.
Nov 06 12:54:34 localhost.localdomain haproxy-systemd-wrapper[22122]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
Nov 06 12:54:34 localhost.localdomain haproxy-systemd-wrapper[22122]: [ALERT] 309/125434 (22123) : Starting frontend GLOBAL: cannot bind UNIX socket [/var/run/haproxy/info.sock]
Nov 06 12:54:34 localhost.localdomain haproxy-systemd-wrapper[22122]: haproxy-systemd-wrapper: exit, haproxy RC=1
Nov 06 12:54:34 localhost.localdomain systemd[1]: haproxy.service: main process exited, code=exited, status=1/FAILURE
Nov 06 12:54:34 localhost.localdomain systemd[1]: Unit haproxy.service entered failed state.
Nov 06 12:54:34 localhost.localdomain systemd[1]: haproxy.service failed.

处理方法:

mkdir /var/run/haproxy -p
touch /var/run/haproxy/info.sock

ok,问题解决

[root@localhost haproxy]# systemctl status haproxy.service
● haproxy.service - HAProxy Load Balancer
   Loaded: loaded (/usr/lib/systemd/system/haproxy.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2019-11-06 12:57:03 CST; 3s ago
 Main PID: 23089 (haproxy-systemd)
    Tasks: 3
   CGroup: /system.slice/haproxy.service
           ├─23089 /usr/sbin/haproxy-systemd-wrapper -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid
           ├─23090 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds
           └─23091 /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds

Nov 06 12:57:03 localhost.localdomain systemd[1]: Started HAProxy Load Balancer.
Nov 06 12:57:03 localhost.localdomain haproxy-systemd-wrapper[23089]: haproxy-systemd-wrapper: executing /usr/sbin/haproxy -f /etc/haproxy/haproxy.cfg -p /run/haproxy.pid -Ds

 

  • 1
    点赞
  • 0
    评论
  • 2
    收藏
  • 扫一扫,分享海报

参与评论 您还未登录,请先 登录 后发表或查看评论
©️2022 CSDN 皮肤主题:游动-白 设计师:我叫白小胖 返回首页
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值