Ask Your Question
1

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 127.0.0.1,::1,10.10.0.101 -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


EDIT-1

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

1 answer

Sort by » oldest newest most voted
1

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
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

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

Comments

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

MEMCACHED_PARAMS="-l 127.0.0.1,<MANAGEMENT_IP>"

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

2 followers

Stats

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

Seen: 205 times

Last updated: Aug 01 '17