Hadoop启动HDFS进程的时候报错,提示权限不够,具体信息如图所示:
localhost: frankxulei@localhost: Permission denied (publickey,password).
frankxulei@ubuntu:/usr/local/hadoop$ sbin/start-all.sh
WARNING: Attempting to start all Apache Hadoop daemons as frankxulei in 10 seconds.
WARNING: This is not a recommended production deployment configuration.
WARNING: Use CTRL-C to abort.
Starting namenodes on [localhost]
localhost: frankxulei@localhost: Permission denied (publickey,password).
Starting datanodes
localhost: frankxulei@localhost: Permission denied (publickey,password).
Starting secondary namenodes [ubuntu]
ubuntu: frankxulei@ubuntu: Permission denied (publickey,password).
Starting resourcemanager
Starting nodemanagers
localhost: frankxulei@localhost: Permission denied (publickey,password).
frankxulei@ubuntu:/usr/local/hadoop$
解决办法,复制导入公钥就可以了,SSH链接需要使用公钥认证:
切换到ssh目录:cd ~/.ssh/
ssh-keygen -t rsa -P ""
cat $HOME/.ssh/id_rsa.pub >> $HOME/.ssh/authorized_keys
再次启动HDFS就可以了,
sbin/start-dfs.sh