lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From goran kent <>
Subject Re: [lucy-user] Remote SearchServer and PolySearcher(SearchClient) usage
Date Mon, 31 Oct 2011 18:45:01 GMT
On 10/31/11, Marvin Humphrey <> wrote:
 So apparently we have an IO::Select object that thinks it's ready to read,
> but
> when we read from it, we don't get anything.
> I'm not sure how to duplicate this locally.
> Just asking, but have you tried restarting the server?

By server, I assume you mean the SearchServer script.  Yes, I have to
restart it (since it dies after every search served) before every
search from the remote client machine.

strace(1) on the SearchServer shows this code being invoked as a
possible consequence of 0 bytes being read from the client socket:

# Sanity check the method name.
elsif ( !$dispatch{$method} ) {
    print $client_sock "ERROR: Bad method name: $method\n";

where $method is empty:

...writing results to the client socket (124)...
write(124, "to open a shop, a painting shop "..., 2615) = 2615 says client is saying something...
select(128, [123 124], NULL, NULL, NULL) = 1 (in [124]) from client...
read(124, "", 4096)                     = 0

...unexpected 0 bytes from client, and error...
write(2, "Use of uninitialized value in ch"..., 153) = 153
write(2, "Use of uninitialized value in st"..., 157) = 157
write(2, "Use of uninitialized value in st"..., 157) = 157
write(2, "Use of uninitialized value in ha"..., 160) = 160
write(2, "Use of uninitialized value in co"..., 175) = 175
write(124, "ERROR: Bad method name: \n", 25) = 25

I tried adding a bit of debugging to LucyX/Remote/ (sub
_rpc) on the client machine:

    my $packed_len = pack( 'N', bytes::length($serialized) );
+    print "DEBUG: sending [$method] len:" .
length("$packed_len$serialized") . "\n";
    print $sock "$method\n$packed_len$serialized";

But everything being sent has a positive length; ie, nothing to
account for that "Bad method name" error above.  Perhaps it's being
sent elsewhere, or I'm misreading what's happening.

/me yawns, almost time for bed

View raw message