Ok, let me make this easier to follow.
I run the server on my localhost with this command
prompt>:~$ /usr/bin/memcached -m 64 -U 11211 -p 11211 -l 127.0.0.1
I kinda did not remove the "-u root", silly me. I got it.
ps -ef | grep memcached shows
username 12029 2961 0 13:32 pts/2 00:00:00 /usr/bin/memcached -m 64
-U 11211 -p 11211 -l 127.0.0.1
sudo netstat -anp | grep 11211 shows
prompt>:~$ sudo netstat -anp | grep 11211
tcp 0 0 127.0.0.1:11211 0.0.0.0:* LISTEN
12029/memcached
tcp 0 0 127.0.0.1:11211 127.0.0.1:36642
ESTABLISHED 12029/memcached
tcp6 0 0 127.0.0.1:36642 127.0.0.1:11211
ESTABLISHED 13941/java
udp 0 0 127.0.0.1:11211 0.0.0.0:*
12029/memcached
unix 2 [ ACC ] STREAM LISTENING 11211 1821/dbus-daemon
@/tmp/dbus-TelpJZAoJl
Now, I use spymemcached as my client, and use it like this
private MyClass() throws UnknownHostException, IOException {
super(new InetSocketAddress("127.0.0.1", 11211));
}
Results
I am able to set/get with no issues at all. My cache populates and work
perfectly well.
But every 20 seconds I get the below warning message. I call this annoying
(forgive my expression here, I dont mean to offend anyone), since
everything works. And this WARN/INFO message carries no function issue for
me.
2012-02-09 13:55:59.322 INFO net.spy.memcached.MemcachedConnection:
Reconnecting {QA sa=0.0.0.0/0.0.0.0:11211, #Rops=0, #Wops=0, #iq=0,
topRop=null, topWop=null, toWrite=0, interested=0}
2012-02-09 13:55:59.323 INFO net.spy.memcached.MemcachedConnection:
Connection state changed for sun.nio.ch.SelectionKeyImpl@15f0688
2012-02-09 13:55:59.323 INFO net.spy.memcached.MemcachedConnection:
Reconnecting due to failure to connect to {QA sa=0.0.0.0/0.0.0.0:11211,
#Rops=0, #Wops=0, #iq=0, topRop=null, topWop=null, toWrite=0, interested=0}
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:592)
at
net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:313)
at
net.spy.memcached.MemcachedConnection.handleIO(MemcachedConnection.java:199)
at net.spy.memcached.MemcachedClient.run(MemcachedClient.java:1622)
2012-02-09 13:55:59.324 WARN net.spy.memcached.MemcachedConnection:
Closing, and reopening {QA sa=0.0.0.0/0.0.0.0:11211, #Rops=0, #Wops=0,
#iq=0, topRop=null, topWop=null, toWrite=0, interested=0}, attempt 26.
Regards
Siddharth
On Thu, Feb 9, 2012 at 12:15 AM, Dustin <[email protected]> wrote:
>
> On Wednesday, February 8, 2012 12:29:00 AM UTC-8, Siddharth Jagtiani wrote:
>
>
>> I immediately responded about "not running as root"
>>
>
> I see no response about not running as root. It works, but you're not
> justifying it and you're still doing it. It's generally something you
> never want to do, but it's not the actual cause of the problem you're
> having. Not understanding everything you're doing does make it harder to
> understand your pboelm, though.
>
>
>> and "client piece of code", as soon as I saw your first response. I
>> guessed you missed seeing my response (here it is below again).
>>
>
> I read your response, and it's still in the archive. You don't need to
> keep posting it.
>
>
>> Also you seem to respond without "original message thread" so we keep
>> loosing the responses :).
>>
>
> This is all in the same thread on google groups. I don't know what
> you're referring to, but you're being hard to follow.
>
> If you don't understand my response, state, specifically, what you don't
> understand about it. As it is, the client is telling you that there's a
> fatal error connecting to the server you've defined, and you're calling the
> log message annoying and wondering how to disable it. Just disable the
> client altogether if you believe not being able to connect to a server
> doesn't affect your service, but you don't want to read the log messages
> about it. You'll still not be connected, but it won't be logging.
>
>
>