7 beta invalid packet error

Hi - trying Couchbase Server Enterprise Edition 7.0.0 build 4602 on Ubuntu 20.
Script via Python 3 - SDK 3.1.2. Trying to do a basic connect and get, receiving error LCB_ERR_KVENGINE_INVALID_PACKET - hope it’s an easy user error! :slight_smile: Any thoughts?

from couchbase.cluster import Cluster, ClusterOptions, QueryOptions, PasswordAuthenticator

CONNSTR = "couchbase://localhost"
BUCKET = "travel-sample"

authenticator = PasswordAuthenticator("Administrator", "Administrator")
cluster = Cluster(CONNSTR, ClusterOptions(authenticator))
cb = cluster.bucket(BUCKET)
cb_coll = cb.collection("default")
result = cb_coll.get("airline_10")

result =>>> result = cb_coll.get("airline_10")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/tyler/.local/lib/python3.8/site-packages/couchbase/collection.py", line 258, in wrapped
    return func(self, *args, **kwargs)
  File "/home/tyler/.local/lib/python3.8/site-packages/couchbase/result.py", line 503, in wrapped
    x, options = func(*args, **kwargs)
  File "/home/tyler/.local/lib/python3.8/site-packages/couchbase/collection.py", line 482, in get
    return self._get_generic(key, kwargs, options)
  File "/home/tyler/.local/lib/python3.8/site-packages/couchbase/collection.py", line 446, in _get_generic
    x = CoreClient.get(self.bucket, key, **opts)
  File "/home/tyler/.local/lib/python3.8/site-packages/couchbase_core/client.py", line 406, in get
    return super(Client, self).get(*args,**kwargs)
couchbase.exceptions.CouchbaseException: <Key='airline_10', RC=0x407[LCB_ERR_KVENGINE_INVALID_PACKET (1031)], Operational Error, Results=1, C Source=(src/multiresult.c,312), Context={'status_code': 4, 'opaque': 3, 'cas': 0, 'key': 'airline_10', 'bucket': 'travel-sample', 'collection': '', 'scope': '', 'context': '', 'ref': '', 'endpoint': 'localhost:11210', 'type': 'KVErrorContext'}, Tracing Output={"airline_10": {"debug_info": {"FILE": "src/callbacks.c", "FUNC": "value_callback", "LINE": 849}}}>

@jcasey can you help @tylermitchell .

1 Like

Same issue with cbc locally:

$ cbc cat airline_10 -U couchbase://localhost/travel-sample -u Administrator -P Administrator
airline_10           LCB_ERR_KVENGINE_INVALID_PACKET (1031)

Same issue on Windows 10 as well.

Hi @tylermitchell – sorry for the delayed response. But, the server API has changed somewhat recently. So until another release candidate it out, the 7.0 beta version needs to have LCB <= 3.1.0. The latest Python SDK ships w/ LCB 3.1.3. The true fix is get a new 7.0 server build, but until that is accessible, try the following:

LCB_TAG=3.1.0 python3 -m pip install couchbase

That is for Linux/MacOS, on Windows if you set LCB_TAG=3.1.0 and then python3 -m pip install couchbase you should be good.

Note, you will see this same kind of issue is using DP mode on a 6.6 version of CBS. Also, see some more details in the JIRA ticket.

I hope this helps.

1 Like

Excellent Jared - thanks I will try. I ended up using 6.6 instead but want to do my code sample in a blog showing collections so will try your workaround - thanks.