码迷,mamicode.com
首页 > 其他好文 > 详细

haproxy 无法启动,需要添加内核参数

时间:2019-02-13 10:54:12      阅读:654      评论:0      收藏:0      [点我收藏+]

标签:nod   ystemd   failure   rabbitmq   unit   not   app   bit   failed   

安装好haproxy后,配置正确无法启动,看日志:

Feb 13 09:32:50 cluster-node2 systemd: Started HAProxy Load Balancer.
Feb 13 09:32:50 cluster-node2 haproxy-systemd-wrapper: [ALERT] 043/093250 (6538) : Starting proxy mysql-pxc-cluster: cannot bind socket [192.168.22.30:3306]
Feb 13 09:32:50 cluster-node2 haproxy-systemd-wrapper: [ALERT] 043/093250 (6538) : Starting proxy rabbitmq-cluster: cannot bind socket [192.168.22.30:5673]
Feb 13 09:32:50 cluster-node2 haproxy-systemd-wrapper: [ALERT] 043/093250 (6538) : Starting proxy rabbitmq-cluster-management: cannot bind socket [192.168.22.30:15673]
Feb 13 09:32:50 cluster-node2 haproxy-systemd-wrapper: haproxy-systemd-wrapper: exit, haproxy RC=1
Feb 13 09:32:50 cluster-node2 systemd: haproxy.service: main process exited, code=exited, status=1/FAILURE
Feb 13 09:32:50 cluster-node2 systemd: Unit haproxy.service entered failed state.
Feb 13 09:32:50 cluster-node2 systemd: haproxy.service failed.

解决:
vim /etc/sysctl.conf
net.ipv4.ip_nonlocal_bind=1

然后sysctl -p
成功启动

haproxy 无法启动,需要添加内核参数

标签:nod   ystemd   failure   rabbitmq   unit   not   app   bit   failed   

原文地址:http://blog.51cto.com/huwei555/2349627

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!