3

Trying to make Postgres connection to CockroachDB with DataGrip but getting this error:

[08006] The SSLSocketFactory class provided com.intellij.execution.rmi.ssl.SslSocketFactory could not be instantiated. signed overrun, bytes = 919.

From the DataGrip connection interface:

URL:

jdbc:postgresql://localhost:26257/postgres

with port 26257 and with SSL enable

CA File

/cert/ca.key

Client Certificate File:

/certs/client.root.crt

Client key file:

/client.root.key

This setup above doesn't work with DataGrip, but the same certs works with the CLI:

cockroach cert create-client root --certs-dir=certs --ca-key=/ca.key

cockroach start --certs-dir=certs --store=node1 --listen-addr=localhost:26257 --http-addr=localhost:8080 --join=localhost:26257,localhost:26258,localhost:26259 --background

What could be wrong with the DataGrip configuration?

Fireburn
  • 981
  • 6
  • 20
  • Could you file an issue in [DataGrip issue tracker](https://youtrack.jetbrains.com/newIssue?project=DBE) and attach full IDE log? – Vasilii Chernov Jan 12 '21 at 12:31

1 Answers1

1

I think you need to generate the client cert and key in PKCS8 format for Java. This slightly older version of CockroachDB's Java hello world tutorial has guidance that might help: https://www.cockroachlabs.com/docs/v20.1/build-a-java-app-with-cockroachdb#step-3-generate-a-certificate-for-the-maxroach-user.

jseldess
  • 373
  • 1
  • 6