0

I have created a cookbook and signed a role. When I do

knife bootstrap ip-10-185-211-254.ec2.internal -x ubuntu -i JP_Key.pem —sudo -r "role[webserver]"

I'm getting the following error:

ERROR: Network Error: getaddrinfo: Temporary failure in name resolution
Check your knife configuration and network settings

Do I need to add the access key and secret key in knife.rb?

Holger Just
  • 52,918
  • 14
  • 115
  • 123
Suresh Sala
  • 425
  • 1
  • 6
  • 17

1 Answers1

1

The error hints at the reason, that the IP of the server name you gave (ip-10-185-211-254.ec2.internal) couldn't be resolved by your local DNS resolver. This is probably because you tried to use the internal hostname and IP of your EC2 VM which is not accessible from outside of the EC2 internal network.

You should use the external IP and hostname instead.

Holger Just
  • 52,918
  • 14
  • 115
  • 123
  • i gave hostname now i am getting different error Bootstrapping Chef on mychefnode.example.com Failed to authenticate ubuntu - trying password auth @Holger Just – Suresh Sala Nov 14 '13 at 11:56
  • i resolve it by usmychefnode.example.com sudo mychefnode.example.com : mychefnode.example.com unable to resolve host ip-10-220-15-25 mychefnode.example.com mychefnode.example.com --2013-11-14 12:07:23-- https://www.opscode.com/chef/install.sh mychefnode.example.com Resolving www.opscode.com (www.opscode.com)... mychefnode.example.com 184.106.28.82 mychefnode.example.com – Suresh Sala Nov 14 '13 at 12:12
  • @SureshSala you should probably accept @HolgerJust answer as correct as it solved the problem in the OP. As for your other error, it's because you're not giving knife the correct SSH private key for authenticating as user `ubuntu`. Try passing the `-i ` argument to knife. – cassianoleal Nov 15 '13 at 11:40