Hi Chaoran: This is a mysql config parameter and should be set in mysql. I tried it like below and it worked fine. No change from ranger script should be required. What version of mysql are you using?
mysql> set @@global.innodb_large_prefix = 1; Query OK, 0 rows affected (0.00 sec) Thank you, Vel From: Chaoran Wang <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Tuesday, June 20, 2017 at 5:22 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Cc: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Re: Could not setup range-admin 0.7.2, key was too long error Running ranger 7.1-release tagged branch result in the same error. [X][X][X][X]Any ideas?😅 On Tue, Jun 20, 2017 at 3:16 PM, Chaoran Wang <[email protected]<mailto:[email protected]>> wrote: Hi Vel, Thank you so much for the hint. However, when i try to run SET @@global.innodb_large_prefix = 1; in mysql, gives the following errors: ERROR 1193 (HY000): Unknown system variable 'innodb_large_prefix' What's the schema of the table i need to set for ranger-admin-0.7.1? It seems the stack overflow link is more of a general question of Specified key was too long; max key length is 1000 bytes. Do i need to modify the setup.sh script of ranger-admin-0.7.1 in order to achieve this? Really appreciated! Best, Chaoran On Mon, Jun 19, 2017 at 3:00 PM, Velmurugan Periasamy <[email protected]<mailto:[email protected]>> wrote: Hello Chaoran: This seems to be related to Mysql config. Try setting the below before running install script as mentioned here - https://stackoverflow.com/questions/8746207/1071-specified-key-was-too-long-max-key-length-is-1000-bytes SET @@global.innodb_large_prefix = 1; I am adding Ranger dev list to see if there are any other solutions. Thank you, Vel From: Chaoran Wang <[email protected]<mailto:[email protected]>> Reply-To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Date: Monday, June 19, 2017 at 3:23 PM To: "[email protected]<mailto:[email protected]>" <[email protected]<mailto:[email protected]>> Subject: Could not setup range-admin 0.7.2, key was too long error Hi, I am trying to install ranger on a CentOS server. While installing ranger 0.7.2's ranger-admin setup.sh script, I have encountered the following error: Error executing: CREATE TABLE `x_portal_user` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `create_time` datetime DEFAULT NULL, `update_time` datetime DEFAULT NULL, `added_by_id` bigint(20) DEFAULT NULL, `upd_by_id` bigint(20) DEFAULT NULL, `first_name` varchar(1022) DEFAULT NULL, `last_name` varchar(1022) DEFAULT NULL, `pub_scr_name` varchar(2048) DEFAULT NULL, `login_id` varchar(767) DEFAULT NULL, `password` varchar(512) NOT NULL, `email` varchar(512) DEFAULT NULL, `status` int(11) NOT NULL DEFAULT '0', `user_src` int(11) NOT NULL DEFAULT '0', `notes` varchar(4000) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `x_portal_user_UK_login_id` (`login_id`), UNIQUE KEY `x_portal_user_UK_email` (`email`), KEY `x_portal_user_FK_added_by_id` (`added_by_id`), KEY `x_portal_user_FK_upd_by_id` (`upd_by_id`), KEY `x_portal_user_cr_time` (`create_time`), KEY `x_portal_user_up_time` (`update_time`), KEY `x_portal_user_name` (`first_name`(767)), KEY `x_portal_user_email` (`email`), CONSTRAINT `x_portal_user_FK_added_by_id` FOREIGN KEY (`added_by_id`) REFERENCES `x_portal_user` (`id`), CONSTRAINT `x_portal_user_FK_upd_by_id` FOREIGN KEY (`upd_by_id`) REFERENCES `x_portal_user` (`id`) )AUTO_INCREMENT=2 ROW_FORMAT=DYNAMIC; com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 1000 bytes SQLException : SQL state: 42000 com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Specified key was too long; max key length is 1000 bytes ErrorCode: 1071 2017-06-19 20:06:48,237 [E] xa_core_db.sql file import failed! 2017-06-19 20:06:48,237 [I] CORE_DB_SCHEMA might being imported by some other process 2017-06-19 20:08:48,336 [JISQL] /usr/lib/jvm/java/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/local/ranger-0.7.2-SNAPSHOT-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://localhost/ranger -u 'rangeradmin' -p '********' -noheader -trim -c \; -query "show tables like 'xa_access_audit';" 2017-06-19 20:08:48,657 [I] Table xa_access_audit does not exist in database ranger 2017-06-19 20:08:48,657 [JISQL] /usr/lib/jvm/java/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/local/ranger-0.7.2-SNAPSHOT-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://localhost/ranger -u 'rangeradmin' -p '********' -noheader -trim -c \; -query "delete from x_db_version_h where version='CORE_DB_SCHEMA' and active='N' and updated_by='ranger24355-1000.dev.continuuity.net<http://ranger24355-1000.dev.continuuity.net>';" 2017-06-19 20:08:48,963 [E] CORE_DB_SCHEMA import failed! Could you please take a look at error and give me some hints on solution? Really appreciate! Chaoran
