hadoop安装使用过程的异常汇总
Posted xc1234
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了hadoop安装使用过程的异常汇总相关的知识,希望对你有一定的参考价值。
1、 启动yarn,resourceManger启动失败,日志报错:
org.apache.hadoop.yarn.exceptions.YarnRuntimeException: java.net.BindException: Problem binding to [jx-vm04:8031] java.net.BindException: Cannot assign requested address; For more details see: http://wiki.apache.org/hadoop/BindException
定位:
1、netstat –ano | grep ‘8031‘ 查不到端口占用;
2、可能是yarn-site.xml配置异常,查看配置信息:
<configuration>
<!-- Site specific YARN configuration properties -->
<!-- 1、指定YARN的老大(ResourceManager)的地址 -->
<property>
<name>yarn.resourcemanager.hostname</name>
<value>jx-vm04</value>
</property>
<!-- 2、reducer获取数据的方式 -->
<property>
<name>yarn.nodemanager.aux-services</name>
<value>mapreduce_shuffle</value>
</property>
</configuration>
信息配置正常;
3、查看主机配置文件:
$ cat /etc/hosts
127.0.0.1 localhost
#127.0.1.1 jx-vm04
10.10.75.15 jx-vm04
192.168.120.159 mc.zk.thinkjoy.cn
#10.10.75.16 jx-vm01
192.168.3.16 sd-hjy-vm02
本地主机名配置成映射的外网IP(10.10.75.15),这里要使用内网IP地址才行
改成: 127.0.1.1 jx-vm04
或者 192.168.3.15 jx-vm04
改完保存,重启 start-yarn.sh
查看结果:
/hadoop/hadoop-2.4.1/etc/hadoop$ jps
14338 NameNode
25379 NodeManager
25901 ResourceManager
14468 DataNode
26302 Jps
14666 SecondaryNameNode
启动成功。
2、配置单机版hbase,启动后报错:
[email protected]-vm04:/usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin$ ./start-hbase.sh
starting master, logging to /usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/../logs/hbase-hadoop-master-jx-vm04.out
/usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/hbase-daemon.sh: 行 189: /usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/../logs/hbase-hadoop-master-jx-vm04.out: 权限不够
head: 无法打开"/usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/../logs/hbase-hadoop-master-jx-vm04.out" 读取数据: 没有那个文件或目录
[email protected]-vm04:/usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin$ sudo ./start-hbase.sh
starting master, logging to /usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/../logs/hbase-root-master-jx-vm04.out
Could not start ZK at requested port of 2181. ZK was started at port: -1. Aborting as clients (e.g. shell) will not be able to find this ZK quorum.
可以看到在默认账户下提示权限不够,说明要使用管理员账号或者对应安装的权限账号,因为hbase是在hadoop账户下安装的,而zk是在默认的ubuntu账户下安装的,2181端口被ubuntu下的zk占用,而hbase无权访问。
解决办法:
将sudo下的zk服务占用进程杀掉,在hadoop账户下启动zk:
[email protected]:/usr/local/wangpei/cloud/zookeeper/zookeeper-3.4.6/bin$ ./zkServer.sh
JMX enabled by default
启动hbase:
./start-hbase.sh
starting master, logging to /usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/../logs/hbase-root-master-jx-vm04.out
hbase单机启动成功:
[email protected]:/usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin$ ps -ef | grep hbase
root 11044 1 0 10:56 pts/3 00:00:00 bash /usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/hbase-daemon.sh --config /usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/../conf foreground_start master
root 11058 11044 6 10:56 pts/3 00:00:13 /usr/java/jdk1.6.0_45//bin/java -Dproc_master -XX:OnOutOfMemoryError=kill -9 %p -Xmx1000m -XX:+UseConcMarkSweepGC -Dhbase.log.dir=/usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/../logs -Dhbase.log.file=hbase-root-master-jx-vm04.log -Dhbase.home.dir=/usr/local/wangpei/cloud/hbase/hbase-0.98.24-hadoop2/bin/.. -Dhbase.id.str=root -Dhbase.root.logger=INFO,RFA -Dhbase.security.logger=INFO,RFAS org.apache.hadoop.hbase.master.HMaster start
hadoop 11344 10054 0 10:59 pts/3 00:00:00 grep hbase
- 1
- 2
- 3
- 4
以上是关于hadoop安装使用过程的异常汇总的主要内容,如果未能解决你的问题,请参考以下文章