I'm running haproxy 1.5.14 on Centos 7.1. Here's my config:
global
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
user haproxy
group haproxy
maxconn 4096
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
stats socket /var/lib/haproxy/stats mode 666 level admin
defaults
log global
option dontlognull
maxconn 2000
retries 3
timeout connect 5s
timeout client 1m
timeout server 1m
option redispatch
balance roundrobin
listen stats
mode http
bind 0.0.0.0:3212
timeout connect 5s
timeout client 1m
timeout server 1m
stats enable
stats uri /
stats refresh 5s
frontend registry
bind 192.168.1.43:5001
mode http
bind localhost:5001
default_backend registry
backend registry
mode http
server my-server:5000_my-server my-server:5000 cookie my-server:5000_my-server check inter 30s fastinter 2s rise 1 fall 3
I can ping and do nslookup's on my-server fine but when I start haproxy I'm getting the following error:
Jun 8 17:50:28 localhost haproxy-systemd-wrapper: [ALERT] 159/175028 (13407):
parsing [/etc/haproxy/haproxy.cfg:42] : 'server my-server:5000_my-server' : invalid address: 'my-server' in 'my-server:5000'
When I add my-server to /etc/hosts HAProxy works fine. However, I've got additional services/servers to add an I need DNS resolution working for this.
How can I get haproxy to talk to my DNS server to resolve my hostnames?
Recent Questions...
ما را در سایت Recent Questions دنبال میکنید
برچسب:
نویسنده: استخدام کار
بازدید: 212
تاريخ: پنجشنبه
20 خرداد
1395 ساعت: 5:28