[hadoop@zui hadoop]$ hadoop namenode -format
WARNING: Use of this script to execute namenode is deprecated.
WARNING: Attempting to execute replacement "hdfs namenode" instead.html
namenode is running as process 18452. Stop it first.node
(3.0.3使用 : hdfs namenode -formate)vim
[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 19311bash
[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 resourcemanageride
[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.oop
(使用root kill 進程)ui
[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]#this
(該進程是否只有在hadoop同戶下才能夠查到,可是hadoop使用也顯示沒有這個進程,加上sudo提示hadoop not in the sudoers file ) code
添加hadoop到 sudoers :
例子:引用來自 : https://www.cnblogs.com/dingtian/p/7771046.htmlorm
切換用戶至root
vim /etc/sudoers
找到root ALL=(ALL) ALL,在下方新增
stack ALL=(ALL) NOPASSWD: ALL
wq!
強制保存並退出便可
(過程當中發現root沒有 sudoers的修改權限,
chmod 720 sudoers ---》 ok )
hadoop 有 sudo的權限後,再次kill namenode 進程 :依然顯示沒有這個進程
[hadoop@zui etc]$ sudo kill -9 18452
kill: sending signal to 18452 failed: No such process
(但是我日勒個去,執行hdfs namenode -format時候就是顯示namenode is running 18452)
我fuck了本身,rm了 3.0.3,接下來使用2.6.0