- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
ambari-server setup not updating the PostgreSQL JDBC driver for hive when upgrading PostgreSQL for HDP 2.3.4
- Labels:
-
Hortonworks Data Platform (HDP)
Created ‎04-06-2017 08:41 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I've been able to upgrade the driver manually by copying over the postgresql-jdbc.jar file saved in /usr/share/java. However, the driver does not get upgraded for the directory /usr/hdp/X.X.X.X-XXXX/hive/lib directory when I run the command
ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql-jdbc.jar
Is there a step I'm missing or doing incorrectly?
PostgreSQL was upgraded from v9.1 to v9.4 and the JDBC was being upgraded to match.
Created ‎04-07-2017 03:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following steps that you performed is good and suggested as per the doc. http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.18/bk_ambari-reference/content/_using_hive_wit...
ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql94-jdbc.jar
.
However if you are still facing any issue then please check the output of "lsof" command to verify which JAR is being loaded by your hive.
lsof -p $PID | grep postgresql
.
Still if you find that old jar is being used then try restarting the hive and see if it works. Also perform the following steps as last option.
On the HiveServer2/Metastore Server
- find / -name 'postgre*.jar' -ls
- Remove old postgrexxx.jar from Agent's tmp directory and /usr/hdb/<version>/hive/lib
- Remove old postgrexxx.jar from Agent's cache directory
- Replace /usr/hdp/<version>/hadoop/lib/postgresql-jdbc.jar with newer version if exists.
- Restart ambari-agent - Restart Hive (hiveserver2/metastore) from Ambari
- Run find command again to make sure the version is correct by checking the file size
.
.
Created ‎04-07-2017 03:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The following steps that you performed is good and suggested as per the doc. http://docs.hortonworks.com/HDPDocuments/Ambari-2.2.2.18/bk_ambari-reference/content/_using_hive_wit...
ambari-server setup --jdbc-db=postgres --jdbc-driver=/usr/share/java/postgresql94-jdbc.jar
.
However if you are still facing any issue then please check the output of "lsof" command to verify which JAR is being loaded by your hive.
lsof -p $PID | grep postgresql
.
Still if you find that old jar is being used then try restarting the hive and see if it works. Also perform the following steps as last option.
On the HiveServer2/Metastore Server
- find / -name 'postgre*.jar' -ls
- Remove old postgrexxx.jar from Agent's tmp directory and /usr/hdb/<version>/hive/lib
- Remove old postgrexxx.jar from Agent's cache directory
- Replace /usr/hdp/<version>/hadoop/lib/postgresql-jdbc.jar with newer version if exists.
- Restart ambari-agent - Restart Hive (hiveserver2/metastore) from Ambari
- Run find command again to make sure the version is correct by checking the file size
.
.
