【问题标题】:Connecting to CockroachDB from DataGrip从 DataGrip 连接到 CockroachDB
【发布时间】:2021-04-14 14:58:02
【问题描述】:

尝试使用 DataGrip 将 Postgres 连接到 CockroachDB,但出现此错误:

[08006] 提供的 SSLSocketFactory 类 com.intellij.execution.rmi.ssl.SslSocketFactory 不能 实例化。有符号溢出,字节 = 919。

从 DataGrip 连接界面:

网址:

jdbc:postgresql://localhost:26257/postgres

使用端口 26257 并启用 SSL

CA 文件

/cert/ca.key

客户端证书文件:

/certs/client.root.crt

客户端密钥文件:

/client.root.key

上述设置不适用于 DataGrip,但相同的证书适用于 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

DataGrip 配置可能有什么问题?

【问题讨论】:

标签: ssl datagrip cockroachdb


【解决方案1】:

我认为您需要为 Java 生成 PKCS8 格式的客户端证书和密钥。 CockroachDB 的 Java hello world 教程的这个稍旧版本的指南可能会有所帮助:https://www.cockroachlabs.com/docs/v20.1/build-a-java-app-with-cockroachdb#step-3-generate-a-certificate-for-the-maxroach-user

【讨论】:

    猜你喜欢
    • 2021-12-13
    • 1970-01-01
    • 2016-06-16
    • 2017-03-23
    • 1970-01-01
    • 2017-11-08
    • 1970-01-01
    • 2021-12-13
    • 2021-12-13
    相关资源
    最近更新 更多