Hadoop之HMaster会自动停掉,怎么回事?

问题: 搭建hadoop的测试环境完后, 发现HMaster会自动停掉, 启动后, 刚开始能jps看到HMaster的进程, 几秒后再jps就不见了. 怎么回事?
Log中是:
[root@master2 bin]# more /data/hbase-0.96.0-hadoop2/logs/hbase-root-master-master2.out
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data/hbase-0.96.0-hadoop2/lib/slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data/hadoop-2.2.0/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBin
der.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
解决办法:
解决办法:将hbase中master的lib/下的slf4j-log4j12-1.7.5.jar删除,与/home/xuhui/hadoop-2.2.0/share/hadoop/common/lib下的jar重复包含了
删去了还是不行?怎么解决?Log文件中是空的
解决办法:
清空hadoop的tmp文件夹依然不好用! 怎么破?
解决办法:
重新格式化namenode,所有机器上:
hdfs namenode -format
这里写图片描述

将hbase/lib下的hadoop的jar包替换为hadoop中的2.2的jar包:
这里写图片描述
还是不行啊? 怎么破?
Log如下:
2015-05-14 13:58:46,284 INFO [master:master1:60000] Configuration.deprecation: fs.default.name is deprecated. Instead, use fs.defaultFS

2015-05-14 13:58:47,002 WARN [Thread-45] hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /hbase/hbase.version could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.

2015-05-14 13:58:47,010 WARN [master:master1:60000] util.FSUtils: Unable to create version file at hdfs://master1:9001/hbase, retrying
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /hbase/hbase.version could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.

2015-05-14 13:58:57,051 WARN [Thread-48] hdfs.DFSClient: DataStreamer Exception
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /hbase/hbase.version could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.

2015-05-14 13:59:17,088 FATAL [master:master1:60000] master.HMaster: Unhandled exception. Starting shutdown.
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /hbase/hbase.version could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.

2015-05-14 13:59:17,165 ERROR [Thread-5] hdfs.DFSClient: Failed to close file /hbase/hbase.version
org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /hbase/hbase.version could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.

解决办法:
经过清理各个namenode,datanode, 重新格式化namenode. Natanode也启动起来了, hbase的master也启动起来了.

### 回答1: 这个报错意味着Hadoophmaster节点失去了和Zookeeper的连接,通常是由于Zookeeper的session超时导致的。这个错误的解决方法包括以下步骤: 1. 确认Zookeeper是否正常运行,如果Zookeeper也出现问题了,需要先修复Zookeeper。 2. 检查hmaster节点的日志,查看是否有其他异常或错误信息。有可能是其他原因导致的,比如网络故障等。 3. 如果确认是Zookeeper session超时导致的,可以通过修改Hadoop配置文件来增加Zookeeper session的超时时间。 4. 可以尝试重启Hadoop集群来解决这个问题,但如果问题持续存在,需要进一步排查并修复。 总之,这个问题的根本原因是hmaster节点和Zookeeper的连接断开,需要找到具体原因并进行相应的处理。 ### 回答2: Hadoophmaster节点异常退出并报错为"zookeeper session expired",这通常是由于与Zookeeper的会话过期导致的。 Hadoop是一个分布式计算系统,其中的hmaster节点负责管理整个Hadoop集群的状态信息和元数据。而Zookeeper是Hadoop集群中的一个分布式协调服务,用于维护集群的整体状态。hmaster节点与Zookeeper建立会话来获取集群状态和维护一致性。 当hmaster节点与Zookeeper的会话过期时,意味着hmaster节点与Zookeeper之间的连接丢失,导致无法正常获取集群状态和协调。造成会话过期的原因可能有以下几个: 1. 网络问题:hmaster节点与Zookeeper之间的网络连接不稳定或中断,导致会话超时。 2. 负载过高:如果hmaster节点上的负载过高,处理Zookeeper请求的能力不足,可能会导致会话过期。 3. 时钟同步问题:hmaster节点与Zookeeper之间的时钟不同步,可能导致会话超时。因为Zookeeper会依赖节点间时钟的一致性来判断会话是否过期。 当hmaster节点发现与Zookeeper的会话过期时,可能会触发一些后续动作来应对这个问题。例如,重新建立与Zookeeper的连接来恢复会话,或者触发自动故障切换机制,将hmaster角色切换到其他可用节点上。 为了解决这个问题,可以考虑以下措施: 1. 检查网络连接:确保hmaster节点与Zookeeper之间的网络连接正常,并保持稳定。 2. 资源调整:如果hmaster节点上的负载过高,可以考虑增加节点的计算资源,以提高处理能力。 3. 时钟同步:确保hmaster节点与Zookeeper之间的时钟同步,避免会话因时钟不同步而过期。 总之,当Hadoophmaster节点异常退出并报错为"zookeeper session expired"时,需要检查网络连接、负载以及时钟同步等因素,以解决会话过期的问题并确保集群的正常运行。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值