Short read error on .store() with protobufs using Python client

Bob Feldbauer bob at completefusion.com
Fri Jan 21 17:43:04 EST 2011


Interesting. I was actually seeing this all the time, not just 
intermittently. Removing the lines as described in bug #695 
(https://issues.basho.com/show_bug.cgi?id=695) did resolve my issue. 
Thanks for the help, Gary.

- Bob

On 1/21/2011 2:28 PM, Gary Flake wrote:
> I had the same problem the other day and someone answered with the
> fix.  So search the archives on my name to find the precise answer.
> But the fix was to remove the three lines in pbc.py where the check
> and error message occur.   Basically this is a known issue and the
> check should not be there.
>
> -- GWF
>
> (sent from my cell phone.)
>
>
>
> On Jan 21, 2011, at 1:48 PM, Bob Feldbauer<bob at completefusion.com>  wrote:
>
>> Thanks for the suggestion, Jon. This is occurring every time I try to do .store() via protobuf transport in the Python client (so yes, it is reproducible); however, there is no output in logs or riak console.
>>
>> - Bob
>>
>> On 1/21/2011 1:02 PM, Jon Meredith wrote:
>>> Hi Bob,
>>>
>>> That sounds like the connection got closed as the client was readying.
>>>
>>> Have you checked through the server logs to verify that no processes died or no other nodes went down?  Or if it's reproducible you should be able to start the server with 'riak console' and see what gets printed.
>>>
>>> Cheers, Jon.
>>> Basho Technologies
>>>
>>>
>>> On Fri, Jan 21, 2011 at 11:36 AM, Bob Feldbauer<bob at completefusion.com<mailto:bob at completefusion.com>>  wrote:
>>>
>>>     I'm using the riak-python-client with Riak 0.14. If I use HTTP
>>>     instead of PBC, my code works fine; however, with PBC I get a
>>>     "socket returned short read" error. Any help would be appreciated!
>>>     Code as follows (for debugging, I added .is_alive() which returns
>>>     as expected, prior to the error being displayed):
>>>
>>>     client = riak.RiakClient(host='servername', port=8087,
>>>     transport_class=riak.RiakPbcTransport)
>>>     riakBucket = client.bucket('bucketname')
>>>     print client.is_alive()
>>>     ... [code to setup the key/data] ...
>>>     doc = riakBucket.new(key, data=result)
>>>     doc.store()
>>>
>>>     And the full error shown:
>>>
>>>     Traceback (most recent call last):
>>>      File "riak_import-pb.py", line 23, in<module>
>>>        doc.store()
>>>      File
>>>     "/usr/local/lib/python2.6/dist-packages/riak/riak_object.py", line
>>>     269, in store
>>>        Result = t.put(self, w, dw, return_body)
>>>      File
>>>     "/usr/local/lib/python2.6/dist-packages/riak/transports/pbc.py",
>>>     line 190, in put
>>>        msg_code, resp = self.recv_msg()
>>>      File
>>>     "/usr/local/lib/python2.6/dist-packages/riak/transports/pbc.py",
>>>     line 349, in recv_msg
>>>        self.recv_pkt()
>>>      File
>>>     "/usr/local/lib/python2.6/dist-packages/riak/transports/pbc.py",
>>>     line 399, in recv_pkt
>>>        format(len(recv_buf), want_len))
>>>     riak.RiakError: 'Socket returned short read 1444 - expected 8192'
>>>
>>>
>>>     - Bob Feldbauer
>>>
>>>     _______________________________________________
>>>     riak-users mailing list
>>>     riak-users at lists.basho.com<mailto:riak-users at lists.basho.com>
>>>     http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>>>
>>>
>>
>> _______________________________________________
>> riak-users mailing list
>> riak-users at lists.basho.com
>> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com




More information about the riak-users mailing list