Basapuram Kumar created RANGER-4931:
---------------------------------------

             Summary: java.sql.SQLSyntaxErrorException: Unknown column 
'rangerusersyncID' in 'field list' 
                 Key: RANGER-4931
                 URL: https://issues.apache.org/jira/browse/RANGER-4931
             Project: Ranger
          Issue Type: Bug
          Components: admin
    Affects Versions: 2.5.0
            Reporter: Basapuram Kumar


Trying upgrade ranger from 2.3.0 to 2.5.0, but failed with the below error.

 

 
{noformat}
2024-09-12 20:32:52,340  [I] Patch 070-add-gds-perm.sql is being applied..
2024-09-12 20:32:52,340  [JISQL] /usr/lib/jvm/java-11-openjdk/bin/java  -cp 
/usr/odp/current/ranger-admin/ews/lib/mysql-jdbc-driver.jar:/usr/odp/current/ranger-admin/jisql/lib/*
 org.apache.util.sql.Jisql -driver mysqlconj -cstring 
jdbc:mysql://ce19.acceldata.dvl/ranger?useSSL=false -u 'ranger' -p '********' 
-noheader -trim -c \; -input 
/usr/odp/current/ranger-admin/db/mysql/patches/070-add-gds-perm.sql 
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class 
is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the 
SPI and manual loading of the driver class is generally unnecessary.
Error executing: call insertRangerPrerequisiteGDSEntries(); 

java.sql.SQLSyntaxErrorException: Unknown column 'rangerusersyncID' in 'field 
list'
SQLException : SQL state: 42S22 java.sql.SQLSyntaxErrorException: Unknown 
column 'rangerusersyncID' in 'field list' ErrorCode: 1054

2024-09-12 20:32:52,542  [JISQL] /usr/lib/jvm/java-11-openjdk/bin/java  -cp 
/usr/odp/current/ranger-admin/ews/lib/mysql-jdbc-driver.jar:/usr/odp/current/ranger-admin/jisql/lib/*
 org.apache.util.sql.Jisql -driver mysqlconj -cstring 
jdbc:mysql://ce19.acceldata.dvl/ranger?useSSL=false -u 'ranger' -p '********' 
-noheader -trim -c \;  -query "select version from x_db_version_h where version 
= '070' and active = 'Y';"

2024-09-12 20:32:52,704  [JISQL] /usr/lib/jvm/java-11-openjdk/bin/java  -cp 
/usr/odp/current/ranger-admin/ews/lib/mysql-jdbc-driver.jar:/usr/odp/current/ranger-admin/jisql/lib/*
 org.apache.util.sql.Jisql -driver mysqlconj -cstring 
jdbc:mysql://ce19.acceldata.dvl/ranger?useSSL=false -u 'ranger' -p '********' 
-noheader -trim -c \;  -query "delete from x_db_version_h where version = '070' 
and active = 'N' and updated_by='ce19.acceldata.dvl';"

2024-09-12 20:32:52,858  [E] 070-add-gds-perm.sql import failed!{noformat}
 

 

As a workaround, added the requuired columns in the "070-add-gds-perm.sql ", 
with that, able to pass this stage.

Added these columns after L43.
[https://github.com/apache/ranger/blob/master/security-admin/db/mysql/patches/070-add-gds-perm.sql#L43]

 

 

 

 

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to