hadoop伪分布式遇到的坑

1.ssh未做认证
[hadoop@hadoop000 sbin]$ ./start-all.sh 
This script is Deprecated. Instead use start-dfs.sh and start-yarn.sh
Starting namenodes on [hadoop000]
hadoop000: /home/hadoop/app/hadoop-2.6.0-cdh5.15.1/sbin/slaves.sh: line 60: ssh: command not found
hadoop000: /home/hadoop/app/hadoop-2.6.0-cdh5.15.1/sbin/slaves.sh: line 60: ssh: command not found
Starting secondary namenodes [0.0.0.0]
0.0.0.0: /home/hadoop/app/hadoop-2.6.0-cdh5.15.1/sbin/slaves.sh: line 60: ssh: command not found
starting yarn daemons
starting resourcemanager, logging to /home/hadoop/app/hadoop-2.6.0-cdh5.15.1/logs/yarn-hadoop-resourcemanager-hadoop000.out
hadoop000: /home/hadoop/app/hadoop-2.6.0-cdh5.15.1/sbin/slaves.sh: line 60: ssh: command not found
[hadoop@hadoop000 sbin]$ jps
3589 ResourceManager
4135 Jps
解决方法:
ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/home/hadoop/.ssh/id_rsa): 
Created directory '/home/hadoop/.ssh'.
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/hadoop/.ssh/id_rsa.
Your public key has been saved in /home/hadoop/.ssh/id_rsa.pub.
The key fingerprint is:
69:d5:79:bc:29:54:a9:65:df:be:db:3f:6c:be:48:37 hadoop@hadoop000
The key's randomart image is:
+--[ RSA 2048]----+
|              .. |
|           . ++  |
|          . ++o..|
|         o ... oo|
|        S   . o. |
|       .     .  .|
|             ..E.|
|            . o=o|
|             .o+B|
+-----------------+
[hadoop@hadoop000 ~]$ cd .ssh
[hadoop@hadoop000 .ssh]$ ll
total 8
-rw------- 1 hadoop hadoop 1675 Aug 21 19:21 id_rsa
-rw-r--r-- 1 hadoop hadoop  398 Aug 21 19:21 id_rsa.pub
[hadoop@hadoop000 .ssh]$ cat id_rsa.pub >> authorized_keys

2.经过免密认证操作后不生效
[hadoop@hadoop000 .ssh]$ chmod 600 authorized_keys 

你可能感兴趣的:(Hadoop)