在执行jps时,namenode的进程不存在

yqkkidmi  于 2021-07-15  发布在  Hadoop
关注(0)|答案(1)|浏览(459)

我是hadoop生态系统的新手,
我将hadooop3.3.0安装为伪分布式模式。所有应用程序http://localhost:8088/正在工作,但无法查看上应用程序的名称节点http://localhost:9870/我无法(无法访问此网站)。

$ jps
24553 Jps
20537 NodeManager
20429 ResourceManager

$ hadoop version
Hadoop 3.3.0
Source code repository https://github.com/apache/hadoop.git -r aa96f1871bfd858f9bac59cf2a81ec470da649af
Compiled by brahma on 2020-07-06T18:21Z
Compiled with protoc 3.7.1
From source with checksum 5dc29b802d6ccd77b262ef9d04d19c4
This command was run using /usr/local/hadoop/share/hadoop/common/hadoop-common-3.3.0.jar

我试图重新开始这个过程,但没有成功

$ stop-all.sh
WARNING: Stopping all Apache Hadoop daemons as mhannani in 10 seconds.
WARNING: Use CTRL-C to abort.
Stopping namenodes on [HP]
Stopping datanodes
Stopping secondary namenodes [HP]
2021-01-06 16:42:07,540 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Stopping nodemanagers

Stopping resourcemanager

格式:

$ hdfs  namenode -format
2021-01-06 16:44:14,683 INFO namenode.NameNode: STARTUP_MSG: 
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = HP/127.0.1.1
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 3.3.0

然后

$ start-all.sh
WARNING: Attempting to start all Apache Hadoop daemons as mhannani in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [HP]
Starting datanodes
Starting secondary namenodes [HP]
HP: ERROR: Cannot set priority of secondarynamenode process 29847
2021-01-06 16:45:38,266 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting resourcemanager
Starting nodemanagers

请告诉我如何解决这个问题,以便从浏览器访问我的hdfs文件系统,因为它是在早期版本的hadoop上http://localhost:9870/50075 ?
任何帮助或建议将不胜感激,谢谢各位。

jogvjijk

jogvjijk1#

问题未正确设置本地文件系统的namenode路径和datanode路径:
$HADOOP_HOME/etc/hadoop/hdfs-site.xml :

<configuration>
   <property>
      <name>dfs.replication</name>
      <value>1</value>
   </property>

   <property>
      <name>dfs.name.dir</name>
      <value>file://AbsolutePATH/TO/WHERE/THE/namenode/Should/be/stored</value>
   </property>

   <property>
      <name>dfs.data.dir</name> 
      <value>file://The/same/for/dataNode</value> 
   </property>
</configuration>

相关问题