Today I found a problem when running hadoop on cygwin, when the hadoop cluster runs for a period of time, the input bin/stop-all.sh cannot stop the service, in the Windows Task Manager, you can still see the several Java processes. Sometimes the system prompts that the process ID cannot be found, but most of the time it does not. For example:
The stop-all.sh will call the stop-mapred.sh and stop-dfs.sh to stop jobtracker, tasktrackers; namenode, datanodes. The stop of jobtracker and namenode is done locally by calling hadoop-daemon, while the stop of tasktracker and datanode is done by calling hadoop-daemons. Hadoop-daemon is essentially a local hadoop-daemon Command executed by SSH to each slave, such as hadoop-daemon stop datanoade. Hadoop-daemon Stop command tests whether a process exists through kill-0 'cat command. PID '. If an error occurs in this test, "no command to stop" is reported ".
Possible cause: PID file is lost, resulting in hadoop-daemon.sh stop XXX cannot find the process number.
Solution: the default PID file is placed in the/tmp directory, which is not safe. You can set the hadoop_pid_dir environment variable in the conf/hadoop-env.sh to change the directory where the PID file is stored.
Therefore, it is best to add a fixed directory to store hadoop PID during configuration.