Open zackpetersen opened 4 years ago
Same issue in our case as well
It is not clear to me from the original post what the issue would be. In general i/o timeout
error message could be any network TCP or DNS issue.
We need more information to be able to find out the cause of the error.
@zackpetersen can you still reproduce this issue?
@bhavar12 why do you think it is the same issue, do you see the same error message? Please include more information (Go version/gocql version/logs/description of what you have done). "+1" style comment alone does not help us determining the cause. Thanks!
@zackpetersen yes I see the same error message on our MS. we are using Go CQL version :- v0.0.0-20190927095247-bd5f930c6137 GO Version 1.16 our Cassandra node is on AWS. some times we got the error gocql: unable to dial control conn {nodeip}: gocql: no response received from cassandra within timeout period we have set gocql time out to 5 Sec.
@bhavar12 Please upgrade to latest gocql version first, there are 98 commits between bd5f930c6137 and master.
our Cassandra node is on AWS
Do you mean AWS Keyspaces or AWS EC2? I'm not sure that your issue is the same as zackpetersen's.
ErrTimeoutNoResponse
(gocql: no response received from cassandra within timeout period
) is returned when executing a query and server does not reply in time. What query timeout do you have configured on server side?
As for the dial tcp: i/o timeout
message, try capturing a network dump to see what causes the timeout as this seems to be network related. gocql: unable to dial control conn
is returned with error directly from Session.dial, so the error could come only from establishing the TCP connection or TLS.
Hello. I'm facing a similar issue. AWS Keyspaces connection works OK for a couple of days, it also reconnects OK, but then suddenly it throws errors trying to connect to port 9042
2023/04/28 08:15:18 observer.go:22: cassandra: error connecting to IP: 3.238.167.151, port: 9042 error: dial tcp 3.238.167.151:9042: i/o timeout
Please note that the driver is configured to use port 9142 with TLS enabled and the above IP is accessible in port 9142.
# nc -vz -w3 3.238.167.151 9042
nc: connect to 3.238.167.151 port 9042 (tcp) timed out: Operation now in progress
# nc -vz -w3 3.238.167.151 9142
Connection to 3.238.167.151 9142 port [tcp/*] succeeded!
Why is it trying to reconnect to a non-TLS port when not configured to do so? Is this a "fallback" solution for some case on the code? Is there a workaround / configuration I should check?
What version of Cassandra are you using?
Local (working fine) - [cqlsh 5.0.1 | Cassandra 3.11.6 | CQL spec 3.4.4 | Native protocol v4]
AWS Keyspaces (unable to connect) - [cqlsh 5.0.1 | Cassandra 3.11.2 | CQL spec 3.4.4 | Native protocol v4]
What version of Gocql are you using?
github.com/gocql/gocql v0.0.0-20200519160334-799061058e31
What did you do?
Connections to a local Cassandra server work fine without ssl enabled. Now I'm testing my application connecting to hosted Cassandra on AWS Keyspaces. I've created an aws user which has full read / write permission to my keyspace. The user credentials and RootCA file have been validated through cqlsh, but through gocql the connection always fails.
What did you expect to see?
Successful connection to AWS Keyspaces through gocql.
What did you see instead?
If you are having connectivity related issues please share the following additional information
Describe your Cassandra cluster
please provide the following information
nodetool status
I don't have access to nodetool since this is a hosted aws service.SELECT peer, rpc_address FROM system.peers
gocql_debug
tag and post the outputSee log pasted above.