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数据库
[root@node01 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
[root@node01 log]# /opt/cm-5.12.0/etc/init.d/cloudera-scm-server start
Starting cloudera-scm-server: [ OK ]
[root@node01 log]#
[root@node02 log]# /opt/cm-5.12.0/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent: [ OK ]
[root@node02 log]#
[root@node03 log]# /opt/cm-5.12.0/etc/init.d/cloudera-scm-agent start
Starting cloudera-scm-agent: [ OK ]
[root@node03 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