"Invalid or unsupported protocol version: 2" error when connecting to C* 1.2.5 using 2.0.1 driver

304 views
Skip to first unread message

Michel Hollands

unread,
Jul 1, 2015, 10:00:43 AM7/1/15
to cpp-dri...@lists.datastax.com
Hello,

We're using Cassandra 1.2.5. When connecting with the 2.0.1 driver the following is printed by the driver when connecting :

1435758488.688 [ERROR] (src/connection.cpp:651:void cass::Connection::notify_error(const std::string&)): Host 0.0.
0.0 had the following error on startup: 'Error response: 'Invalid or unsupported protocol version: 2' (0x0200000A)'
1435758488.689 [WARN] (src/control_connection.cpp:203:virtual void cass::ControlConnection::on_close(cass::Connection*)): Lost connection on host 0.0.0.0
1435758488.701 [WARN] (src/replication_strategy.cpp:163:cass::SimpleStrategy::SimpleStrategy(const std::string&, const cass::SchemaMetadataField*)): Replication factor of 0

The future returned by cass_session_connect() has no error, it returns CASS_OK. I have already changed the replication factor for the newly created table to 1.

What am I doing wrong here ?

Thanks,

Michel

Michael Fero

unread,
Jul 1, 2015, 10:19:28 AM7/1/15
to cpp-dri...@lists.datastax.com
Michael,

The error message that you are seeing is a false positive and is safe to ignore. In the upcoming 2.1.0-beta release of the C/C++ driver the message type has been changed to a warning since the driver will automatically downgrade the native protocol version and perform the connection process again; in your case from native v2 protocol to v1.

Are you experiencing any issues that are preventing you from performing operations using the driver against C* v1.2.5?

​~​
Fero

​Michael Fero​

Michel Hollands

unread,
Jul 1, 2015, 10:46:22 AM7/1/15
to cpp-dri...@lists.datastax.com
Ah, good to know. Yes, there is an issue. After connecting I run a query with a prepared statement to insert some values. This returns CASS_OK as well. However when using cqlsh I can't see the inserted values. So I assumed the error message meant that I wasn't connecting. But the problem is somewhere else.

Thanks for your help,

Michel

Reply all
Reply to author
Forward
0 new messages