IIRC, that error was seen when connecting to Riak 0.14.0. What version of
Riak are you connecting to?

I might also suggest using the current, unreleased Python client from the
master branch on GitHub. It has much better support for threads and
persistent connections. Just don't use variant client_id values and PB
connections (switch to Riak 1.1 and ignore client_id).

One Client can be shared across threads, but not Objects. I don't recall
whether Buckets can be shared.

Cheers,
-g
On Feb 26, 2012 2:39 PM, "Jim Adler" <jad...@intelius.com> wrote:

> I'm getting the following error while using protocol buffers
> (RiakPbcTransport) with more than one thread (stack trace below):
>
>        Socket returned short packet length 0 - expected 4'
>
> I'm using the 1.3.0 Python client on Mac and Ubuntu 11.04 and have seen
> the same error on both OS's. A single-thread works fine as does the
> RiakHttpTransport.
>
> Anyone have this problem?
>
> Thanks,
> Jim
>
> File
> "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/li
> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/bucket.py", line 260,
> in get
>    return obj.reload(r)
>  File
> "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/li
> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/riak_object.py", line
> 373, in reload
>    Result = t.get(self, r, vtag)
>  File
> "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/li
> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/transports/pbc.py",
> line 195, in get
>    msg_code, resp = self.send_msg(MSG_CODE_GET_REQ, req, None)
>  File
> "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/li
> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/transports/pbc.py",
> line 387, in send_msg
>    return self.recv_msg(conn, expect)
>  File
> "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/li
> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/transports/pbc.py",
> line 413, in recv_msg
>    self.recv_pkt(conn)
>  File
> "/usr/local/Cellar/python/2.7.2/Frameworks/Python.framework/Versions/2.7/li
> b/python2.7/site-packages/riak-1.3.0-py2.7.egg/riak/transports/pbc.py",
> line 460, in recv_pkt
>    len(nmsglen))
> RiakError: 'Socket returned short packet length 0 - expected 4'
>
>
> _______________________________________________
> riak-users mailing list
> riak-users@lists.basho.com
> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
>
_______________________________________________
riak-users mailing list
riak-users@lists.basho.com
http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com

Reply via email to