I am installing Hadoop on my laptop. SSH works fine, but I cannot start hadoop.
munichong@GrindPad:~$ ssh localhost
Welcome to Ubuntu 12.10 (GNU/Linux 3.5.0
I think the problem is that root and user's ssh connection. here is my copy https://askubuntu.com/questions/497895/permission-denied-for-rootlocalhost-for-ssh-connection Solved my case.
By default, the SSH server denies password-based login for root. In /etc/ssh/sshd_config,
change: PermitRootLogin without-password to PermitRootLogin yes
And restart SSH: sudo service ssh restart
Or, you can use SSH keys. If you don't have one, create one using ssh-keygen (stick to the default for the key, and skip the password if you feel like it). Then do sudo -s (or whatever your preferred method of becoming root is), and add an SSH key to /root/.ssh/authorized_keys:
cat /home/user/.ssh/id_rsa.pub >> /root/.ssh/authorized_keys
try to change the permissions of location where hdfs namenode & datanode are stored.
location mentioned in hdfs-site.xml
that location should have permission of 755 that is. -rwxr-xr-x with user by whom you are running hadoop.
Also set same permission for log location.
Hope it will help!
Well I am now facing with this problem either, and before I got in this question, I use the method below.
sudo -s -H
use this code to login as root user
ssh localhost
login by using ssh (if you are just trying to use single node mode)
./sbin/start-dfs.sh
./sbin/start-yarn.sh
"cd" to your Hadoop installation route then print that code to start the HDFS&MapRedude , then you won't face the permittion problem again.
I guess the cause of this problem :
I use the root user to init the Hadoop environment, so the several folders were create by root user, so that When I now using my own account like 'Jake', I don't have permit to start the service(During that time the system need to access the LOGS )