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

M Nielsen
Mon, 29 Dec 2003 03:47:50 -0700

Okay, so not 30 minutes after I posted this to the list, another 
popped up regarding FreeBSD 5.2.  After commenting-out the two lines in 
question the script worked fine on the machine I'm testing on.

This machine is by no means bleeding edge - Red Hat 7.2, stock kernel, 
Perl 5.6.1.

On Monday, Dec 29, 2003, at 03:26 US/Mountain, 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' => [ "" ],
> };
> 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 -p11211
> ...I have a sinking feeling it's me doing someone wrong here, but I 
> can't figure out what.