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 --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

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

edited Oct 12, 2018 by Kalgi 2,646 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 27, 2018 by DragonLord999
• 8,450 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
• 18,570 points

Related Questions In Chef

+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
0 votes
1 answer

Error:“Connection for controluser as defined in your configuration failed” with phpMyAdmin in XAMPP

Hii, I edited /etc/phpmyadmin/ and changed the following ...READ MORE

answered Apr 20, 2020 in PHP by Niroj
• 82,880 points
0 votes
1 answer

Error: The mbstring extension is missing. Please check your PHP configuration

Hii, Edit the php.ini file: change extension_dir = "ext" into extension_dir = "D:\php\ext" (please write ...READ MORE

answered Oct 30, 2020 in PHP by Niroj
• 82,880 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP