haproxy 启动报错,无法绑定端口

三次方

关注

阅读 171

2022-05-17

1.首选排查是否有端口占用(没有发现问题)
netstat -ano | grep XXX
2.查看 message 日志存在如下错误信息:
SELinux is preventing /usr/sbin/httpd from name_bind access on the tcp_socket port XXX
因此可以确认SELinux 导致了这个问题,解决办法有2个
a.setenforce 0 (临时修改)
b.semanage port -a -t http_port_t -p tcp XXXX 添加端口的上下文

精彩评论(0)

0 0 举报