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

Unable to connect to AD4D (Astra DB for DSE) #118

Closed
ims-swilkinson opened this issue Jun 24, 2023 · 1 comment · Fixed by #123
Closed

Unable to connect to AD4D (Astra DB for DSE) #118

ims-swilkinson opened this issue Jun 24, 2023 · 1 comment · Fixed by #123
Assignees

Comments

@ims-swilkinson
Copy link

Using the Docker image (datastax/cql-proxy:v0.1.4 or datastax/cql-proxy:v0.1.3) I'm unable to connect to my AD4D (Astra DB for DSE) cluster.

  • The cluster is an "Astra DSE Edition Workload" on the E60 tier (48 vCPU, 366 DRAM, 2TB STORAGE).
  • I can connect to it using cqlsh.

I initially tried using a client token:

docker run -a STDIN -a STDOUT -a STDERR -p 9042:9042 datastax/cql-proxy:v0.1.4 \
    --astra-token $AD4D_CLIENT_TOKEN \
    --astra-database-id $ASTRA_DB_ID

But I got this error:

cql-proxy: error: unable to connect to cluster unknown authenticator: org.apache.cassandra.auth.AstraAuthenticator

I then tried building an image which with the above image as the base, copying in the secure connect bundle, and used username, password and SCB path parameters:

docker run -a STDIN -a STDOUT -a STDERR -p 9042:9042 5c65463aed00 \
    --username $AD4D_CLIENT_ID \
    --password $AD4D_CLIENT_SECRET \
    --astra-database-id $ASTRA_DB_ID \
    -b "/scb.zip"

But I got the exact same error.

Adding the --debug parameter didn't yield any extra info.
I know this may be an AD4D issue, and I have reported it to our support contact at DataStax.

@ims-swilkinson
Copy link
Author

ims-swilkinson commented Jun 27, 2023

Someone more competent in Go than myself tells me this change to the source code will fix it:

In cql-proxy-main/proxycore/auth.go, in the func (d *passwordAuth) InitialResponse(authenticator string) ([]byte, error) function, add this case:

        case "org.apache.cassandra.auth.AstraAuthenticator":
                return d.makeToken(), nil

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 a pull request may close this issue.

2 participants