a) 创建cloudera-manager目录
b) 创建cloudera-scm用户
c) 配置从节点cloudera-manger-agent指向主节点服务器
Parcel本地源:软件包是以.parcel结尾,相当于压缩包格式的,一个系统版本对应一个,下载的时候方便。如centos 6.x使用的CDH版本为CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel,而centos 7.x使用的CDH版本为CDH-5.14.4-1.cdh5.14.4.p0.3-el7.parcel。
下载地址:http://archive.cloudera.com/cdh5/parcels/5.14/
CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel
CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel.sha
manifest.json
下载地址:http://archive-primary.cloudera.com/cm5/cm/5/
http://archive.cloudera.com/cm5/cm/5/cloudera-manager-el6-cm5.14.4_x86_64.tar.gz
cloudera-manager-el6-cm5.14.4_x86_64.tar.gz
Linux系统查看
Linux系统查看
[supdev@hadoop11 ~]$ cat /etc/redhat-release
CentOS release 6.5 (Final)
[supdev@hadoop11 ~]$ uname -a
Linux hadoop11 2.6.32-431.wy46.el6.x86_64 #1 SMP Wed Mar 7 00:00:43 CST 2018 x86_64 x86_64 x86_64 GNU/Linux
安装CDH要所需要点软件如下:
CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel
CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel.sha
cloudera-manager-el6-cm5.14.4_x86_64.tar.gz
manifest.json
mysql-connector-java-5.1.41.jar
安装CDH要所需要的路径如下,在/opt下面所需要建立的路径
/opt/cloudera
/opt/cloudera/parcel-repo
/opt/cloudera/parcels
/opt/cloudera-manager
/opt/cloudera-manager/cloudera
/opt/cloudera-manager/cm-5.14.4
1、设置免密
2、所有节点的/etc/hosts 要统一,要配对
3、安装及配置java
4、解压 cloudera-manager-el6-cm5.14.4_x86_64.tar.gz文件
5、设置 /opt/cloudera-manager/cm-5.14.4/etc/cloudera-scm-agent/config.ini 指定server host
6、启动 /opt/cloudera-manager/cm-5.14.4/etc/init.d/cloudera-scm-agent start
7、界面操作
备注:添加新节点其实和本文中安装agent一样,没有什么难的。还有/etc/hosts文件一定要一致,不让回出现问题:【不良 : 该主机已与 Cloudera Manager Server 建立联系。 该主机未与 Host Monitor 建立联系。】
三台机器安装java
[root@hadoop11 app]# cat /etc/profile
export JAVA_HOME=/export/app/jdk1.8.0_77
export PATH=$PATH:$JAVA_HOME/bin
[root@hadoop11 app]# java -version
java version "1.8.0_77"
Java(TM) SE Runtime Environment (build 1.8.0_77-b03)
Java HotSpot(TM) 64-Bit Server VM (build 25.77-b03, mixed mode)
方法一:暂时修改机器名:hostname
1、用hostname命令可以临时修改机器名,但机器重新启动之后就会恢复原来的值。
2、#hostname //查看机器名
3、#hostname -i //查看本机器名对应的ip地址
方法二:永久性修改机器名:修改系统配置文件
1、修改/etc/sysconfig/network //修改这个系统配置文件,才能有效改变机器名
2、/etc/hosts //hostname命令读这个配置文件
3、直接修改/etc/hosts文件,系统本身用到主机名的地方不会变化,所以
/etc/hosts 是网络中用的,/etc/sysconfig/network是本机起作用
结果如下:
[root@hadoop11 app]# cat /etc/sysconfig/network
hadoop11
[root@hadoop11 app]# cat /etc/hostname
hadoop11
[supdev@hadoop11 ~]$ cat /etc/hosts
127.0.0.1 localhost localhost. localdomain
192.168.200.11 hadoop11
192.168.200.12 hadoop12
192.168.200.13 hadoop13
[root@hadoop11 ~]# cd /root/
[root@hadoop11 ~]# rm -rf .ssh/
[root@hadoop11 ~]# ssh-keygen -t rsa
[root@hadoop11 ~]# cat .ssh/id_rsa.pub >> .ssh/authorized_keys
[root@hadoop11 ~]# chmod 700 .ssh
[root@hadoop11 ~]# chmod 600 .ssh/authorized_keys
登录集群所有机器
1) 重启后生效
开启:chkconfig iptables on
关闭:chkconfig iptables off
2) 即时生效,重启后失效
开启: service iptables start
关闭:service iptables stop
[supdev@hadoop11 ~]$ cat /etc/selinux/config
登录集群所有机器执行命令:
sed -i '/SELINUX/s/enforcing/disabled/' /etc/selinux/config
结果如下:SELINUX=disabled
[supdev@hadoop11 ~]$ cat /etc/selinux/config
# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
# enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing.
# disabled - SELinux is fully disabled.
SELINUX=disabled
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
[supdev@hadoop11 ~]$
登录Master机器
若可以联网,执行命令:
yum install mysql-server
若无法联网,google如何安装(_)
添加为自启动:
chkconfig mysqld on
启动mysql:
service mysqld start
修改root密码:
mysqladmin -u root password '123456'
进入mysql:
mysql -uroot -p123456
创建数据库:
create database hive DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
create database ooz DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
create database amon DEFAULT CHARSET utf8 COLLATE utf8_general_ci;
create database hue default charset utf8 collate utf8_general_ci;
create database sentry default charset utf8 collate utf8_general_ci;
授权:
grant all privileges on *.* to 'root'@'%' identified by '123456' with grant option;
flush privileges;
Centos6默认安装ntp服务,所有服务器屏蔽默认server
修改ntp配置文件(在所有服务器上执行)
cat /etc/ntp.conf
master机器:
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
restrict default nomodify notrap
server 127.127.1.0 prefer
includefile /etc/ntp/crypto/pw
keys /etc/ntp/keys
slave机器:
driftfile /var/lib/ntp/drift
restrict 127.0.0.1
restrict -6 ::1
restrict default kod nomodify notrap nopeer noquery
restrict -6 default kod nomodify notrap nopeer noquery
#这里是主节点的主机名或者ip
server hadoop1
include file /etc/ntp/crypto/pw
keys /etc/ntp/keys
启动NTP服务:
service ntpd start
登录Master机器,执行命令:
ntpdate -u 127.127.1.0
登录所有Slave机器,同步主节点执行命令:
ntpdate -u hadoop1
检查是否成功查看命令:
watch ntpq -p
yum -y install psmisc
yum -y install libxslt
yum -y install screen
yum -y install telnet
yum -y install lrzsz
CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel
CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel.sha
cloudera-manager-el6-cm5.14.4_x86_64.tar.gz
manifest.json
mysql-connector-java-5.1.41.jar
a) 创建cloudera-manager目录
每一台机器都需要cloudera-manager-el6-cm5.14.4_x86_64.tar.gz文件,建立创建cloudera-manager目录,建立cloudera-scm用户,修改配置从节点cloudera-manger-agent指向主节点服务器;
sudo mkdir cloudera-manager
[supdev@hadoop11 cloudera-manager]$ pwd
/opt/cloudera-manager
解压文件cloudera-manager-el6-cm5.14.4_x86_64.tar.gz到/opt/cloudera-manager目录中。
sudo tar -zxvf cloudera-manager-el6-cm5.14.4_x86_64.tar.gz
[supdev@hadoop11 cloudera-manager]$ ll
总用量 8
drwxr-xr-x 4 1106 4001 4096 7月 7 14:29 cloudera
drwxr-xr-x 9 1106 4001 4096 7月 7 14:29 cm-5.14.4
b) 创建cloudera-scm用户
登录集群所有机器,执行命令:
sudo useradd --system --home=/opt/cloudera-manager/cm-5.14.4/run/cloudera-scm-server --no-create-home --shell=/bin/false --comment "Cloudera SCM User" cloudera-scm
备注:–home=/opt/cloudera-manager/cm-5.14.4/run/cloudera-scm-server 这个路径要注意
c) 配置从节点cloudera-manger-agent指向主节点服务器
将server_host改为CMS所在的主机名即hadoop11
/opt/cloudera-manager/cm-5.14.4/etc/cloudera-scm-agent/config.ini
sudo mkdir -p /opt/cloudera/parcel-repo
sudo chown cloudera-scm:cloudera-scm /opt/cloudera/parcel-repo
将下面三个文件拷贝到/opt/cloudera/parcel-repo目录中
CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel
CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel.sha
manifest.json
注意:其中CDH-5.14.4-1.cdh5.14.4.p0.3-el6.parcel.sha1 后缀要把1去掉
sudo mkdir -p /opt/cloudera/parcels
sudo chown cloudera-scm:cloudera-scm /opt/cloudera/parcels
解释:Clouder-Manager将CDHs从主节点的/opt/cloudera/parcel-repo目录中抽取出来,分发解压激活到各个节点的/opt/cloudera/parcels目录中
其中“mysql-connector-java-5.1.41.jar”是我们需要的,将其拷贝到“/opt/cloudera-manager/cm-5.14.4/share/cmf/lib/”路径下。
备注:执行scm_prepare_database.sh需要切换到root用户
cp mysql-connector-java-5.1.41.jar /opt/cloudera-manager/cm-5.14.4/share/cmf/lib/
/opt/cloudera-manager/cm-5.14.4//share/cmf/schema/scm_prepare_database.sh mysql -hhadoo11 -uroot -p123456 --scm-host hadoop11 scm scm 123456
说明:这个脚本就是用来创建和配置CMS需要的数据库的脚本。各参数是指:
mysql:数据库用的是mysql,如果安装过程中用的oracle,那么该参数就应该改为oracle。
-hhadoop11:数据库建立在YZ-222-16-114.h.chinabank.com.cn主机上面。也就是主节点上面。注意主机前面有个“h”
-uroot:root身份运行mysql。-Mysql_123456:mysql的root密码是Mysql_123456。
--scm-host hadoop11:CMS的主机,一般是和mysql安装的主机是在同一个主机上。
最后三个参数是:数据库名,数据库用户名,数据库密码。
登录master节点,使用root账户执行命令:
/opt/cloudera-manager/cm-5.14.4/etc/init.d/cloudera-scm-server start
日志路径
/opt/cloudera-manager/cm-5.14.4/log/cloudera-scm-server/cloudera-scm-server.log
登录集群所有机器,使用root账户执行命令:
/opt/cloudera-manager/cm-5.14.4/etc/init.d/cloudera-scm-agent start
日志路径
/opt/cloudera-manager/cm-5.14.4/log/cloudera-scm-agent/cloudera-scm-agent.log
浏览器打开: IP:7180
可以看到所下载并安装的CDH版本表示前面部署成功,否则需要在线下载。
前面配置无误则无须下载,否则表示前面配置有误。
分发可能需要一段时间,视集群大小而定(此时集群一定要保证Master可以免密码登录到其它机器上)。
检查集群的状况,可根据提示信息修改配置并重新检查。
问题:Cloudera 建议将 /proc/sys/vm/swappiness 设置为 0。当前设置为 60。
echo 10 > /proc/sys/vm/swappiness
echo never > /sys/kernel/mm/transparent_hugepage/defrag
echo never > /sys/kernel/mm/transparent_hugepage/enabled
选择需要安装的组件,可自定义安装。 这个可以选择少点,安装好CM之后可以慢慢添加服务。
给集群各个节点分配角色,目前所知道需要注意的地方是HBase Thrift Server不要为空,否则Hue无法访问HBase。
主要看hive的角色
设置mysql连接。
注意: 这里很容易报错,都是表权限、名称、密码的错误。
ERROR: JDBC driver cannot be found. Unable to find the JDBC database jar on host : IP
解决:将mysql-connector-java-5.1.41.jar,复制到 【IP】对应服务的/opt/cloudera-manager/cm-5.14.4/share/cmf/lib/路径下面
后面的一路“继续”下去即可。安装所需时间较长,请耐心等待。
Hive错误,
cp -r mysql-connector-java-5.1.41.jar /usr/share/java/mysql-connector-java.jar
备注:这里一般出现创建表错误,看看是哪一台服务器上面,按照错误将mysql放入指定路径就OK了。
[27/Dec/2018 13:36:39 +0000] 40258 MainThread agent ERROR Failed to connect to previous supervisor.
Traceback (most recent call last):
File "/opt/cloudera-manager/cm-5.14.4/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.14.4-py2.6.egg/cmf/agent.py", line 2145, in find_or_start_supervisor
self.get_supervisor_process_info()
File "/opt/cloudera-manager/cm-5.14.4/lib64/cmf/agent/build/env/lib/python2.6/site-packages/cmf-5.14.4-py2.6.egg/cmf/agent.py", line 2289, in get_supervisor_process_info
self.identifier = self.supervisor_client.supervisor.getIdentification()
File "/usr/lib64/python2.6/xmlrpclib.py", line 1199, in __call__
return self.__send(self.__name, args)
File "/usr/lib64/python2.6/xmlrpclib.py", line 1489, in __request
verbose=self.__verbose
File "/opt/cloudera-manager/cm-5.14.4/lib64/cmf/agent/build/env/lib/python2.6/site-packages/supervisor-3.0-py2.6.egg/supervisor/xmlrpc.py", line 470, in request
'' )
解决:
ps ax | fgrep supervisord 看下是否有老的进程。
2018-12-27 10:57:57,336 ERROR SearchRepositoryManager-0:com.cloudera.server.web.cmf.search.components.SearchRepositoryManager: The server storage directory [/var/lib/cloudera-scm-server] doesn't exist.
2018-12-27 10:57:57,336 ERROR SearchRepositoryManager-0:com.cloudera.server.web.cmf.search.components.SearchRepositoryManager: No read permission to the server storage directory [/var/lib/cloudera-scm-server]
2018-12-27 10:57:57,336 ERROR SearchRepositoryManager-0:com.cloudera.server.web.cmf.search.components.SearchRepositoryManager: No write permission to the server storage directory [/var/lib/cloudera-scm-server]
解决:
创建目录并加上权限以后成功
mkdir /var/lib/cloudera-scm-server
chown -R cloudera-scm.cloudera-scm /var/lib/cloudera-scm-server
修改dfs.permissions为false,如下图所示。
一般是没有问题的,可能服务器较卡导致的,多刷新几次即可。
把mysql-connector-java-5.1.34-bin.jar 拷到/opt/cloudera/parcels/CDH-5.3.6-1.cdh5.3.6.p0.11/lib/hive/lib
把mysql-connector-java-5.1.34-bin.jar 拷到/opt/cloudera/parcels/CDH-5.3.6-1.cdh5.3.6.p0.11/lib/oozie/lib和 /var/lib/oozie/下
可以 ps -ef | grep agent看看,把启动的agent服务关了
可以 ps -ef | grep server看看,把启动的server服务关了
解决方法为修改/opt/cm-5.3.0/lib64/cmf/agent/src/cmf/util.py文件。
将其中的代码:
pipe = subprocess.Popen([’/bin/bash’, ‘-c’, “. %s; %s; env” % (path, command)],
stdout=subprocess.PIPE, env=caller_env)
修改为:
pipe = subprocess.Popen([’/bin/bash’, ‘-c’, “. %s; %s; env | grep -v { | grep -v }” % (path, command)],
stdout=subprocess.PIPE, env=caller_env)
然后重启所有Agent即可。
df -h 查看cm后台进程,用umount 进程名 ,删除再试试
1)可以看看是否创建了相应的数据库
2)可能是master主机下的root用户在mysql数据库的密码为空
登陆mysql,use mysql;
update User set password=‘xxxx’where hostname=‘master’and user=‘root’;
commit;
flush privileges;
**10、注意master要免密码登录自己 **
11、8888,50070,8088等端口无法访问
现象:master机器通过wget可以正确的得到页面,但是外网却无法获取,而且网络的设置是正确的。
查看端口占用发现这些端口全部绑定在内网IP上而不是0.0.0.0。
解决方法:去各自的配置文件中配置即可,选择绑定至0.0.0.0端口,然后重启即可。
12、oozie服务启动失败
通常是第二次尝试安装中才会遇到,报错内容大概是数据库已存在。
解决方法:删除/var/lib/oozie/data文件夹即可。
13、HUE服务启动失败
报错信息是找不到libxslt.so.1。
解决方法:yum install libxslt即可。
14、如果hadoop fs -mkdir /user/mmm时出错,是由于权限问题引起的,可以通过cm端找到hdfs服务修改 相应配置
15、用Apache的spark调用 cdh的yarnHA会出问题,去掉HA配置就会好了,问题是:
java.lang.IllegalArgumentException: Invalid ContainerId: container_e02_1483668670771_0005_02_000001
16、应用 spark的HiveContext 时,如果没有配置Hive服务以及和spark的依赖关系,则 HiveContext 会用derby 数据库,造成不能同时有两个应用运行。通过配置以MySQL为元数据库的Hive后,此问题不复存在。
具体问题见下:
Caused by: ERROR XSDB6: Another instance ofDerbymay have already booted the database ~~~~
**17、为了能让 nodemanager机器上也能启动yarn任务,需在yarn-site.xml 中配置 **
yarn.resourcemanager.address XXX:8032
yarn.resourcemanager.scheduler.address XXX:8030
yarn.resourcemanager.resource-tracker.address XXX:8031
yarn.resourcemanager.hostname XXX
yarn.resourcemanager.admin.address XXX:8033
18、初始化scm_prepare_database.sh错误
问题如下:
[root@YZ-25-33-201 ~]# /opt/cloudera-manager/cm-5.14.4//share/cmf/schema/scm_prepare_database.sh mysql -hhadoop11 -uroot -p123456 --scm-host hadoop11 scm scm 123456
JAVA_HOME=/export/app/jdk1.8.0_77
Verifying that we can write to /opt/cloudera-manager/cm-5.14.4/etc/cloudera-scm-server
[ main] DbProvisioner ERROR Exception when creating/dropping database with user 'root' and jdbc url 'jdbc:mysql://hadoop11/?useUnicode=true&characterEncoding=UTF-8'
java.sql.SQLException: Access denied for user 'root'@'YZ-25-33-201.h.chinabank.com.cn' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4420)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1278)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2205)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2236)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2035)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:790)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)[mysql-connector-java-5.1.41.jar:5.1.41]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.8.0_77]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_77]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_77]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[:1.8.0_77]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)[mysql-connector-java-5.1.41.jar:5.1.41]
at java.sql.DriverManager.getConnection(DriverManager.java:664)[:1.8.0_77]
at java.sql.DriverManager.getConnection(DriverManager.java:247)[:1.8.0_77]
at com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java:296)[db-common-5.14.4.jar:]
at com.cloudera.enterprise.dbutil.DbProvisioner.doMain(DbProvisioner.java:104)[db-common-5.14.4.jar:]
at com.cloudera.enterprise.dbutil.DbProvisioner.main(DbProvisioner.java:123)[db-common-5.14.4.jar:]
[ main] DbProvisioner ERROR Stack Trace:
java.sql.SQLException: Access denied for user 'root'@'hadoop11' (using password: YES)
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:964)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3973)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3909)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:873)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.secureAuth411(MysqlIO.java:4420)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.MysqlIO.doHandshake(MysqlIO.java:1278)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2205)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2236)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2035)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.(ConnectionImpl.java:790)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.JDBC4Connection.(JDBC4Connection.java:47)[mysql-connector-java-5.1.41.jar:5.1.41]
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)[:1.8.0_77]
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)[:1.8.0_77]
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)[:1.8.0_77]
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)[:1.8.0_77]
at com.mysql.jdbc.Util.handleNewInstance(Util.java:425)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:400)[mysql-connector-java-5.1.41.jar:5.1.41]
at com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:330)[mysql-connector-java-5.1.41.jar:5.1.41]
at java.sql.DriverManager.getConnection(DriverManager.java:664)[:1.8.0_77]
at java.sql.DriverManager.getConnection(DriverManager.java:247)[:1.8.0_77]
at com.cloudera.enterprise.dbutil.DbProvisioner.executeSql(DbProvisioner.java:296)[db-common-5.14.4.jar:]
at com.cloudera.enterprise.dbutil.DbProvisioner.doMain(DbProvisioner.java:104)[db-common-5.14.4.jar:]
at com.cloudera.enterprise.dbutil.DbProvisioner.main(DbProvisioner.java:123)[db-common-5.14.4.jar:]
--> Error 1, giving up (use --force if you wish to ignore the error)
解决:
mysql -uroot -p123456
mysql> use mysql;
mysql> desc user;
mysql> GRANT ALL PRIVILEGES ON *.* TO root@"%" IDENTIFIED BY '123456';
mysql> update user set Password = password('123456') where User='root';
mysql> select Host,User,Password from user where User='root';
mysql> flush privileges;
mysql> exit;