Ranger database upgrade failure
This section includes error messages and troubleshooting for issues noticed during Ranger upgrade.
- Duplicate entries in the x_portal_user table
- Ranger part of the upgrade from Cloudera Runtime 7.1.7 SP1 to 7.1.9 fails
at the Upgrade Ranger database and apply patches step with the
following error:
2025-08-29 12:21:56,766 [I] Patch 063-create-audit-metrics-schema.sql is being applied.. 2025-08-29 12:21:56,767 [JISQL] /path/to/java -cp /path/to/jdbc_connector_jar/:/path/to/ranger-admin/jisql/lib/* org.apache.util.sql.Jisql -driver postgresql -cstring jdbc:postgresql://${ranger_db_host}:${db_port}/ranger -u rangeradmin -p '********' -noheader -trim -c \; -input /path/to/ranger-admin/db/postgres/patches/063-create-audit-metrics-schema.sql SQLException : SQL state: 42830 org.postgresql.util.PSQLException: ERROR: there is no unique constraint matching given keys for referenced table "x_portal_user" ErrorCode: 0
