Stephan K.
Stephan K.

Reputation: 15742

Hadoop: connect to host localhost port 22: Connection refused when running start-dfs.sh

When starting the latest (Okt 2014) Hadoop with start-dfs.sh we are seeing:

connect to host localhost port 22: Connection refused when running

Upvotes: 4

Views: 15256

Answers (4)

Keya Kavingwa
Keya Kavingwa

Reputation: 1

OS

On Ubuntu 20.04.1 LTS

Install OpenSSH

sudo apt install openssh-server openssh-client -y

Start SSH

sudo service ssh start

Upvotes: 0

Kartikeya Rana
Kartikeya Rana

Reputation: 200

Install openssh server.

For Ubuntu command is :

sudo apt-get install openssh-server

In hadoop-env.sh file ( present in /etc/hadoop) add the following line :

export HADOOP_SSH_OPTS="-p 22"      

Upvotes: 8

Pons
Pons

Reputation: 11

Install and start openssh server. Here is the command for CentOS:

Install Open SSH server:

sudo yum -y install openssh-server openssh-clients

Start SSH server:

sudo service sshd start

Upvotes: 1

Stephan K.
Stephan K.

Reputation: 15742

Configure "HADOOP_SSH_OPTS" in your hadoop-env.sh, to add any SSH CLI options you need to always be present when the Hadoop scripts use SSH. A line like 'export HADOOP_SSH_OPTS="-p "' perhaps would be what you are looking for.

Source: Interweb

Upvotes: 4

Related Questions