Hi Team, I am using Druid v25 and trying to connec...
# general
s
Hi Team, I am using Druid v25 and trying to connect with SSL enabled postgres for metadata storage. I have ca-cert.crt file and configured below configs to common.runtime.properties file
Copy code
# Metadata storage configuration
druid.extensions.loadList=["postgresql-metadata-storage"]
druid.metadata.storage.type=postgresql
druid.metadata.storage.connector.connectURI=jdbc:<postgresql://your-db-host:5432/your-db-name>
druid.metadata.storage.connector.user=your-db-user
druid.metadata.storage.connector.password=your-db-password
 
# SSL-specific configuration
druid.metadata.postgres.ssl.useSSL=true
druid.metadata.postgres.ssl.sslMode=verify-full
druid.metadata.postgres.ssl.sslRootCert=/path/to/ca-cert.crt
It's not working. Errors are in screenshots. If I am trying to connect with ssl Disabled postgres then Druid is running (commented all ssl related configs)
b
With Mysql, i have seen this working by directly providing in the connection, Could you try same. druid.metadata.storage.connector.connectURI=jdbc:postgresql://your-db-host:5432/your-db-name?sslmode=verify-full&amp;sslrootcert=/path/to/ca-cert.crt As we are providing directly, we can avoid providing below in config:
Copy code
# SSL-specific configuration
druid.metadata.postgres.ssl.useSSL=true
druid.metadata.postgres.ssl.sslMode=verify-full
druid.metadata.postgres.ssl.sslRootCert=/path/to/ca-cert.crt
s
Hi @Bibek Sahoo Thanks for replying. After so much research I had resolved my issue. We have created custom java Truststore and imported PG CA certificate into it
keytool -import -trustcacerts \
-file /path/to/ca-cert.crt \
-alias postgres-ca \
-keystore /path/to/custom-truststore.jks \
-storepass yourpassword \
-noprompt
Provided below configs
druid.metadata.postgres.ssl.trustStorePath=/path/to/custom-truststore.jks
druid.metadata.postgres.ssl.trustStorePassword=yourpassword
druid.metadata.postgres.ssl.trustStoreType=JKS
druid.metadata.storage.connector.connectURI=jdbc:<postgresql://db.example.com:5432/druid?sslmode=require>
Now it is working for me.🙂
🙌 1