问题:hadoop启动后 jps 查不到namenode
start-dfs.sh
[root@master ~]# start-dfs.sh
Starting namenodes on [master]
master: starting namenode, logging to /usr/local/export/soft/hadoop-2.7.7/logs/hadoop-root-namenode-master.out
master: starting datanode, logging to /usr/local/export/soft/hadoop-2.7.7/logs/hadoop-root-datanode-master.out
slave02: starting datanode, logging to /usr/local/export/soft/hadoop-2.7.7/logs/hadoop-root-datanode-slave02.out
slave01: starting datanode, logging to /usr/local/export/soft/hadoop-2.7.7/logs/hadoop-root-datanode-slave01.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /usr/local/export/soft/hadoop-2.7.7/logs/hadoop-root-secondarynamenode-master.out
[root@master ~]# jps
3295 Jps
3170 SecondaryNameNode
3029 DataNode
jps查不到 namenode , 查看日志,报了这个 错误,
我的基本配置,其实基本啥都没配置。
core-site.xml
<configuration>
<property>
<name>fs.defaultFS</name>
<value>hdfs://master:9000/</value>
</property>
<property>
<name>hadoop.tmp.dir</name>
<value>/usr/local/export/soft/hadoop-2.7.7/tmp/</value>
</property>
</configuration>
hdfs-site.xml
<configuration>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
</configuration>
解决方案: 重新格式化namenode,然后启动hadoop,jps存在namenode。
[root@master hadoop-2.7.7]# ./bin/hdfs namenode -format
然后我们再重新启动服务,就愉快的有了