Preface
Install the hadoop-2.2.0 64-bit version under Linux CentOS, solve two problems: first, resolve namenode cannot start, view log file logs/ Hadoop-root-namenode-itcast.out (your name is not the same as mine, see the Namenode log file on the line), which throws the following exception:
Java.net.BindException:Problem binding to [xxx.xxx.xxx.xxx:9000] Java.net.BindException: Unable to specify the requested address;
The second is SSH password-free login, prompting no permissions:
Permission denied (publickey.gssapi-with-mic) 1, unable to start Namenode
After starting Hadoop, using the JPS command to find that there is no namenode, this is actually etc/core-site.xml file modification is incorrect:
<configuration>
<!--Specify the communication address of the HDFs boss (Namenode)--
<property>
<name> fs.defaultfs</name>
<value>hdfs://0.0.0.0:9000</value>
</property>
<!-- Specify the storage path where the Hadoop runtime generates files-
<property>
<name>hadoop.tmp.dir</name>
<value>/ cloud/hadoop-2.2.0/tmp</value>
</property>
</configuration>
This is the main line:
<value>hdfs://0.0.0.0:9000</value>
This will enable Namenode 2, ssh password-free login
Hadoop has to enter password several times each time, how to use password-free, the steps are as follows:
1, cd ~, go to my home directory
2, CD. ssh/
3, ssh-keygen-t RSA (four return)
After executing this command, two files Id_rsa (private key), id_rsa.pub (public key) will be generated
4. CP Id_rsa.pub Authorized_keys
This is OK, but when testing SSH locahost permission denied (publickey.gssapi-with-mic)
The following modifications need to be made:
Vim /etc/ssh/sshd_config
Compare the following, if and your non-conformance, change to the following, if you have the line there in front of the #, the # number will be removed (the order may be different from the following)
Permitrootlogin Yes
passwordauthentication Yes
hostkey/etc/ssh/ssh_host_rsa_key
rsaauthentication Yes
pubkeyauthentication Yes
Authorizedkeysfile . Ssh/authorized_keys
Then restart the sshd service, the CentOS 7 command is as follows:
Systemctl Restart Sshd.service
Next you need to modify the permissions, or you will still be prompted permission denied (Publickey.gssapi-with-mic)
# chmod ~
# chmod ~/.ssh
# chmod 644 ~/.ssh/authorized_keys //Public key file All rights
# chmod ~/.ssh/id_rsa all permissions for the//private key file
This is OK, you can start Hadoop normally with password-free.