Hi Chaoran, Could you try updating MySQL to v5.7 and try? Or you can use CentOS 7 which comes with MariaDB. Let me know if these solutions work.
Thanks Regards, Anirudh On Mon, Jun 19, 2017 at 3:00 PM, Velmurugan Periasamy <[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]> > Reply-To: "[email protected]" <[email protected]> > Date: Monday, June 19, 2017 at 3:23 PM > To: "[email protected]" <[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-ad > min/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-ad > min/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 > > >
