cass_session_connect future takes long than 5 minutes to return

45 views
Skip to first unread message

Robin Mahony

unread,
May 13, 2016, 1:52:35 PM5/13/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
Hi,

So I am seeing that when I call cass_session_connect(), follow by cass_future_get_error_code(); that the future get takes longer than 5 minutes to return. I have some code that treats this as a thread deadlock, which causes crashes in my application.

This seems to happen when the local Cassandra node has just started up, and we try to connect pretty immediately after that.

Any help would be appreciated.

Cheers,

Robin M

Michael Penick

unread,
May 13, 2016, 3:37:20 PM5/13/16
to cpp-dri...@lists.datastax.com
Are you seeing anything in the driver log (errors, warnings, etc.) when this happens?

Mike


--
You received this message because you are subscribed to the Google Groups "DataStax C++ Driver for Apache Cassandra User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cpp-driver-us...@lists.datastax.com.

Robin Mahony

unread,
May 13, 2016, 3:44:01 PM5/13/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
I haven't noticed anything, but I'll look next time it happens more thoroughly.

Robin Mahony

unread,
May 13, 2016, 4:20:17 PM5/13/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
So it happened again. Here are the errors I see.

Expected, since node is coming up:

May 12 11:45:41 [ERROR] (src/connection.cpp:534:static void cass::Connection::on_connect(cass::Connector*)): Connect error 'connection refused' on host 10.96.100.241
May 12 11:45:41 [ERROR] (src/connection.cpp:813:void cass::Connection::log_error(const string&)): Host 10.96.100.241 had the following error on startup: Unable to connect


Expected, due to the way we configure our Cassandra.yaml (and unrelated in general I would think)

[WARN] (src/control_connection.cpp:96:static bool cass::ControlConnection::determine_address_for_peer_host(const cass::Address&, const cass::Value*, const cass::Value*, cass::Address*)): Found host with 'bind any' for rpc_address; using listen_address (10.96.100.243) to contact instead. If this is incorrect you should configure a specific interface for rpc_address on the server.


I think I've seen this when nodes go down while the driver is connected, so this may be expected as well

[ERROR] (src/connection.cpp:810:void cass::Connection::log_error(const string&)): Host 10.96.100.236 had the following error: Unable to decrypt data:


This I've never noticed before:

May 12 11:44:12 [WARN] (src/control_connection.cpp:211:virtual void cass::ControlConnection::on_close(cass::Connection*)): Lost control connection on host 10.96.100.236

Michael Penick

unread,
May 16, 2016, 3:46:50 PM5/16/16
to cpp-dri...@lists.datastax.com
I've been able to reproduce the issue: https://datastax-oss.atlassian.net/browse/CPP-367

Working on a fix.

Mike

Robin Mahony

unread,
May 17, 2016, 1:49:23 PM5/17/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
Awesome. Any rough idea of when this patch will be published with a release?

Michael Penick

unread,
May 18, 2016, 10:57:55 AM5/18/16
to cpp-dri...@lists.datastax.com
There's a patch available in this pull request: https://github.com/datastax/cpp-driver/pull/288/files

This will be included with the 2.4 release in a few weeks.

Mike

On Tue, May 17, 2016 at 10:49 AM, Robin Mahony <rob...@netapp.com> wrote:
Awesome. Any rough idea of when this patch will be published with a release?

Robin Mahony

unread,
May 18, 2016, 6:47:59 PM5/18/16
to DataStax C++ Driver for Apache Cassandra User Mailing List
Ok. Assuming this patch should be safe to apply to 2.2.2?

Michael Penick

unread,
May 18, 2016, 6:55:20 PM5/18/16
to cpp-dri...@lists.datastax.com
Yes.

On Wed, May 18, 2016 at 3:47 PM, Robin Mahony <rob...@netapp.com> wrote:
Ok. Assuming this patch should be safe to apply to 2.2.2?
Reply all
Reply to author
Forward
0 new messages