ranger-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Haihui Xu (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (RANGER-2234) Cannot add or update a child row,a foreign key constraint fails when installing ranger-admin
Date Wed, 26 Sep 2018 08:59:00 GMT

     [ https://issues.apache.org/jira/browse/RANGER-2234?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Haihui Xu updated RANGER-2234:
------------------------------
    Description: 
Install ranger-admin, execute setup.sh, in progress something happend, the error logs are
as flowing:

2018-09-21 01:46:51,570 [JISQL] /usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/bch/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/bch/3.0.0/ranger-admin/jisql/lib/*
org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://bigcloudhc5/ranger -u 'ranger'
-p '********' -noheader -trim -c \; -input /usr/bch/3.0.0/ranger-admin/db/mysql/patches/006-createdefaultpublicgroup.sql
Error executing: call insert_public_group_in_x_group_table();
com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add or
update a child row: a foreign key constraint fails (`ranger`.`x_group`, CONSTRAINT `x_group_FK_added_by_id`
FOREIGN KEY (`added_by_id`) REFERENCES `x_portal_user` (`id`))
SQLException : SQL state: 23000 com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Cannot add or update a child row: a foreign key constraint fails (`ranger`.`x_group`, CONSTRAINT
`x_group_FK_added_by_id` FOREIGN KEY (`added_by_id`) REFERENCES `x_portal_user` (`id`)) ErrorCode:
1452
2018-09-21 01:46:52,005 [JISQL] /usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/bch/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/bch/3.0.0/ranger-admin/jisql/lib/*
org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://bigcloudhc5/ranger -u 'ranger'
-p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version
= '006' and active = 'Y';"
2018-09-21 01:46:52,575 [JISQL] /usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/bch/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/bch/3.0.0/ranger-admin/jisql/lib/*
org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://bigcloudhc5/ranger -u 'ranger'
-p '********' -noheader -trim -c \; -query "delete from x_db_version_h where version='006'
and active='N' and updated_by='bigcloudhc7';"
2018-09-21 01:46:53,036 [E] 006-createdefaultpublicgroup.sql import failed!

  was:Install ranger-admin, execute setup.sh,


> Cannot add or update a child row,a foreign key constraint fails when installing ranger-admin
> --------------------------------------------------------------------------------------------
>
>                 Key: RANGER-2234
>                 URL: https://issues.apache.org/jira/browse/RANGER-2234
>             Project: Ranger
>          Issue Type: Bug
>          Components: admin, Ranger
>    Affects Versions: 1.1.0
>            Reporter: Haihui Xu
>            Assignee: Haihui Xu
>            Priority: Major
>              Labels: patch
>             Fix For: 2.0.0, 1.2.0
>
>
> Install ranger-admin, execute setup.sh, in progress something happend, the error logs
are as flowing:
> 2018-09-21 01:46:51,570 [JISQL] /usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/bch/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/bch/3.0.0/ranger-admin/jisql/lib/*
org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://bigcloudhc5/ranger -u 'ranger'
-p '********' -noheader -trim -c \; -input /usr/bch/3.0.0/ranger-admin/db/mysql/patches/006-createdefaultpublicgroup.sql
> Error executing: call insert_public_group_in_x_group_table();
> com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Cannot add
or update a child row: a foreign key constraint fails (`ranger`.`x_group`, CONSTRAINT `x_group_FK_added_by_id`
FOREIGN KEY (`added_by_id`) REFERENCES `x_portal_user` (`id`))
> SQLException : SQL state: 23000 com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException:
Cannot add or update a child row: a foreign key constraint fails (`ranger`.`x_group`, CONSTRAINT
`x_group_FK_added_by_id` FOREIGN KEY (`added_by_id`) REFERENCES `x_portal_user` (`id`)) ErrorCode:
1452
> 2018-09-21 01:46:52,005 [JISQL] /usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/bch/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/bch/3.0.0/ranger-admin/jisql/lib/*
org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://bigcloudhc5/ranger -u 'ranger'
-p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version
= '006' and active = 'Y';"
> 2018-09-21 01:46:52,575 [JISQL] /usr/jdk64/jdk1.8.0_112/bin/java -cp /usr/bch/current/ranger-admin/ews/lib/mysql-connector-java.jar:/usr/bch/3.0.0/ranger-admin/jisql/lib/*
org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://bigcloudhc5/ranger -u 'ranger'
-p '********' -noheader -trim -c \; -query "delete from x_db_version_h where version='006'
and active='N' and updated_by='bigcloudhc7';"
> 2018-09-21 01:46:53,036 [E] 006-createdefaultpublicgroup.sql import failed!



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message