Skip to main content
h2rr821
Silver ⭐️⭐️
Jul 27, 2023 8:09 PM UTC
Question

How to upgrade the postgresql jdbc driver

I am using redhat 7.9 OS, and CM 7.7.1.

base on the  CVE-2022-41946 security issue,

https://www.postgresql.org/about/news/postgresql-jdbc-4251-4243-4238-42227jre7-security-update-for-cve-2022-41946-2551/

I need to upgrade the cloudera postgresql jdbc driver files

 

I saw the jdbc driver file is the following for the CDH-7.1.8.:

/opt/cloudera/cm/common_jars/postgresql-42.2.14.jre7.6ce27816399941030df9ad06f89fa77b.jar
/opt/cloudera/cm/common_jars/postgresql-42.2.24.jre7.a7b0f155b668470fb4e212e79724cc7d.jar

 

/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.3.2.jar
/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.3.3.jar
/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.2.16.jar

 

I think just do a replacement for those jar files is a risk.

 

How can I upgrade those file to PostgreSQL JDBC Driver version 42.2.27, 42.3.8, 42.4.3, 42.5.1, or later.

 

Thank you!!

3 replies

h2rr821
h2rr821Author
Silver ⭐️⭐️
Jul 31, 2023 9:18 PM UTC

I try to replace it with the latest jdbc jar file(postgresql-42.2.27.jre7.jar and postgresql-42.3.8.jar).

then the schema registry server will has problem. 

 

 

Translate
Kartik_Agarwal
Platinum ⭐️
Platinum ⭐️
Aug 1, 2023 6:33 AM UTC

@h2rr821 Please perform the below steps. 

  1. Identify compatible version
  2. Backup of the existing Cloudera PostgreSQL JDBC driver files
  3. Download the new PostgreSQL JDBC driver files.
  4. Stop Cloudera services using the PostgreSQL JDBC driver
  5. Replace old JAR files with the new ones
  6. Ensure new JAR files have correct permissions.
  7. Start services: Restart Cloudera services.

If you found that the provided solution(s) assisted you with your query, please take a moment to login and click Accept as Solution below each response that helped.

Translate
h2rr821
h2rr821Author
Silver ⭐️⭐️
Aug 1, 2023 4:17 PM UTC

1. Identify compatible version

2. Backup of the existing Cloudera PostgreSQL JDBC driver files(postgresql-42.3.2.jar,postgresql-42.3.3.jar, postgresql-42.2.16.jar)

3. Download the new PostgreSQL JDBC driver files(postgresql-42.6.0.jar, postgresql-42.2.27.jre7.jar, and postgresql-42.3.8.jar).

4. Stop Cloudera services using the Web-UI and command(I do not understand how to Stop Cloudera services using the PostgreSQL JDBC driver)

 5. Replace old JAR files: 

/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.3.2.jar
/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.3.3.jar
/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.2.16.jar

with the new ones

/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.6.0.jar
/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.3.8.jar
/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/postgresql-42.2.27.jre7.jar

6. Ensure new JAR files have correct permissions.

7. Start services: Restart Cloudera services.

Then the schema registry server will has problem. It do run for a while, and it fail. I cannot successfully restart the schema registry server without put back the old jar file to the folder(/opt/cloudera/parcels/CDH-7.1.8-1.cdh7.1.8.p0.30990532/jars/)

Translate