Hadoop: start-dfs.sh permission denied

后端 未结 9 878
攒了一身酷
攒了一身酷 2020-12-13 14:04

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         


        
相关标签:
9条回答
  • 2020-12-13 14:54

    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

    0 讨论(0)
  • 2020-12-13 15:00

    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!

    0 讨论(0)
  • 2020-12-13 15:03

    Well I am now facing with this problem either, and before I got in this question, I use the method below.

    1. sudo -s -H

    use this code to login as root user

    1. ssh localhost

    login by using ssh (if you are just trying to use single node mode)

    1. ./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 )

    enter image description here

    0 讨论(0)
提交回复
热议问题