Postgresql Ssl Unable to Connect
I Am Trying to Connect an Application Named Thingsboard with a Postgresql Db Both Running on Google Cloud Engine. I Have the Following Files Provided by Gce...
I am trying to connect an application named thingsboard with a postgresql DB both running on Google Cloud Engine. I have the following files provided by GCE when I set up the DB as allow only SSL connections:
client-cert.pem client-key.pem server-ca.pem
This is where the connection to the DB is set up. I tried with a the client-key.pem as client-key.pem, client-key.key, client-key.pk8 (with and without passphrase, when added passphrase I added the field "sslpassword=MYKEY"
url: "${SPRING_DATASOURCE_URL:jdbc:postgresql://DATABASEIP:5432/thingsboard?sslmode=verify-ca&sslrootcert=/etc/thingsboard/conf/keystore/server-ca.pem&sslcert=/etc/thingsboard/conf/keystore/client-cert.pem&sslkey=/etc/thingsboard/conf/keystore/client-key.pk8}"
username: "${SPRING_DATASOURCE_USERNAME:MYDBUSERNAME}"
password: "${SPRING_DATASOURCE_PASSWORD:MYDBPASSWORD}"
I am getting the following error
2019-01-16 18:55:32,866 [localhost-startStop-1] ERROR o.a.tomcat.jdbc.pool.ConnectionPool - Unable to create initial connections of pool.
org.postgresql.util.PSQLException: Could not read SSL key file /etc/thingsboard/conf/keystore/client-key.pk8.