Skip to content

Instantly share code, notes, and snippets.

@aboudreault
Created August 28, 2015 21:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aboudreault/49668736344c12da6a7a to your computer and use it in GitHub Desktop.
Save aboudreault/49668736344c12da6a7a to your computer and use it in GitHub Desktop.
user = db.create_user('\\''user@example.com'\\'', '\\''User Full Name'\\'', ['\\''user'\\''])
db.set_user_passphrase('\\''user@example.com'\\'', '\\''user'\\'')
' >> "$(echo pyscript.py)"
[172.17.1.72] run: python pyscript.py
[172.17.1.72] out: INFO:cstar_perf.model:Initializing Model...
[172.17.1.72] out: ERROR:cassandra.connection:Closing connection <AsyncoreConnection(139748393543312) 127.0.0.1:9042> due to protocol error: code=000a [Protocol error] message="Invalid or unsupported protocol version: 4"
[172.17.1.72] out: WARNING:cassandra.cluster:Downgrading core protocol version from 4 to 3 for 127.0.0.1
[172.17.1.72] out: INFO:cstar_perf.model:Model initialized
[172.17.1.72] out:
[172.17.1.72] run: rm ~/pyscript.py
INFO:cstar_docker:cstar_perf service started, opening in your browser: http://localhost:8000
INFO:cstar_docker:Log in with email: admin@example.com and password: admin
INFO:cstar_docker:You will need to use the 'cstar_docker associate' command to link up a cluster
Started 1 nodes:
Cluster: test_frontend, 1 nodes
test_frontend_00 : 172.17.1.72
aboudreault@kovaro:~/git/cstar/cstar_perf$
@ganeshgsk
Copy link

I hope you can solve the error by changing the protocol_version to 2.
Hey, I installed Cassandra in my local box. But got the following error.
ERROR:cassandra.connection:Closing connection <AsyncoreConnection(139634085423824) 127.0.0.1:9042> due to protocol error: code=000a [Protocol error] message="Invalid or unsupported protocol version: 3"
WARNING:cassandra.cluster:Downgrading core protocol version from 3 to 2 for 127.0.0.1

Then I changed the protocol_version to 2.
cluster = Cluster(protocol_version=2). Issue is resolved then, Hope it helps you.
I got the solution from here.
http://stackoverflow.com/questions/31444098/python-cassandra-driver-invalid-or-unsupported-protocol-version-4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment