环境:
OS:centos 7
haproxy版本:1.5.4
nginx版本:1.9.6
问题:
haproxy跳转nginx的8080端口时,一切正常,改为跳转8090端口后,出现如下错误 。
localhost haproxy[3704]: Server main_listen/s1 is DOWN,
reason: Layer4 connection problem, info: "General socket error (Permission denied)", check duration: 0ms. 0 active and 0 backup servers left. 0 sessions active, 0 requeued, 0 remaining in queue.
目前关闭centos默认的firewalld后,访问nginx监控的8090端口,可以正常访问nginx首页。
haproxy配置:
global
log 127.0.0.1 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user root
group root
daemon
stats socket /var/lib/haproxy/stats
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
frontend main_front
bind 0.0.0.0:80
mode http
default_backend main_back
backend main_back
mode http
server s1 127.0.0.1:8090 check
麻烦各位帮忙看看了!