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,200 points

edited Oct 12, 2018 by Kalgi 134 views

2 answers to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
+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,360 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
• 14,080 points

Related Questions In Chef

+13 votes
2 answers
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
35 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.