Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

The process from unable kill namenode hadoop3.0.3 solution to abandonment

Shulou Source: shulou.com Published: 2022-06-03 06:07:18 10月01日 Update

[hadoop@zui hadoop] $hadoop namenode-format

WARNING: Use of this script to execute namenode is deprecated.

WARNING: Attempting to execute replacement "hdfs namenode" instead.

Namenode is running as process 18452. Stop it first.

(3.0.3 use: hdfs namenode-formate)

[hadoop@zui hadoop] $stop-dfs.sh

Stopping namenodes on [zui]

Zui: Warning: Permanently added 'zui' (ECDSA) to the list of known hosts.

Zui: ERROR: Unable to kill 18452

Stopping datanodes

Localhost: ERROR: Unable to kill 19132

Stopping secondary namenodes [zui]

Zui: ERROR: Unable to kill 19311

[hadoop@zui hadoop] $stop-all.sh

WARNING: Stopping all Apache Hadoop daemons as hadoop in 10 seconds.

WARNING: Use CTRL-C to abort.

Stopping namenodes on [zui]

Zui: ERROR: Unable to kill 18452

Stopping datanodes

Localhost: ERROR: Unable to kill 19132

Stopping secondary namenodes [zui]

Zui: ERROR: Unable to kill 19311

Stopping nodemanagers

Stopping resourcemanager

[hadoop@zui hadoop] $hdfs namenode-format

Namenode is running as process 18452. Stop it first.

[hadoop@zui hadoop] $kill-9 18452

Bash: kill: (18452)-No such process

[hadoop@zui hadoop] $sudo kill-9 18452

[sudo] password for hadoop:

Hadoop is not in the sudoers file. This incident will be reported.

(use the root kill process)

[hadoop@zui hadoop] $su root

Password:

[root@zui hadoop] # kill-9 18452

Bash: kill: (18452)-No such process

[root@zui hadoop] # sudo kill-9 18452

Kill: sending signal to 18452 failed: No such process

[root@zui hadoop] #

(whether the process can only be found under the same household in hadoop, but hadoop usage also shows that there is no such process, plus sudo prompts hadoop not in the sudoers file)

Add hadoop to sudoers:

Example: quote from: https://www.cnblogs.com/dingtian/p/7771046.html

Switch users to root

Vim / etc/sudoers

Find the root ALL= (ALL) ALL and add it below

Stack ALL= (ALL) NOPASSWD: ALL

Wq!

Force save and exit

(it was found that root did not have the permission to modify sudoers during the process.

Chmod 720 sudoers-"ok)

After hadoop has the permission to sudo, kill namenode the process again: it still shows that there is no such process

[hadoop@zui etc] $sudo kill-9 18452

Kill: sending signal to 18452 failed: No such process

(but when I go every day, when I execute hdfs namenode-format, it displays namenode is running 18452)

I fuck myself, rm 3.0.3, and then use 2.6.0

Tags: Process permissions process next example again only time user Hitler switch force prompt Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info macOS NVidia Xiaomi Shulou Information