错误日志如下:

************************************************************/
2018-03-07 18:57:35,121 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: registered UNIX signal handlers for [TERM, HUP, INT]
2018-03-07 18:57:35,296 WARN org.apache.hadoop.hdfs.server.common.Util: Path /usr/java/data/dfs/data should be specified as a URI in configuration files. Please update hdfs configuration.
2018-03-07 18:57:36,059 INFO org.apache.hadoop.metrics2.impl.MetricsConfig: loaded properties from hadoop-metrics2.properties
2018-03-07 18:57:36,153 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: Scheduled snapshot period at 10 second(s).
2018-03-07 18:57:36,153 INFO org.apache.hadoop.metrics2.impl.MetricsSystemImpl: DataNode metrics system started
2018-03-07 18:57:36,155 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Configured hostname is Centpy
2018-03-07 18:57:36,208 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Opened streaming server at /0.0.0.0:50010
2018-03-07 18:57:36,213 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Balancing bandwith is 1048576 bytes/s
2018-03-07 18:57:36,264 INFO org.mortbay.log: Logging to org.slf4j.impl.Log4jLoggerAdapter(org.mortbay.log) via org.mortbay.log.Slf4jLog
2018-03-07 18:57:36,296 INFO org.apache.hadoop.http.HttpServer: Added global filter 'safety' (class=org.apache.hadoop.http.HttpServer$QuotingInputFilter)
2018-03-07 18:57:36,298 INFO org.apache.hadoop.http.HttpServer: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context datanode
2018-03-07 18:57:36,298 INFO org.apache.hadoop.http.HttpServer: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context static
2018-03-07 18:57:36,298 INFO org.apache.hadoop.http.HttpServer: Added filter static_user_filter (class=org.apache.hadoop.http.lib.StaticUserWebFilter$StaticUserFilter) to context logs
2018-03-07 18:57:36,300 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Opened info server at 0.0.0.0:50075
2018-03-07 18:57:36,302 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: dfs.webhdfs.enabled = false
2018-03-07 18:57:36,302 INFO org.apache.hadoop.http.HttpServer: Jetty bound to port 50075
2018-03-07 18:57:36,302 INFO org.mortbay.log: jetty-6.1.26
2018-03-07 18:57:36,592 INFO org.mortbay.log: Started SelectChannelConnector@0.0.0.0:50075
2018-03-07 18:57:36,942 INFO org.apache.hadoop.ipc.Server: Starting Socket Reader #1 for port 50020
2018-03-07 18:57:36,962 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Opened IPC server at /0.0.0.0:50020
2018-03-07 18:57:36,971 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Refresh request received for nameservices: null
2018-03-07 18:57:36,985 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Starting BPOfferServices for nameservices: <default>
2018-03-07 18:57:36,988 WARN org.apache.hadoop.hdfs.server.common.Util: Path /usr/java/data/dfs/data should be specified as a URI in configuration files. Please update hdfs configuration.
2018-03-07 18:57:36,996 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Block pool <registering> (storage id unknown) service to Centpy/192.168.86.127:9000 starting to offer service
2018-03-07 18:57:37,000 INFO org.apache.hadoop.ipc.Server: IPC Server Responder: starting
2018-03-07 18:57:37,003 INFO org.apache.hadoop.ipc.Server: IPC Server listener on 50020: starting
2018-03-07 18:57:37,305 INFO org.apache.hadoop.hdfs.server.common.Storage: Lock on /usr/java/data/dfs/data/in_use.lock acquired by nodename 7541@Centpy
2018-03-07 18:57:37,306 FATAL org.apache.hadoop.hdfs.server.datanode.DataNode: Initialization failed for block pool Block pool BP-7509759-192.168.86.127-1520419708605 (storage id ) service to Centpy/192.168.86.127:9000
org.apache.hadoop.hdfs.server.common.InconsistentFSStateException: Directory /usr/java/data/dfs/data is in an inconsistent state: node type is incompatible with others.
at org.apache.hadoop.hdfs.server.common.Storage.setStorageType(Storage.java:1051)
at org.apache.hadoop.hdfs.server.datanode.DataStorage.setFieldsFromProperties(DataStorage.java:304)
at org.apache.hadoop.hdfs.server.common.Storage.readProperties(Storage.java:921)
at org.apache.hadoop.hdfs.server.datanode.DataStorage.doTransition(DataStorage.java:372)
at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:191)
at org.apache.hadoop.hdfs.server.datanode.DataStorage.recoverTransitionRead(DataStorage.java:219)
at org.apache.hadoop.hdfs.server.datanode.DataNode.initStorage(DataNode.java:837)
at org.apache.hadoop.hdfs.server.datanode.DataNode.initBlockPool(DataNode.java:808)
at org.apache.hadoop.hdfs.server.datanode.BPOfferService.verifyAndSetNamespaceInfo(BPOfferService.java:280)
at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.connectToNNAndHandshake(BPServiceActor.java:222)
at org.apache.hadoop.hdfs.server.datanode.BPServiceActor.run(BPServiceActor.java:664)
at java.lang.Thread.run(Thread.java:745)
2018-03-07 18:57:37,307 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Ending block pool service for: Block pool BP-7509759-192.168.86.127-1520419708605 (storage id ) service to Centpy/192.168.86.127:9000
2018-03-07 18:57:37,313 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: Removed Block pool BP-7509759-192.168.86.127-1520419708605 (storage id )
2018-03-07 18:57:39,313 WARN org.apache.hadoop.hdfs.server.datanode.DataNode: Exiting Datanode
2018-03-07 18:57:39,315 INFO org.apache.hadoop.util.ExitUtil: Exiting with status 0
2018-03-07 18:57:39,322 INFO org.apache.hadoop.hdfs.server.datanode.DataNode: SHUTDOWN_MSG:
/************************************************************
SHUTDOWN_MSG: Shutting down DataNode at Centpy/192.168.86.127
************************************************************/

日志说明了datanode的clusterID 和 namenode的clusterID 不匹配。

解决方法:根据日志进入路径(/usr/java/data/dfs/data)。此时,我们应该能看见其下有/data和/name两个目录。将name/current下的VERSION中的clusterID复制到data/current下的VERSION中,覆盖掉原来的clusterID,让两个保持一致;或者,直接删除掉data和name两个目录下的内容,然后重启。

注意:在重启之前,一定要结束掉hadoop所有进程(sbin/stop-all.sh),否则会出现其他错误。

现在,我们重启之后输入jps就可以看到以下进程了:

8862 NameNode
8982 DataNode
9131 SecondaryNameNode
9506 Jps
9374 NodeManager
9269 ResourceManager

 以上就是博主为大家介绍的这一板块的主要内容,这都是博主自己的学习过程,希望能给大家带来一定的指导作用,有用的还望大家点个支持,如果对你没用也望包涵,有错误烦请指出。如有期待可关注博主以第一时间获取更新哦,谢谢!

版权声明:本文为博主原创文章,未经博主允许不得转载。

hadoop集群启动时DataNode节点启动失败的更多相关文章

  1. hadoop集群无法找到datanode节点问题解决

    问题:在配置hadoop集群时,master的50070后台中找不到slave的datanode节点怎么办? 解决: 方法一:首先确认下master和slave的hdfs-site.xml配置中的df ...

  2. Hadoop概念学习系列之Hadoop集群动态增加新节点或删除已有某节点及复制策略导向 (四十三)

    不多说,直接上干货! hadoop-2.6.0动态添加新节点 https://blog.csdn.net/baidu_25820069/article/details/52225216 Hadoop集 ...

  3. hadoop集群之HDFS和YARN启动和停止命令

    假如我们只有3台linux虚拟机,主机名分别为hadoop01.hadoop02和hadoop03,在这3台机器上,hadoop集群的部署情况如下: hadoop01:1个namenode,1个dat ...

  4. 在搭建Hadoop集群环境时遇到的一些问题

    最近在学习搭建hadoop集群环境,在搭建的过程中遇到很多问题,在这里做一些记录.1. SSH相关的问题 问题一: ssh: connect to host localhost port 22: Co ...

  5. eclipse连接远程hadoop集群开发时权限不足问题解决方案

    转自:http://blog.csdn.net/shan9liang/article/details/9734693 eclipse连接远程hadoop集群开发时报错   Exception in t ...

  6. hadoop集群中动态添加节点

    集群的性能问题需要增加服务器节点以提高整体性能 https://www.cnblogs.com/fefjay/p/6048269.html hadoop集群之间hdfs文件复制 https://www ...

  7. eclipse连接远程hadoop集群开发时0700问题解决方案

    eclipse连接远程hadoop集群开发时报错 错误信息: Exception in thread "main" java.io.IOException:Failed to se ...

  8. hadoop运行故障问题解决1——datanode节点启动后自动关闭

    ERROR org.apache.hadoop.hdfs.server.datanode.DataNode: java.io.IOException: Incompatible namespaceID ...

  9. 在hadoop集群添加了slave节点的方法

    分为以下几个步骤: 1  ,修改master和slave 的参数,和配置时相同,只是修改和节点数相关,如slaves(我的只改了slaves), 将任意一个该好的文件发送到新增加的机器(或者虚拟机) ...

随机推荐

  1. codeforces 706D D. Vasiliy's Multiset(trie树)

    题目链接: D. Vasiliy's Multiset time limit per test 4 seconds memory limit per test 256 megabytes input ...

  2. Codeforces 755B. PolandBall and Game 贪心

    题目大意: 有两个人轮流说单词,已经说过的单词不能再说.给出两人掌握的不同的单词,两人可能掌握相同的单词,但是这个单词也只能说一边.问在两人都是最优策略下先手是否必胜. 题解: 我们发现最优策略一定是 ...

  3. hdu 5730 Shell Necklace —— 分治FFT

    题目:http://acm.hdu.edu.cn/showproblem.php?pid=5730 DP式:\( f[i] = \sum\limits_{j=1}^{i} f[i-j] * a[j] ...

  4. 【转】Pro Android学习笔记(一):Android 平台 2013.6.4

    本系列是阅读<Pro Android4>的读书笔记,也包括网络阅读资料的整理,以及个人心得. 由于智能手机引入AP(应用处理器),Android在某种意义上是个人计算机,具有桌面计算机的完 ...

  5. Lagom学习(一)

    Lagom是JAVA系下响应式 微服务框架,其特性包括: 目前,大多数已有的微服务框架关注于简化单个微服务的构建,Lagom将其扩展到了微服务所构成的系统,分布式系统的复杂性. 同步通信使用HTTP, ...

  6. POJ-3069

    Saruman's Army Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 10994   Accepted: 5555 D ...

  7. 为一个vector<cv::KeyPoint*> 类型的变量做初始化

    vector<cv::KeyPoint*> keypoints; int N; keypoints = vector<cv::KeyPoint*>(N, static_cast ...

  8. JAVA基础学习-集合三-Map、HashMap,TreeMap与常用API

    森林森 一份耕耘,一份收获 博客园 首页 新随笔 联系 管理 订阅 随笔- 397  文章- 0  评论- 78  JAVA基础学习day16--集合三-Map.HashMap,TreeMap与常用A ...

  9. CF 148D D Bag of mice (概率dp)

    题目链接 D. Bag of mice time limit per test 2 seconds memory limit per test 256 megabytes input standard ...

  10. Zookeeper发布订阅之SpringBoot+Mybatis多数据源

    1.前言 数据发布/订阅系统,即所谓的配置中心,顾名思义就是发布者将数据发布到Zookeeper的一个或一系列节点上,供订阅者进行数据订阅,进而达到动态获取数据的目的,实现配置信息的集中管理和数据的动 ...