Hello Henrik,
Please guide me further in the below scenario.
I am using the memcached with repcached version:
memcached-1.2.8-repcached-2.2.tar.gz 222.2 KiB
Mon May 25 2009 19:18
I have machines : m2 and m3.
CASE I:
-------
machine m2 has two instances of memcached: One master , another
slave.
bash-2.05b$ memcached -d -l 202.1.150.6 -p 11211
bash-2.05b$ memcached -d -l 202.1.150.6 -p 10211 -x 202.1.150.6 -X
11211
bash-2.05b$ ps -eaf |grep memcached
myuser 17764 1 0 12:13 ? 00:00:00 memcached -d -l
202.1.150.6 -p 11211
myuser 17906 1 0 12:14 ? 00:00:00 memcached -d -l
202.1.150.6 -p 10211 -x 202.1.150.6 -X 11211
$netstat -a | grep 11211
tcp 0 0 m2.com:11211 *:* LISTEN
tcp 0 0 m2.com:58577 m2.com:11211 ESTABLISHED
tcp 0 0 m2.com:11211 m2.com:58577 ESTABLISHED
udp 0 0 m2.com:11211 *:*
$netstat -a | grep 10211
$ <no result of above>
Questions is: When I start the slave process with port as 10211 then
why am I not able to see it in netstat? instead I see port 58577 being
used with 11211(master port).
CASE II:
-------
a. Machine m3: master
b. Machine m2: master, Machine m3: slave
II.a:
On machine m3: the behavior is even more strange.
$memcached -v -u myuser-d -m 512 -l 202.1.150.13 -p 11211
$netstat -a | grep 11211
udp 0 0 m3.com:11211 *:*
Note: No tcp port opened. If I start as a slave on machine m3:
II.b
$ memcached -v -u myuser -d -m 512 -l 202.1.150.13 -p 11211 -x
202.1.150.6 -X 11211
replication: connect (peer=202.1.150.6:11211)
replication: marugoto copying
$netstat -a | grep 11211
$ <no result of above>
That behavior is very strange!. Assuming that the port 11211 on m3 is
busy or may be not available. I start with another port
11221. As a master on this port it works fine...
$memcached -v -u myuser -d -m 512 -l 202.1.150.13 -p 11221
$ netstat -a | grep 11221
tcp 0 0 m3.com:11221 *:* LISTEN
And as a slave:
$memcached -v -u myuser -d -m 512 -l 202.1.150.13 -p 11221 -x
202.1.150.6 -X 11211
$replication: connect (peer=202.1.150.6:11211)
$replication: marugoto copying
$netstat -a | grep 11221
$netstat -a | grep 11211
<No result>
================================
How to understand/debug these issues?
On Sep 11, 4:34 pm, Henrik Schröder <[email protected]> wrote:
> That makes absolutely no sense, telnet has nothing to do with memcached.
>
> By default, memcached uses port 11211, so you need to make sure that that
> port is open on your server machine so that you can connect to it. Ask your
> server admin. If, for some weird reason, you can't use port 11211, you can
> specify which port memcached should listen to with the -p switch.
>
> /Henrik
>
> On Fri, Sep 11, 2009 at 12:18, techzen <[email protected]> wrote:
>
> > Hello ,
>
> > If telnet is disabled on my RHL server memcached gives the error of
> > unable to connect to host: myMachine:port number when starting my java
> > web app. For security reasons telnet has been disabled on the machines
> > by the admin.
>
> > Is it mandatory to enable telnet for memcached to work? For security
> > purpose if it has been disabled how does one enable memcached to work
> > in a distributed env?. Are there any configurations for that. What
> > about the configurations that are required in the case of firewalls ?.
>
> > Please guide.
>
>