Knife bootstrap issue


#1

So for whatever reason, knife is putting a ‘?’ in front of the hostname. check it out.

user@host MINGW64 ~/gitRepos/chef-repo (master)
$ knife bootstrap <hostname_redacted> --ssh-user myuser --sudo --identity-file ~/.ssh/id_rsa -N <hostname_redacted> --run-list 'recipe[ori-cookbook-newrelic]'
Creating new client for <hostname_redacted>
Creating new node for <hostname_redacted>
Connecting to ?<hostname_redacted>
ERROR: Network Error: getaddrinfo: No such host is known.
Check your knife configuration and network settings

user@host MINGW64 ~/gitRepos/chef-repo (master)
$ knife bootstrap <hostname_redacted> --ssh-user myuser--sudo --identity-file ~/.ssh/id_rsa --node-name <hostname_redacted> --run-list 'recipe[ori-cookbook-newrelic]'
Node <hostname_redacted> exists, overwrite it? (Y/N) Y
Client <hostname_redacted> exists, overwrite it? (Y/N) Y
Creating new client for <hostname_redacted>
Creating new node for <hostname_redacted>
Connecting to ?<hostname_redacted>
ERROR: Network Error: getaddrinfo: No such host is known.
Check your knife configuration and network settings

user@host MINGW64 ~/gitRepos/chef-repo (master)
$ knife bootstrap <IP_address_redacted> --ssh-user myuser--sudo --identity-file ~/.ssh/id_rsa --node-name <hostname_redacted> --run-list 'recipe[ori-cookbook-newrelic]'
Node <hostname_redacted> exists, overwrite it? (Y/N) Y
Client <hostname_redacted> exists, overwrite it? (Y/N) y
Creating new client for <hostname_redacted>
Creating new node for <hostname_redacted>
Connecting to ?<IP_address_redacted>
ERROR: Network Error: getaddrinfo: No such host is known.
Check your knife configuration and network settings

This is a new node. So i’m not sure what’s going on here. And it just bootstrapped a another node right before this one.


#2

Copy and paste the knife bootstrap command from the terminal on to a notepad/text editor and see if you can catch a foreign character over there.

BTW, try out the ssh config file to avoid using specifying your ssh keys. here


#3

that was it. thanks!