4
votes

I'm a new fish for hadoop.I installed Ubuntu 12.10 on my computer and I wanna install Hadoop in pseudo-distributed mode on one single node.I searched and get lots of tutorials but I have a problem with the SSH.I did what the tutorial said. I am sure the problem is about the SSH.I get the openssh-server,and had done this:
hadoop00@WebsoftStation:~$ssh-keygen -t dsa -P "" -f ~/.ssh/id_dsa hadoop00@WebsoftStation:~/.ssh$cat ~/.ssh/id_dsa.pub >> authorized_keys

Then I can successfully ssh my localhost like this:
hadoop00@WebsoftStation:~$ssh localhost
It worked. So I changed the path to hadoop and then:
hadoop00@WebsoftStation:/usr/local/hadoop$ sudo bin/start-all.sh
[sudo] password for hadoop00:
starting namenode, logging to /usr/local/hadoop/libexec/../logs/hadoop-root-namenode-WebsoftStation.out
root@localhost's password:
root@localhost's password: localhost: Permission denied, please try again.
So,what's the problem?

3

3 Answers

0
votes

You have setup password-less ssh for only your current account. Since, when you can use ssh localhost without any problem, the thing you need to do next is giving execution permission to your scripts. Execute the following commands:

chmod +x bin/*.sh  ---> assigns execution permission to all the scripts
./start.all        ----> executes the script

Note: Hadoop can also be run without having password-less ssh setup using hadoop-daemon.sh script. The only advantage with password-less ssh is that, the ./start.all, script will take the trouble of doing that on behalf of you in each of the nodes.

0
votes

You need to change permissions for your Hadoop folder to be owned by the hadoop00 user:

cd /usr/local/
sudo chown -R hadoop00:hadoop00 /usr/local/hadoop

Then you can cd into the sbin folder and run things without sudo. If you use sudo you're running the scripts as root which has different environment variables etc which is why you have a different behavior.

-1
votes

Why are you using sudo this is clearly a permission problem.

Try running this without sudo

bin/start-all.sh