Error saying "ERROR: Network Error: Connection refused $ Check your knife configuration and network settings"

+5 votes

While bootstrap a node on hosted chef server i am getting following error

$ knife bootstrap xxx.xxx.xxx.xxx --ssh-user grimmy --ssh-password '******' --sudo --use-sudo-password --node-name chefNode1 --run-list 'recipe[learn_chef_httpd1]'

Creating new client for chefNode2
Creating new node for chefNode2
Connecting to xxx.xxx.xxx.xxx

**ERROR: Network Error: Connection refused - connect(2) for xxx.xxx.xxx.xxx:22
Check your knife configuration and network settings**
Mar 26, 2018 in Chef by Atul
• 10,240 points

edited Oct 12, 2018 by Kalgi 392 views

2 answers to this question.

+2 votes
Best answer

Use these commands on vm local workstation, vm local node and local pc. This will help you to resolve:

sudo apt update
sudo apt install ssh
sudo ufw allow 22
sudo chmod -R 777 /etc
answered Mar 26, 2018 by DragonLord999
• 8,380 points

selected Oct 12, 2018 by Omkar
+1 vote
This means knife was not able to open an SSH connection to the target you specified. SSH into the target host manually and look if there's any connection/networking issue. If you get some additional errors post them here.
answered Oct 12, 2018 by Hannah
• 15,620 points

Related Questions In Chef

+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
183 views
0 votes
1 answer
0 votes
1 answer

I am getting a network related error saying "cannot connect to a server". need help here.

Actually i got the same error, it ...READ MORE

answered Apr 26, 2018 in Azure by null_void
• 3,220 points
75 views
0 votes
1 answer
0 votes
1 answer