stop-all.sh command cannot stop Hadoop cluster __hadoop

Source: Internet
Author: User
Tags tmp folder

The mahout algorithm has been studied recently, and the Hadoop cluster has not changed much; today suddenly wanted to stop the Hadoop cluster, but found that it couldn't stop. The./bin/stop-all.sh command always prompts for no stop job, task, Namenode, Datanode, Secondarynode. But the input JPS command, found that Hadoop has been started, and HDFs connection is normal. Later, under the guidance of colleagues, understand; Originally, after Hadoop started, process information was saved by default in the/tmp folder. The information is as follows:

-rw-rw-r--1 Hadoop Hadoop 5 Aug 5 11:04 hadoop-hadoop-datanode.pid
-rw-rw-r--1 Hadoop Hadoop 5 Aug 5 11:04 hadoop-hadoop-jobtracker.pid
-rw-rw-r--1 Hadoop Hadoop 5 Aug 5 11:04 hadoop-hadoop-namenode.pid
-rw-rw-r--1 Hadoop Hadoop 5 Aug 5 11:04 hadoop-hadoop-secondarynamenode.pid
-rw-rw-r--1 Hadoop Hadoop 5 Aug 5 11:04 hadoop-hadoop-tasktracker.pid


The/tmp folder will be emptied periodically, so after a while, the process information for Hadoop will be removed, so that the next time you stop the cluster, it will stop.

Workaround:

1. Refer to the Stop-all.sh script file code to manually stop all related processes.

Stop order: Job, Task, Namenode, Datanode, Secondarynode

2. Restart the cluster and view the/tmp folder again, and you will see the above process information. This is the time to execute the stop-all.sh command to gracefully shut down the Hadoop cluster.

3. If you don't want to be so troublesome every time, you can modify the scripting code.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.