Created 07-15-2016 01:48 PM
Greetings,
I need to change the Ranger database to PostgreSQL for a Proof Of Concept in the Sandbox, so I ran /usr/hdp/current/ranger-admin.setup.sh, which failed due to what due to the inability to connect to the PostgreSQL as root.
2016-07-15 13:34:22,906 [JISQL] /usr/lib/jvm/java/bin/java -cp /usr/share/java/postgresql-jdbc.jar:/usr/hdp/2.4.0.0-169/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver postgresql -cstring jdbc:postgresql://localhost/postgres -u root -p '********' -noheader -trim -c \; -query "SELECT 1;" SQLException : SQL state: 28000 org.postgresql.util.PSQLException: FATAL: Ident authentication failed for user "root" ErrorCode: 0
I tried creating a superuser rangerdba in PostgreSQL and running the setup.sh with it and ended up with this pg_hba.conf, which seemed to allow me to load the database
# "local" is for Unix domain socket connections only local all postgres ident # IPv4 local connections: host all postgres 127.0.0.1/32 ident host postgres root,rangerdba,rangeradmin 127.0.0.1/32 md5 host ranger root,rangerdba,rangeradmin 127.0.0.1/32 md5 host ranger_audit root,rangerdba,rangeradmin,rangerlogger 127.0.0.1/32 md5 # IPv6 local connections: host all postgres ::1/128 ident
However, the setup still does not complete successfully, it fails applying the PatchPasswordEncryption_J10001
2016-07-14 21:51:58,319 [I] java patch PatchPasswordEncryption_J10001 is being applied.. [EL Severe]: 2016-07-14 21:52:37.343--ServerSession(1446840711)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20131113-a7346c6): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Connections could not be acquired from the underlying database! Error Code: 0 [EL Severe]: ejb: 2016-07-14 21:52:37.363--ServerSession(1446840711)--Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20131113-a7346c6): org.eclipse.persistence.exceptions.DatabaseException Internal Exception: java.sql.SQLException: Connections could not be acquired from the underlying database! Error Code: 0 2016-07-14 21:52:37,498 [E] java patch PatchPasswordEncryption_J10001 failed
My question is, how can I switch the Ranger database to PostgreSQL? TIA.
-aaron
Created 07-18-2016 04:03 AM
Below are the steps to configure Ranger with PostgreSQL,
Created 07-18-2016 04:03 AM
Below are the steps to configure Ranger with PostgreSQL,