in reply to Re: Perl Memcached client under Windows XP
in thread Perl Memcached client under Windows XP

It's Version 1.26

Here's the entire output. I don't think the line numbers are that helpful though, I'm pretty sure the problem is to do with socket(...) not actually opening/creating the socket, but as it doesn't seem to return any error codes and I'm not sure what it is doing under the hood, I'm a bit lost as to where to go next for a fix.

I note that the Activestate examples are using IO::Socket rather than socket() directly and I further note that IO::Socket contains specifics for Win32, so that's where I'm inclined to think the problem lies.

Use of uninitialized value $sock in ref-to-glob cast at C:/Perl/site/l +ib/Cache/Memcached.pm line 368. Use of uninitialized value in vec at C:/Perl/site/lib/Cache/Memcached. +pm line 368. Use of uninitialized value $sock in ref-to-glob cast at C:/Perl/site/l +ib/Cache/Memcached.pm line 375. Use of uninitialized value in vec at C:/Perl/site/lib/Cache/Memcached. +pm line 375. Use of uninitialized value $sock in ref-to-glob cast at C:/Perl/site/l +ib/Cache/Memcached.pm line 376. send() on unopened socket at C:/Perl/site/lib/Cache/Memcached.pm line +376. Use of uninitialized value $res in numeric gt (>) at C:/Perl/site/lib/ +Cache/Memcached.pm line 379. Use of uninitialized value $sock in hash element at C:/Perl/site/lib/C +ache/Memcached.pm line 181. Use of uninitialized value $sock in hash element at C:/Perl/site/lib/C +ache/Memcached.pm line 168.

Replies are listed 'Best First'.
Re^3: Perl Memcached client under Windows XP
by BrowserUk (Patriarch) on May 27, 2010 at 15:04 UTC

    Sorry. I still can't make the error messages match up with the code. It looks for all the world like it is simply failing to connect to the server, but why that should be I haven't a clue. It also uses non-blocking sockets, but makes no provision to handle Windows special requirements in that regard, which doesn't bode well.

    A quick look around found this MemCached-Windows. There seems to be a lot of further info and special Windows ports of the code...maybe you can make progress there.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
      I'm aware of MemCached-Windows, I already am using that as my server, however my issue is with the client end and that just points back to the same CPAN library :(

      Given I can telnet to the server from the same system that is trying to be a client, I don't see why it won't open the socket (ie there should be no firewall issue). I've tried it against a second Memcached server that is running on ubuntu and have the same problem.

      :-(

      --------- UPDATED -----------

      To add insult to injury, if I install the memcache win32 SERVER on my WinXP system, I can connect to it from a Win 2003 client using exactly the same test code and everything is fine. However the windows XP system refuses to even connect to the localhost system!

      It seems to me that the client library Cache::Memcache doesn't work on WinXP at all with Activestate Perl - can someone out there confirm that it DOES actually work fine so at least I know it's something about my system that is the issue?

      I've tried un-installing and reverting to version 1.24 rather than 1.26 but the same fault remains

        It is a little hard to follow which combinations of client version and OS version you tried and which have worked, but I think you are saying that you only have the problem under XP? eg. The client works on WS2003?

        If so, the best I advice I can offer you is to ensure that your XP machine is fully updated.

        Also, I haven't seen where you've checked the return from new Cache::MemCached?

        I'd strongly suggest you change your test script to:

        use strict; use warnings; use Data::Dumper; use Cache::Memcached; my $CACHE = new Cache::Memcached( { servers => [ "myremotecache.com:11 +211" ] }) or die "$! / $^E"; print Dumper($CACHE->stats());

        And see what if any extra information that provides.