2017-08-02 47 views
0

代理Memcache_Servers服務器沒有可用的服務器,當我開始haproxy.service:代理Memcache_Servers沒有可用

[[email protected] log]# systemctl restart haproxy.service 
Message from [email protected] at Aug 2 10:49:23 ... 
haproxy[81665]: proxy Memcache_Servers has no server available! 

配置在我haproxy.cfg:最後

listen Memcache_Servers 
    bind 45.117.40.168:11211 
    balance roundrobin 
    mode tcp 
    option tcpka 
    server ha-node1 ha-node1:11211 check inter 10s fastinter 2s downinter 2s rise 30 fall 3 
    server ha-node2 ha-node2:11211 check inter 10s fastinter 2s downinter 2s rise 30 fall 3 
    server ha-node3 ha-node3:11211 check inter 10s fastinter 2s downinter 2s rise 30 fall 3 

回答

0

,我找到了在我的主機IP如下:

[[email protected] sysconfig]# cat /etc/hosts 
127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 
::1   localhost localhost.localdomain localhost6 localhost6.localdomain6 
192.168.8.101 ha-node1 ha-node1.aa.com 
192.168.8.102 ha-node2 ha-node2.aa.com 
192.168.8.103 ha-node3 ha-node3.aa.com 
45.117.40.168 ha-vhost devops.aa.com 
192.168.8.104 nfs-backend backend.aa.com 

但在我的/etc/sysconfig/memcached,我p不是之前的主機IP,所以我改了IP的主機:

enter image description here

現在我重新啓動Memcached和HAProxy的,現在它工作正常。