Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I know there are other questions on this but I can't find a resolution.

I've installed Memcached on a server running Ubuntu and I'm trying to use it.

I've attempted to start it using:

$ memcached -d -p 11211

I cannot access it using the PHP client from scripts or from Telnet o server 11211

Port 11211 is forwarded from the router.

What do I need to do to get it to work?

Edit: I've since enabled ufw and added the ports to be allowed with no difference made to the result.

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Check memcached process:

$ ps aux | grep -E "[m]emcached"
hiemye     921  0.0  0.3  44040   868 ?        Ssl  12:31   0:00 memcached -d -p 11211

Check listen address:

$ lsof -np `pgrep memcached`
COMMAND   PID   USER   FD   TYPE     DEVICE SIZE/OFF   NODE NAME
memcached 921 hiemye   26u  IPv4       4449      0t0    TCP *:11211 (LISTEN)
memcached 921 hiemye   27u  IPv6       4450      0t0    TCP *:11211 (LISTEN)
memcached 921 hiemye   28u  IPv4       4453      0t0    UDP *:11211 
memcached 921 hiemye   29u  IPv6       4454      0t0    UDP *:11211

Add allow ufw rules:

ufw allow in proto tcp from 192.168.0.2/32 to 192.168.0.1/32 port 11211
192.168.0.2 - client ip
192.168.0.1 - server ip
share|improve this answer
    
It doesn't appear to be on properly. Is it not working because I'm trying to access it over a network rather than from php sat on the same server? –  bcmcfc Dec 8 '10 at 15:05
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.