Error when starting Memcached: failed to listen [closed]

流过昼夜 提交于 2019-12-12 14:32:56

问题


I have run Memcached on my Server for 2 month. Yesterday it stopped working. No idea why. So I tried:

root@xyz:~# killall memcached
root@xyz:~# /etc/init.d/memcached stop
Stopping memcached: memcached.
root@xyz:~# memcached -d -m 128 -l 127.0.0.1 -p 11211 -vv -u www-data
bind(): Address already in use
failed to listen
root@xyz:~# memcached -u www-data -vv
bind(): Address already in use
failed to listen

Any idea?


回答1:


Make sure that memcached is not running.

ps auxw | grep memcached

If you find any process, kill it with kill -9 (to make sure it REALLY is killed):

kill -9 insert-your-PID-of-running-memcached-here

If you still can't start memcached, look if there's anything else listening on port 11211:

netstat -A -n | grep 11211

Also, this questions belongs to Serverfault, because it's not a programming question.



来源:https://stackoverflow.com/questions/1998819/error-when-starting-memcached-failed-to-listen

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!