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 27, 2018 in Chef by Atul
• 10,240 points

edited Oct 12, 2018 by Kalgi 3,020 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,520 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
4,034 views
+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/config.inc.php and changed the following ...READ MORE

answered Apr 20, 2020 in PHP by Niroj
• 82,840 points
15,300 views
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,840 points
8,819 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP