Skip to content
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

cassandra: parse port from url to set cluster’s port #1199

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hessayon
Copy link

@hessayon hessayon commented Dec 3, 2024

There is a valid parameter, "port", in the docs for the Cassandra driver. However, there is no parsing of this parameter in the source code, so it's impossible to set the cluster's parameters.
I've executed this command:

migrate -path ./migrations/ -database "cassandra://{node_host_0}:9142/{keyspace}?
port=9142&protocol=4&sslcert=certificate.pem&sslkey=private_key.pem&sslrootcert=ca_chain.pem&sslmode=require&disable-host-lookup=true" -verbose up

and got errors:

2024/12/02 15:04:16 error: failed to connect to {node_host_1}:9042 due to error: tls: first record does not look like a TLS handshake
2024/12/02 15:04:16 error: failed to connect to {node_host_2}:9042 due to error: tls: first record does not look like a TLS handshake
2024/12/02 15:04:16 error: failed to connect to {node_host_3}:9042 due to error: tls: first record does not look like a TLS handshake

({node_host_[n]} is valid host)

After my fix, the migration went smoothly.

I may be wrong, so please correct me if I use it incorrectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant