gpt4 book ai didi

linux - Hadoop:输入 "start-all.sh"后需要 root 密码

转载 作者:IT王子 更新时间:2023-10-28 23:52:43 24 4
gpt4 key购买 nike

我已经在笔记本电脑上安装了 Hadoop 和 SSH。 “ssh localhost”工作正常。格式化HDFS后,尝试启动hadoop。

munichong@GrindPad:~$ sudo /usr/sbin/start-all.sh
starting namenode, logging to /var/log/hadoop/root/hadoop-root-namenode-GrindPad.out
root@localhost's password:
root@localhost's password: localhost: Permission denied, please try again.

localhost: Permission denied (publickey,password).

它需要密码。我的角色是“munichong”。但是munichong的密码在这里不起作用。在这里,我的角色变成了“root”。我不知道我是否在这里遗漏了什么。

有没有人可以帮助我?

谢谢!

最佳答案

解决方案:

1) 生成无密码ssh key

$ ssh-keygen -t rsa -P ""

2) 复制 id_rsa.pub 到 authorized-keys

$  cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys

3) 启动 ssh localhost

$ ssh localhost

4)现在进入hadoop sbin目录,启动hadoop

$./start-all.sh 
./start-all.sh
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [localhost]
localhost: starting namenode, logging to /home/amtex/Documents/installed/hadoop/logs/hadoop-amtex-namenode-amtex-desktop.out
localhost: starting datanode, logging to /home/amtex/Documents/installed/hadoop/logs/hadoop-amtex-datanode-amtex-desktop.out
Starting secondary namenodes [0.0.0.0]
0.0.0.0: starting secondarynamenode, logging to /home/amtex/Documents/installed/hadoop/logs/hadoop-amtex-secondarynamenode-amtex-desktop.out
starting yarn daemons
starting resourcemanager, logging to /home/amtex/Documents/installed/hadoop/logs/yarn-amtex-resourcemanager-amtex-desktop.out
localhost: starting nodemanager, logging to /home/amtex/Documents/installed/hadoop/logs/yarn-amtex-nodemanager-amtex-desktop.out

5)不询问密码

$ jps 
12373 Jps
11823 SecondaryNameNode
11643 DataNode
12278 NodeManager
11974 ResourceManager
11499 NameNode

关于linux - Hadoop:输入 "start-all.sh"后需要 root 密码,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15195048/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com