Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Postgres as a external database with ssl on cloudbreak

Solved Go to solution

Postgres as a external database with ssl on cloudbreak

New Contributor

There are some way to configure postgres external database on cloudbreak to use ssl?

I did not succeed with this jdbc string:

Connection URL: jdbc:postgresql://<pg-url>:5432/hive?ssl=true

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Postgres as a external database with ssl on cloudbreak

Expert Contributor

Helo,

You can configure Cloudbreak to use an external database. Also you can configure the cert for your database with the following 2 env vars:

-Dcb.db.env.ssl=true
-Dcb.db.env.cert.file=path_to_cert

However, your question suggests me that you want to use an external DB for Hive and not for CB, right? I that case it would be better to put the Hive tag on the question as well so Hive users can find the question.

6 REPLIES 6

Re: Postgres as a external database with ssl on cloudbreak

Expert Contributor

Helo,

You can configure Cloudbreak to use an external database. Also you can configure the cert for your database with the following 2 env vars:

-Dcb.db.env.ssl=true
-Dcb.db.env.cert.file=path_to_cert

However, your question suggests me that you want to use an external DB for Hive and not for CB, right? I that case it would be better to put the Hive tag on the question as well so Hive users can find the question.

Re: Postgres as a external database with ssl on cloudbreak

New Contributor

Yes, you are right!

Many thanks for your advise, I added the tag

Highlighted

Re: Postgres as a external database with ssl on cloudbreak

Cloudera Employee

@khorvath

Could you guide me on how to set the SSL enabled postgres to Cloudbreak , also I'm new to Cloudbreak so please provide some detailed steps as on which config , what's the parameted need to be included etc

Re: Postgres as a external database with ssl on cloudbreak

For Cloudbreak, these variables that @khorvath mentioned are Java JVM opts that should be configured through CB_JAVA_OPTS variable in your Profile file. You can set these as in the following example:

export CB_JAVA_OPTS="-Dhttp.proxyHost=ec2-52-51-184-121.eu-west-1.compute.amazonaws.com -Dhttp.proxyPort=3128"

If you have a cert for SSL then you should place it into the etc folder of you deployment and replace the `path_to_cert` to the relative path of the cert from your deployment’s etc folder

Re: Postgres as a external database with ssl on cloudbreak

Cloudera Employee

Hi @Dominika Bialek, I have tried as per your suggestion however its still throwing error.

FYI, I just specified like this, still issue exists, please guide me

export 
CB_JAVA_OPTS="-Dhttp.proxyHost=cbpostgres2134.postgres.database.azure.com 
-Dhttp.proxyPort=5432 -Dcb.db.env.ssl=true 
-Dcb.db.env.cert.file=/root/cloudbreak-deployment/certs/root.crt"

Re: Postgres as a external database with ssl on cloudbreak

The steps for configuring an external database with SSL for Cloudbreak are described here

https://docs.hortonworks.com/HDPDocuments/Cloudbreak/Cloudbreak-2.9.0/configure/content/cb_configure...