Connection issues with Perl API -- or is it just me?

Richard 'toast' Russo russor@msoe.edu
Mon, 29 Dec 2003 02:38:45 -0800 (PST)


I just ran your test code, the output is
my_key = Some value

which is what I expected, since the code looks like it should work.

I'm on a debian unstable (perl 5.8.2), and I downloaded the client and
server from the website (not cvs) just now.

I'm completely confused.


On Mon, 29 Dec 2003, M Nielsen wrote:

> I'm having some connection problems with using the perl API.  I know
> less than jake about socket programming, so all I've been able to track
> down is that connect(), either on line 122  or 130 of the perl API is
> failing and calling it a dead server (both issuances return nothing
> even though the demon is up and running).
>
> The demon has been tried on two machines, Redhat 7.2 and 8 (stock UP
> kernels) with the latest versions of libevent and memcached (1.1.9)
> with poll as the method.  I've tried a simple client app from many
> other machines with the latest Perl API (on 5.6 and 5.8), both
> localhost and not, with the same result.  I can telnet and set/get
> everything by hand just fine so I don't believe the demon is the
> problem.  The test code used is simple, almost verbatim from the pod:
>
> use strict;
> use Cache::Memcached;
> my $memd = new Cache::Memcached {
>      'servers' => [ "127.0.0.1:11211" ],
> };
> die "set failed" unless ($memd->set("my_key", "Some value"));
> print "my_key = " . $memd->get ('my_key') . "\n";
>
> ...with the above in my tests the die() is triggered and the "stats"
> command on the demon via telnet shows no items have been stored.  The
> Debug option shows nothing additional. The demon is invoked with:
>
> memcached -m 10 -l 127.0.0.1 -p11211
>
> ...I have a sinking feeling it's me doing someone wrong here, but I
> can't figure out what.
>
>