1. 程式人生 > >CDH5安裝失敗如何重新安裝

CDH5安裝失敗如何重新安裝

cdh安裝失敗的原因可能有以下原因:

1、機器記憶體不足,(server節點我用了6G,兩個agent節點均是4G才安裝成功)。

2、需要的mysql驅動檔案沒有拷貝到指定位置。

具體重新安裝步驟如下:

一、刪除cm庫

mysql> drop database cm;
Query OK, 45 rows affected (1.69 sec)

二、刪除agent節點相關資訊

rm -rf /opt/cm-5.12.0/lib/cloudera-scm-agent/*

三、如果安裝過程中agent節點產生了dd,dn資料,還需要將資料刪除。

四、重新建立cm資料庫

[[email protected]
opt]#  /opt/cm-5.12.0/share/cmf/schema/scm_prepare_database.sh mysql cm -hlocalhost -uroot -proot --scm-host localhost scm scm scm JAVA_HOME=/usr/java/jdk1.8.0_73 Verifying that we can write to /opt/cm-5.12.0/etc/cloudera-scm-server Thu Dec 21 02:11:55 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. Creating SCM configuration file in /opt/cm-5.12.0/etc/cloudera-scm-server Executing:  /usr/java/jdk1.8.0_73/bin/java -cp /usr/share/java/mysql-connector-java.jar:/usr/share/java/oracle-connector-java.jar:/opt/cm-5.12.0/share/cmf/schema/../lib/* com.cloudera.enterprise.dbutil.DbCommandExecutor /opt/cm-5.12.0/etc/cloudera-scm-server/db.properties com.cloudera.cmf.db. Thu Dec 21 02:11:55 CST 2017 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification. [                          main] DbCommandExecutor              INFO  Successfully connected to database. All done, your SCM database is configured correctly!

這一步中的引數說明:

mysql cm -hlocalhost -uroot -proot//這裡是需要連線的資料庫,型別:mysql,主機:localhost,使用者名稱:root,密碼:root,並且指定是需要連線cm資料庫。

--scm-host localhost scm scm scm//這裡指定/opt/cm-5.12.0/etc/cloudera-scm-server/db.properties,配置檔案中的內容,也是scm連線資料庫需要的使用者名稱,密碼,這裡出現三個scm,分別是使用者名稱,密碼,確認密碼。

五、分別啟動cloudera-scm-server和cloudera-scm-agent

[[email protected] log]# /opt/cm-5.12.0/etc/init.d/cloudera-scm-server start
Starting cloudera-scm-server:                              [  OK  ]
[[email protected] log]# 
[[email protected] log]# /opt/cm-5.12.0/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent:                               [  OK  ]
[[email protected] log]# 
[[email protected] log]# /opt/cm-5.12.0/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent:                               [  OK  ]
[[email protected] log]# 

到了這裡,就可以通過瀏覽器進入http://node01:7180頁面進行重新安裝了。

安裝完成,啟動hue時,可能會出現如下所示的錯誤:

Could not start SASL: Error in sasl_client_start (-4) SASL(-4): no mechanism available: No worthy mechs found

解決辦法就是通過yum安裝cyrus相關依賴。

yum install cyrus-sasl-devel cyrus-sasl-gssapi cyrus-sasl-plain -y