Apache Ranger Admin Service failed to start!
Apache Ranger Admin Service failed to start!
·
由於我手賤,想要重啟一下ranger admin,但是出現了如下的bug
[root@hadoop102 bin]# sudo -i -u ranger ranger-admin start
-bash: /bin/ranger-admin: Permission denied
[root@hadoop102 bin]# chmod 777 ranger-admin
[root@hadoop102 bin]# sudo -i -u ranger ranger-admin start
Starting Apache Ranger Admin Service
/bin/ranger-admin: line 88: /opt/module/ranger/ranger-2.0.0-admin/ews/logs/catalina.out: Permission denied
Apache Ranger Admin Service failed to start!
[root@hadoop102 bin]# sudo -i -u ranger ranger-admin stop
Apache Ranger Admin Service is not running
[root@hadoop102 bin]# sudo -i -u ranger ranger-admin start
Starting Apache Ranger Admin Service
/bin/ranger-admin: line 88: /opt/module/ranger/ranger-2.0.0-admin/ews/logs/catalina.out: Permission denied
Apache Ranger Admin Service failed to start!
[root@hadoop102 bin]# cd /opt/module/ranger/
[root@hadoop102 ranger]# ll
把catalina.out刪除也不行,把logs刪除也不行
後面的解決方案是重新執行.setup.sh命令即可
[root@hadoop102 ranger-2.0.0-admin]# ./setup.sh
2023-07-01 12:36:18,620 --------- Running Ranger PolicyManager Web Application Install Script ---------
2023-07-01 12:36:18,622 [I] uname=Linux
2023-07-01 12:36:18,625 [I] hostname=hadoop102
2023-07-01 12:36:18,630 [I] DB_FLAVOR=MYSQL
2023-07-01 12:36:18,634 [I] Audit source=solr
2023-07-01 12:36:18,637 [I] Checking distribution name..
2023-07-01 12:36:18,652 [I] Found distribution : CentOS
2023-07-01 12:36:18,653 [I] check if command /opt/module/java/bin/java exists
2023-07-01 12:36:18,655 [I] '/opt/module/java/bin/java' command found
2023-07-01 12:36:18,743 [I] Checking MYSQL CONNECTOR FILE : /opt/software/mysql-connector-java-5.1.27-bin.jar
2023-07-01 12:36:18,744 [I] MYSQL CONNECTOR FILE : /opt/software/mysql-connector-java-5.1.27-bin.jar file found
2023-07-01 12:36:18,746 [I] Setting up UNIX user : ranger and group: ranger
2023-07-01 12:36:18,754 [I] the ranger user already exists and belongs to group ranger
2023-07-01 12:36:18,756 [I] Setting up UNIX user : ranger and group: ranger DONE
2023-07-01 12:36:18,757 [I] Setting up installation files and directory
2023-07-01 12:36:18,764 [I] Setting up init.d
2023-07-01 12:36:18,768 [I] Creating script S88ranger-admin/K90ranger-admin in /etc/rc2.d directory ....
2023-07-01 12:36:18,773 [I] Creating script S88ranger-admin/K90ranger-admin in /etc/rc3.d directory ....
2023-07-01 12:36:18,777 [I] Creating script S88ranger-admin/K90ranger-admin in /etc/rc.d/rc2.d directory ....
2023-07-01 12:36:18,781 [I] Creating script S88ranger-admin/K90ranger-admin in /etc/rc.d/rc3.d directory ....
2023-07-01 12:36:18,792 [I] Setting up installation files and directory DONE
2023-07-01 12:36:18,818 [I] /opt/module/ranger/ranger-2.0.0-admin/ews/webapp folder found
2023-07-01 12:36:18,819 [I] db/mysql/optimized/current/ranger_core_db_mysql.sql file found
2023-07-01 12:36:18,821 [I] Copying MYSQL Connector to /opt/module/ranger/ranger-2.0.0-admin/ews/webapp/WEB-INF/lib
2023-07-01 12:36:18,825 [I] Copying MYSQL Connector to /opt/module/ranger/ranger-2.0.0-admin/ews/webapp/WEB-INF/lib DONE
2023-07-01 12:36:18,826 [I] check if command python exists
2023-07-01 12:36:18,828 [I] 'python' command found
2023-07-01 12:36:19,122 [I] DB FLAVOR :MYSQL
2023-07-01 12:36:19,122 [I] --------- Verifying Ranger DB connection ---------
2023-07-01 12:36:19,122 [I] Checking connection..
2023-07-01 12:36:19,122 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "select 1;"
2023-07-01 12:36:19,493 [I] Checking connection passed.
2023-07-01 12:36:19,502 [E] 'setup_mode' not found in /opt/module/ranger/ranger-2.0.0-admin/install.properties file while getting....!!
2023-07-01 12:36:19,503 [I] Setup mode is not set. Running DBA steps..
2023-07-01 12:36:19,555 [I] Running DBA setup script. QuiteMode:True
2023-07-01 12:36:19,555 [I] Using Java:/opt/module/java/bin/java
2023-07-01 12:36:19,555 [I] DB FLAVOR:MYSQL
2023-07-01 12:36:19,555 [I] DB Host:hadoop102
2023-07-01 12:36:19,555 [I] ---------- Verifying DB root password ----------
2023-07-01 12:36:19,556 [I] DBA root user password validated
2023-07-01 12:36:19,556 [I] ---------- Verifying Ranger Admin db user password ----------
2023-07-01 12:36:19,556 [I] admin user password validated
2023-07-01 12:36:19,556 [I] ---------- Creating Ranger Admin db user ----------
2023-07-01 12:36:19,556 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "SELECT version();"
2023-07-01 12:36:19,928 [I] Verifying user ranger for Host %
2023-07-01 12:36:19,929 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='ranger' and host='%';"
2023-07-01 12:36:20,297 [I] MySQL user ranger already exists for host %
2023-07-01 12:36:20,297 [I] Verifying user ranger for Host localhost
2023-07-01 12:36:20,297 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='ranger' and host='localhost';"
2023-07-01 12:36:20,679 [I] MySQL user ranger already exists for host localhost
2023-07-01 12:36:20,679 [I] Verifying user ranger for Host hadoop102
2023-07-01 12:36:20,679 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "select user from mysql.user where user='ranger' and host='hadoop102';"
2023-07-01 12:36:21,048 [I] MySQL user ranger already exists for host hadoop102
2023-07-01 12:36:21,048 [I] ---------- Creating Ranger Admin database ----------
2023-07-01 12:36:21,048 [I] Verifying database ranger
2023-07-01 12:36:21,048 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "show databases like 'ranger';"
2023-07-01 12:36:21,418 [I] Database ranger already exists.
2023-07-01 12:36:21,418 [I] ---------- Granting permission to Ranger Admin db user ----------
2023-07-01 12:36:21,418 [I] ---------- Granting privileges TO user 'ranger'@'%' on db 'ranger'----------
2023-07-01 12:36:21,418 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "grant all privileges on ranger.* to 'ranger'@'%' with grant option;"
2023-07-01 12:36:21,779 [I] ---------- FLUSH PRIVILEGES ----------
2023-07-01 12:36:21,780 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "FLUSH PRIVILEGES;"
2023-07-01 12:36:22,145 [I] Privileges granted to 'ranger' on 'ranger'
2023-07-01 12:36:22,145 [I] ---------- Granting privileges TO user 'ranger'@'localhost' on db 'ranger'----------
2023-07-01 12:36:22,145 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "grant all privileges on ranger.* to 'ranger'@'localhost' with grant option;"
2023-07-01 12:36:22,614 [I] ---------- FLUSH PRIVILEGES ----------
2023-07-01 12:36:22,614 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "FLUSH PRIVILEGES;"
2023-07-01 12:36:22,976 [I] Privileges granted to 'ranger' on 'ranger'
2023-07-01 12:36:22,976 [I] ---------- Granting privileges TO user 'ranger'@'hadoop102' on db 'ranger'----------
2023-07-01 12:36:22,976 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "grant all privileges on ranger.* to 'ranger'@'hadoop102' with grant option;"
2023-07-01 12:36:23,338 [I] ---------- FLUSH PRIVILEGES ----------
2023-07-01 12:36:23,338 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/mysql -u root -p '********' -noheader -trim -c \; -query "FLUSH PRIVILEGES;"
2023-07-01 12:36:23,758 [I] Privileges granted to 'ranger' on 'ranger'
2023-07-01 12:36:23,759 [I] ---------- Ranger Policy Manager DB and User Creation Process Completed.. ----------
2023-07-01 12:36:23,766 [I] /opt/module/ranger/ranger-2.0.0-admin/ews/webapp/WEB-INF/classes/conf/ranger-admin-site.xml file found
2023-07-01 12:36:23,768 [I] /opt/module/ranger/ranger-2.0.0-admin/ews/webapp/WEB-INF/classes/conf/ranger-admin-default-site.xml file found
Starting configuration for Ranger DB credentials:
Using Java:/opt/module/java/bin/java
Alias ranger.db.password created successfully!
Starting configuration for solr credentials:
Using Java:/opt/module/java/bin/java
Alias ranger.solr.password created successfully!
Using Java:/opt/module/java/bin/java
Alias unixAuthKeyStoreAlias created successfully!
Using Java:/opt/module/java/bin/java
Alias unixAuthTrustStoreAlias created successfully!
2023-07-01 12:36:28,823 [I] Starting setup based on user authentication method=NONE
/opt/module/ranger/ranger-2.0.0-admin/ews/webapp
2023-07-01 12:36:28,848 [I] Finished setup based on user authentication method=NONE
ln -sf /opt/module/ranger/ranger-2.0.0-admin/ews/webapp/WEB-INF/classes/conf /opt/module/ranger/ranger-2.0.0-admin/conf
2023-07-01 12:36:29,042 [I] DB FLAVOR :MYSQL
2023-07-01 12:36:29,042 [I] --------- Verifying Ranger DB connection ---------
2023-07-01 12:36:29,042 [I] Checking connection..
2023-07-01 12:36:29,042 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "select 1;"
2023-07-01 12:36:29,411 [I] Checking connection passed.
2023-07-01 12:36:29,411 [I] --------- Verifying version history table ---------
2023-07-01 12:36:29,411 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "show tables like 'x_db_version_h';"
2023-07-01 12:36:29,771 [I] Table x_db_version_h already exists in database 'ranger'
2023-07-01 12:36:29,771 [I] --------- Importing Ranger Core DB Schema ---------
2023-07-01 12:36:29,772 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = 'CORE_DB_SCHEMA' and active = 'Y';"
2023-07-01 12:36:30,131 [I] CORE_DB_SCHEMA is already imported
2023-07-01 12:36:30,131 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = 'DB_PATCHES' and inst_by = 'Ranger 2.0.0' and active = 'Y';"
2023-07-01 12:36:30,501 [I] DB_PATCHES have already been applied
2023-07-01 12:36:30,706 [I] DB FLAVOR :MYSQL
2023-07-01 12:36:30,707 [I] --------- Verifying Ranger DB connection ---------
2023-07-01 12:36:30,707 [I] Checking connection..
2023-07-01 12:36:30,707 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "select 1;"
2023-07-01 12:36:31,100 [I] Checking connection passed.
2023-07-01 12:36:31,100 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = 'JAVA_PATCHES' and inst_by = 'Ranger 2.0.0' and active = 'Y';"
2023-07-01 12:36:31,483 [I] JAVA_PATCHES have already been applied
2023-07-01 12:36:31,673 [I] DB FLAVOR :MYSQL
2023-07-01 12:36:31,673 [I] --------- Verifying Ranger DB connection ---------
2023-07-01 12:36:31,673 [I] Checking connection..
2023-07-01 12:36:31,673 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "select 1;"
2023-07-01 12:36:32,052 [I] Checking connection passed.
2023-07-01 12:36:32,053 [JISQL] /opt/module/java/bin/java -cp /opt/software/mysql-connector-java-5.1.27-bin.jar:/opt/module/ranger/ranger-2.0.0-admin/jisql/lib/* org.apache.util.sql.Jisql -driver mysqlconj -cstring jdbc:mysql://hadoop102/ranger -u 'ranger' -p '********' -noheader -trim -c \; -query "select version from x_db_version_h where version = 'DEFAULT_ALL_ADMIN_UPDATE' and active = 'Y';"
2023-07-01 12:36:32,428 [I] Ranger all admins default password has already been changed!!
Installation of Ranger PolicyManager Web Application is completed.
重啟啟動
[root@hadoop102 ranger-2.0.0-admin]# sudo -i -u ranger ranger-admin start
Starting Apache Ranger Admin Service
Apache Ranger Admin Service with pid 10616 has started.
[root@hadoop102 ranger-2.0.0-admin]#
更多推荐
已为社区贡献1条内容
所有评论(0)