-
Notifications
You must be signed in to change notification settings - Fork 622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create the session but output no connections were made when creating the session
#1020
Comments
I had the same issue with Cassandra 3.11.1. The server is single node in GCE, and I have configured the config as follows:
When using cqlsh to connect to the server remotely (via its public IP), everything works fine. However gocql will always report "no connections were made when creating the session". I later found out it was trying to connect to my local development Cassandra server because it complains about missing keyspace even though I give the remote server IP... Please advise. Thanks! |
I have same issue using last gocql version using:
Using an older version of gocql (from backup) it works like a charm.. |
Build your application with `gocql_debug` and share the logs from what is
going on with host discovery. Can you share the network setup? What the
output of nodetool status is, what the output of SELECT peer, rpc_address
FROM system.peers is, what addressed you expect to be able to connect to
the cluster via.
…On Mon, 27 Nov 2017 at 14:47 Thiago Morales ***@***.***> wrote:
I have same issue using last gocql version using:
const CqlHost = "34.xxx.xxx.xxx" // public IP - cqlsh connection works
cluster := gocql.NewCluster(CqlHost) cluster.Keyspace = CqlClusterKeyspace
Session, err = cluster.CreateSession()
Using an older version of gocql (from backup) it works like a charm..
I didn't received any error about missing keyspace, but even passing
Cassandra host server to NewCluster, looks like gocql ignores it
completely..
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1020 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAAIpZM0nTB6LCwhfHg3z_zbuWe3EGAcks5s6strgaJpZM4QhYOs>
.
|
Facing the same issue.. Any resolution yet ? |
ok.. finally resolved this by setting |
This option has an impact on cluster performance, so this option should not be used in a production environment. // If DisableInitialHostLookup then the driver will not attempt to get host info
// from the system.peers table, this will mean that the driver will connect to
// hosts supplied and will not attempt to lookup the hosts information, this will
// mean that data_centre, rack and token information will not be available and as
// such host filtering and token aware query routing will not be available.
DisableInitialHostLookup bool |
Same issue.. Any workaround? I've just install Cassandra with brew and tried to connect from official doc with golang.. So I don't see at all right now what can be the issue |
I don't have enough information to reproduce the issue. At the first look it seems that this could be related to configuration of the cluster. Note that cqlsh connects to a single node directly by default, while gocql discovers all the nodes it should connect to. Please provide contents of system.local and system.peers tables and output when you compile gocql with gocql_debug tag. |
Please answer these questions before submitting your issue. Thanks!
What version of Cassandra are you using?
i use the scylladb 2.0 that is run on docker
What version of Gocql are you using?
latest
What did you do?
`
cluster := gocql.NewCluster("47.100.xxx.xx")
cluster.Keyspace = "test"
cluster.Consistency = gocql.Quorum
session, err := cluster.CreateSession()
`
What did you expect to see?
the sesssion created
What did you see instead?
but session is
nil
, the err is outputno connections were made when creating the session
Describe your Cassandra cluster
i only has one node in the cluster
nodetool status
Datacenter: datacenter1
=======================
Status=Up/Down
|/ State=Normal/Leaving/Joining/Moving
-- Address Load Tokens Owns (effective) Host ID Rack
UN 172.17.0.2 120.77 KB 256 100.0% f8e2341a-52b4-459f-8887-127e80e29197 rack1
my scylladb can execute cqlsh and run normally
how to solve this problem?thanks
The text was updated successfully, but these errors were encountered: