I actually got it working, but now I have another weird issue. When I issue the command with the commons.net.TelnetClient, it simple hangs on the sendCommand() (ran in debug mode) method, not allowing me to disconnect and process the STATS data I received. Am I missing something here?
-ts From: [email protected] [mailto:[email protected]] On Behalf Of Adam Lee Sent: Tuesday, May 25, 2010 1:47 PM To: [email protected] Subject: Re: Using Java to Telnet into memcached I've never done it programmatically from Java, but I've done it with telnet, netcat, etc. and had no problems. The telnet client isn't trying to do extra work that would confuse memcached or something, is it? It should be very trivial to use nio classes to whip up something to send a stats command periodically... On Tue, May 25, 2010 at 1:34 PM, Tim Sneed <[email protected]> wrote: Hey all, I am attempting to use a standard Java telnet client (commons.net.TelnetClient) but am having some trouble completing the connection. Once I run my Java test I see on the memcached console "<30 new auto-negotiating client connection" but then it just hangs there, eventually timing out with no exception being thrown. When I use the spymemcached I can connect no problem but I want to reduce the overhead since I am only interested in sending the STATS command at a set interval. Has anyone done this where they use a simple Telnet socket connection from Java to issue commands rather than using a Java memcached client such as spymemcached? Any info would be greatly appreciated, thanks! -ts -- awl
