专栏首页Strive解决 Hadoop 启动报错
原创

解决 Hadoop 启动报错

搭建环境 | 系统:centos 7 | Java 1.8 | Hadoop:2.8.1

[root@master sbin]# ./start-all.sh This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh Starting namenodes on [master] The authenticity of host 'master (192.168.91.10)' can't be established. RSA key fingerprint is 7e:3f:e7:5b:69:74:e3:0e:87:7b:2b:df:3d:64:b3:1e. Are you sure you want to continue connecting (yes/no)? yes master: Warning: Permanently added 'master,192.168.91.10' (RSA) to the list of known hosts. master: Error: JAVA_HOME is not set and could not be found. master: Error: JAVA_HOME is not set and could not be found. slave0: Error: JAVA_HOME is not set and could not be found. slave1: Error: JAVA_HOME is not set and could not be found. Starting secondary namenodes [0.0.0.0] The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established. RSA key fingerprint is 7e:3f:e7:5b:69:74:e3:0e:87:7b:2b:df:3d:64:b3:1e. Are you sure you want to continue connecting (yes/no)? yes 0.0.0.0: Warning: Permanently added '0.0.0.0' (RSA) to the list of known hosts. 0.0.0.0: Error: JAVA_HOME is not set and could not be found. starting yarn daemons starting resourcemanager, logging to /opt/hadoop/logs/yarn-root-resourcemanager-master.out slave0: Error: JAVA_HOME is not set and could not be found. slave1: Error: JAVA_HOME is not set and could not be found. master: Error: JAVA_HOME is not set and could not be found.

报错后内心是崩溃的....

查看各个配置文件 core-site.xml、hdfs-site.xml、mapred-site.xml、yarn-site.xml 都没问题

修改 profile 文件 export HADOOP_HOME=/opt/hadoop export PATH=$PATH:${HADOOP_HOME}/bin (这里要修改成自己的安装路径) 

首先修改文件:

[root@master hadoop]# vi hadoop-env.sh

文件中:

export JAVA_HOME=${JAVA_HOME}

修改为(修改成自己的jdk路径):

export JAVA_HOME=/usr/jdk1.8

在重新启动,启动成功 查看进程,进程(还)(活)(着)

错误解决

[root@master sbin]# ./start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh Starting namenodes on [master] master: starting namenode, logging to /opt/hadoop/logs/hadoop-root-namenode-master.out slave1: starting datanode, logging to /opt/hadoop/logs/hadoop-root-datanode-slave1.out master: starting datanode, logging to /opt/hadoop/logs/hadoop-root-datanode-master.out slave0: starting datanode, logging to /opt/hadoop/logs/hadoop-root-datanode-slave0.out Starting secondary namenodes [0.0.0.0] 0.0.0.0: starting secondarynamenode, logging to /opt/hadoop/logs/hadoop-root-secondarynamenode-master.out starting yarn daemons resourcemanager running as process 3253. Stop it first. slave1: starting nodemanager, logging to /opt/hadoop/logs/yarn-root-nodemanager-slave1.out master: starting nodemanager, logging to /opt/hadoop/logs/yarn-root-nodemanager-master.out slave0: starting nodemanager, logging to /opt/hadoop/logs/yarn-root-nodemanager-slave0.out
[root@master sbin]# jps 
4176 NodeManager 
4289 Jps 
3253 ResourceManager 
3669 NameNode 
3957 SecondaryNameNode 
3771 DataNode

原创声明,本文系作者授权云+社区发表,未经许可,不得转载。

如有侵权,请联系 yunjia_community@tencent.com 删除。

我来说两句

0 条评论
登录 后参与评论

相关文章

  • 解决centos7启动zookeeper 报错

    启动zookeeper报错 Failed to start zookeeper.service: Unit not found.

    Antler
  • hive 初始化msyql报错 SQL Error code: 1045

    搭建环境 | 系统:centos 7 | Hadoop: 3.4.12 | hive:2.3.3 | mysql:5.6.40

    Antler
  • 启动 jenkins Job for jenkins.service failed....

    搭建环境 | 系统:centos 7 | Java 1.8 | jenkins 2.121.3-1.1 2.1

    Antler
  • bunzip2: command not found

    错误信息:bunzip2: command not found [/root/anaconda2] >>> PREFIX=/root/anaconda2 An...

    程裕强
  • 你可能不知道的printf

    printf可能是我们在学习C语言的过程中最早接触的库函数了。其基本使用想必我们都已经非常清楚了。但是下面的这些情况你是否已经清楚地知道了呢?

    编程珠玑
  • 如何将PySpark导入Python的放实现(2种)

    优点:简单快捷 缺点:治标不治本,每次写一个新的Application都要加载一遍findspark

    砸漏
  • 保守性分析并作图

    基因组的保守性常常与功能有关,保守性强的序列可能在细胞的发育和调控等方面发挥着至关重要的作用。

    生信编程日常
  • SpAtten:具有级联令牌和头部修剪功能的高效稀疏注意力架构(AI)

    注意机制在自然语言处理(NLP)应用程序中变得越来越流行,与卷积和递归体系结构相比,其表现出出众的性能。然而,由于复杂的数据移动和低的运算强度,当执行注意力推理...

    田冠宇
  • 《敦刻尔克》:一部无需佩戴头显即可观看的VR影片

    VRPinea
  • Docker容器学习梳理-容器硬盘热扩容

    前面已介绍了docker很多知识点的操作记录,今天这里梳理下docker容器空间扩展的操作。默认情况下,docker容器的空间是10G。在实际生产环境下,对do...

    洗尽了浮华

扫码关注云+社区

领取腾讯云代金券