hadoop start namenode error root account is not found - hadoop

when i have run bin/hdfs namenode -format,i want to run sudo sbin/start-dfs.sh,but it throw a error that root account is not found.
Starting namenodes on [localhost]
ERROR: Refusing to run as root: root   account is not found. Aborting.
Starting datanodes
ERROR: Refusing to run as root: root   account is not found. Aborting.
Starting secondary namenodes [bogon]
上一次登录:日 9月 23 14:57:26 CST 2018pts/0 上
bogon: ssh: connect to host bogon port 22: Connection timed out

Related

Error in loading hadoop distributed file system

I installed Hadoop-3.3.4 in Ubuntu-20. I wrote the command for starting hadoop, i.e.
samar#pc:~$ $HADOOP_HOME/sbin/start-all.sh
Then it showed the output as.
WARNING: Attempting to start all Apache Hadoop daemons as samar in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
Starting datanodes
Starting secondary namenodes [pc]
Starting resourcemanager
Starting nodemanagers
But when I tried to access the HDFS with the command
samar#pc:~$ hdfs dfs -ls
It gave a message as:
ls: Call From pc/127.0.1.1 to localhost:9000 failed on connection exception:
java.net.ConnectException: Connection refused; For more details see:
http://wiki.apache.org/hadoop/ConnectionRefused
and the output of jps was:
10485 Jps
10101 NodeManager
9946 ResourceManager
9739 SecondaryNameNode
9533 DataNode
Namenode did not start successfully (9000 is namenodes services port)
Are there more logs?

secondary namenode failed to start ssh: connect to host 0.0.0.7 port 22: Connection timed out

Starting secondary namenodes [7]
7: ssh: connect to host 0.0.0.7 port 22: Connection timed out
secondary namenode not started due to connection timeout
how to fix this on Ubuntu 20.04.1 LTS?
vivek#7:~$ start-all.sh
WARNING: Attempting to start all Apache Hadoop daemons as pradeep in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
Starting datanodes
Starting secondary namenodes [7]
7: ssh: connect to host 0.0.0.7 port 22: Connection timed out
2020-10-15 18:00:39,116 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting resourcemanager
Starting nodemanagers
vivek#7:~$ jps
6256 NodeManager
5649 NameNode
6098 ResourceManager
6586 Jps
5788 DataNode

ERROR when run start-dfs.sh in Hadoop-3.2.0

I meet some problems in the configuration of Hadoop3.2.1 for YARN learning. And I found that there are two different conditions in user root and user host1 when I run the sbin/start-all.sh. Can you tell me how to solve it and whether it has connection with the SSH? Thank you very much.
In Root:
root#host1-virtual-machine:/home/host1/usr/hadoop-3.2.1# sbin/start-all.sh
Starting namenodes on [localhost]
ERROR: Attempting to operate on hdfs namenode as root
ERROR: but there is no HDFS_NAMENODE_USER defined. Aborting operation.
Starting datanodes
ERROR: Attempting to operate on hdfs datanode as root
ERROR: but there is no HDFS_DATANODE_USER defined. Aborting operation.
Starting secondary namenodes [host1-virtual-machine]
ERROR: Attempting to operate on hdfs secondarynamenode as root
ERROR: but there is no HDFS_SECONDARYNAMENODE_USER defined. Aborting operation.
2020-02-12 14:40:27,093 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Starting resourcemanager
ERROR: Attempting to operate on yarn resourcemanager as root
ERROR: but there is no YARN_RESOURCEMANAGER_USER defined. Aborting operation.
Starting nodemanagers
ERROR: Attempting to operate on yarn nodemanager as root
ERROR: but there is no YARN_NODEMANAGER_USER defined. Aborting operation.
In host1 user:
host1#host1-virtual-machine:~/usr/hadoop-3.2.1$ sbin/start-all.sh
WARNING: Attempting to start all Apache Hadoop daemons as host1 in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
localhost: host1#localhost: Permission denied (publickey,password).
Starting datanodes
localhost: host1#localhost: Permission denied (publickey,password).
Starting secondary namenodes [host1-virtual-machine]
host1-virtual-machine: host1#host1-virtual-machine: Permission denied (publickey,password).
Starting resourcemanager
Starting nodemanagers
localhost: host1#localhost: Permission denied (publickey,password).
You need to set up passwordless connection between nodes. This link might help
http://mynotesonhadoop.blogspot.com/2017/07/configuring-passwordless-ssh-from.html?m=1

start-dfs.sh , Permission denied

hduser#ubuntu:~$ start-dfs.sh
Starting namenodes on [localhost]
localhost: sign_and_send_pubkey: signing failed: agent refused operation
localhost: Permission denied (publickey,password).
Starting datanodes
localhost: sign_and_send_pubkey: signing failed: agent refused operation
localhost: Permission denied (publickey,password).
Starting secondary namenodes [ubuntu]
ubuntu: sign_and_send_pubkey: signing failed: agent refused operation
ubuntu: Permission denied (publickey,password).
hduser#ubuntu:~$
I think this command will help you
eval "$(ssh-agent -s)"
ssh-add
restart ssh-agent and do ssh-add.

ssh key not working while starting hadoop service

when i start hadoop daemon i got following error
[hdp#localhost ~]$ start-all.sh
WARNING: Attempting to start all Apache Hadoop daemons as hdp in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
localhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Starting datanodes
localhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Starting secondary namenodes [localhost.localdomain]
localhost.localdomain: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
Starting resourcemanager
Starting nodemanagers
localhost: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).

Resources