| Linode Forum https://forum.linode.com/ |
|
| memcached https://forum.linode.com/viewtopic.php?f=19&t=5491 |
Page 1 of 1 |
| Author: | cap [ Thu Apr 22, 2010 9:49 pm ] |
| Post subject: | memcached |
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. |
|
| Author: | obs [ Fri Apr 23, 2010 1:11 am ] |
| Post subject: | |
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. |
|
| Author: | cap [ Fri Apr 23, 2010 12:45 pm ] |
| Post subject: | |
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. |
|
| Author: | cap [ Fri Apr 23, 2010 1:00 pm ] |
| Post subject: | |
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. |
|
| Page 1 of 1 | All times are UTC-04:00 |
| Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |
|