Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: memcached
PostPosted: Thu Apr 22, 2010 9:49 pm 
Offline
Senior Newbie

Joined: Fri Apr 02, 2010 3:17 pm
Posts: 13
Trying to set up memcached to share memory between two nodes, I'm having a problem making a connection on port 11211 with one of them. When I run netstat on both nodes, I get:

tcp 0 0 localhost:11211 *:* LISTEN 16952/memcached

tcp 0 0 *:11211 *:* LISTEN 19278/memcached

The first node above can connect to the second, but the second can't connect to the first. Same with telnet. The way I read that is the ports are bound to different servers? On the first 11211 is bound to localhost, the other it's allowing a connection from all (*)?

Am I on the right track, and if so, any idea how to change the first node to accept connections from all?

Thanks.


Top
   
 Post subject:
PostPosted: Fri Apr 23, 2010 1:11 am 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Your assumption looks correct, the first is bound to localhost the second is bound to any ip.

Memcached should not be exposed to the internet so make sure that you have iptables blocking access from the world (and your "private" ip address if you have one, since it's private between all linode users).

You can open up the first one to use all addresses by removing the -l from memcached configuration line.


Top
   
 Post subject:
PostPosted: Fri Apr 23, 2010 12:45 pm 
Offline
Senior Newbie

Joined: Fri Apr 02, 2010 3:17 pm
Posts: 13
Thanks for the reply. Yes, I had thought of that, and tried it. But it doesn't work. If I configure with: "memcached -d -m 20" I still get the netstat below:

tcp 0 0 localhost:11211 *:* LISTEN 2769/memcached

When I enter another IP behind -l (I even tried -l *), the port still remains bound to localhost.

Both these machines are ubuntu karmic, and I set them up the same way. When I installed memcached, I took the same steps for both.

Any ideas?

Thanks.


Top
   
 Post subject:
PostPosted: Fri Apr 23, 2010 1:00 pm 
Offline
Senior Newbie

Joined: Fri Apr 02, 2010 3:17 pm
Posts: 13
okay. Researching this on the web, most information says the configuration is done at the command line. But there is in fact a config file at /etc/memcached.conf that was specifying the bind port. Easy. Should have figured.

Thanks.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group