Ask Your Question

memcached.service is active, but in the haproxy web page they are down

asked 2017-08-01 20:21:27 -0500

liaodalin19903 gravatar image

The three nodes memcached.service is active(running):

[root@ha-node3 my.cnf.d]# systemctl status   memcached.service
● memcached.service - memcached daemon
   Loaded: loaded (/usr/lib/systemd/system/memcached.service; enabled; vendor preset: disabled)
   Active: active (running) since Wed 2017-08-02 01:01:29 CST; 6min ago
 Main PID: 13329 (memcached)
   CGroup: /system.slice/memcached.service
           └─13329 /usr/bin/memcached -p 11211 -u memcached -m 1024 -c 8192 -l,::1, -t 4 -I 10m

Aug 02 01:01:29 ha-node3 systemd[1]: Started memcached daemon.
Aug 02 01:01:29 ha-node3 systemd[1]: Starting memcached daemon...

but in the haproxy web, the three nodes all is down.

enter image description here


I found the Memcache_Servers configuration in the /etc/haproxy/haproxy.cfg the port is 22122(I write wrong), so I changed to 11211, and restart the haproxy, but still not work.

listen Memcache_Servers
  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
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted

answered 2017-08-01 23:18:50 -0500

liaodalin19903 gravatar image

At last, I found the ip in my hosts is like below:

[root@ha-node1 sysconfig]# cat /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 ha-node1 ha-node2 ha-node3 ha-vhost nfs-backend

But in my /etc/sysconfig/memcached, the ip is not the host ip before, so I changed to the ip in the hosts:

image description

Now I restart the memcached and haproxy, it works normal now.

edit flag offensive delete link more


Just adding an update for my environment since the syntax seems slightly different (Ocata on openSUSE Leap-42.3):


So instead of replacing the localhost adding the management ip did the trick for me.

eblock gravatar imageeblock ( 2018-03-06 09:04:39 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools



Asked: 2017-08-01 20:21:27 -0500

Seen: 319 times

Last updated: Aug 01 '17