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.

Confusing doc on installing jdbc driver for postgres db

Confusing doc on installing jdbc driver for postgres db

New Contributor

I am following the instructions from the following doc

https://docs.hortonworks.com/HDPDocuments/Ambari-2.6.1.3/bk_ambari-administration/content/using_hive...

The confusing part is Step 1: Installing JDBC driver.

ambari-server setup --jdbc-db=postgres --jdbc-driver=/path/to/postgres/postgresql.jar

ls /usr/share/java/postgresql-jdbc.jar

ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar

The instruction asks to run ambari-server setup twice each with a different path to jdbc jar. The first copies the jdbc jar to /var/lib/ambari-server/resources. But then the doc asks to verify the jdbc jar at /usr/share/java/ which doesn't exist

ls /usr/share/java/postgresql-jdbc.jar

The second execution of ambari-server setup simply copy /usr/share/java/postgresql-jdbc.jar (which doesn't exist) to /var/lib/ambari-server/resources again which doesn't make sense

5 REPLIES 5

Re: Confusing doc on installing jdbc driver for postgres db

Super Mentor

@Zaili Xu

Please skip the following step

b. On the Ambari Server host run:

ambari-server setup --jdbc-db=postgres --jdbc-driver=/path/to/postgres/postgresql.jar

.

Steps should be something like following:

  1. Download the PostgreSQL JDBC Driver from PostgreSQL.
  2. Confirm that .jar is in the Java share directory.
    ls /usr/share/java/postgresql-jdbc.jar
  3. Change the access mode of the .jar file to 644.
    chmod 644 /usr/share/java/postgresql-jdbc.jar
  4. Execute the following command:
    ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar

I will report the Doc bug for this.

.

Re: Confusing doc on installing jdbc driver for postgres db

Super Mentor

@Zaili Xu

If this answers your query then please mark this HCC thread as answered by clicking on "Accept" link on the correct answer, That way it will help other HCC users to quickly find the answers.

Highlighted

Re: Confusing doc on installing jdbc driver for postgres db

New Contributor

Thank you, Jay, for the update

Re: Confusing doc on installing jdbc driver for postgres db

New Contributor

Re: Confusing doc on installing jdbc driver for postgres db

New Contributor
Don't have an account?
Coming from Hortonworks? Activate your account here