5

P.S: Please do not mark this as duplicate

Hi,

I have been trying to set up and run Hadoop in the pseudo Distributed Mode. When I run the start-all.sh script I get this output:

starting namenode, logging to /home/raveesh/Hadoop/hadoop-0.20.2/bin/../logs/..
localhost: ssh: connect to host localhost port 22: Connection refused
localhost: ssh: connect to host localhost port 22: Connection refused
starting jobtracker, logging to /home/raveesh/Hadoop/hadoop-0.20.2/bin/../logs/..
localhost: ssh: connect to host localhost port 22: Connection refused
raveesh@raveeshL:~/Hadoop/hadoop-0.20.2/bin$ 

Here is what I have done. I have installed the open-ssh server and the client using:

sudo apt-get install openssh-server openssh-client

I have started the ssh server as in

sudo service ssh start

And I get the output as:

ssh start/running, process 5466

I have also run the following commands :

ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa

cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys

But when I run the start-all script it still shows connection refused. I have also tried the tips mentioned here but I am unable to get it to work. I am behind a firewall and I am using Ubuntu. Is there something that I am missing?

Any help is really appreciated.

Thanks.

Raveesh Sharma
  • 1,486
  • 5
  • 21
  • 38

1 Answers1

3

After you install ssh, you should also enable password-less login.

% ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa
% cat ~/.ssh/id_rsa.pub >> ~/.ssh/authorized_keys
Razvan
  • 9,925
  • 6
  • 38
  • 51
  • 1
    Additionally, you should check that `ssh localhost` works without prompting you for a password. – Chris White Jul 15 '12 at 13:41
  • Hi , I have already run those commands.. I forgot to mention in the question.. Have modified the question.. Thanks for pointing out.. The issue still persists.. Is there anything w.r.t port that i should take care of.. or anything in the ssh_config file that I should take care of? – Raveesh Sharma Jul 15 '12 at 14:01
  • Hi Chris. ssh localhost does not indicate anything at all. It simply stays at the prompt.. – Raveesh Sharma Jul 15 '12 at 14:02
  • Are you sure the ssh deamon runs on localhost ? Do something like : pgrep sshd – Razvan Jul 15 '12 at 14:44
  • Other stuff to check: Make sure ~/.ssh permissions are 700, /etc/sshd/sshd_config contains `RSAAuthentication yes` and `PubkeyAuthentication yes`, Check SELinux. Also, `ssh localhost -vvv` may give more hints as to what is going on. – tbroberg Jul 16 '12 at 08:11
  • Hi same problem here... Tried all the steps mentioned... But no luck – Baradwaj Aryasomayajula Jun 17 '16 at 12:41