Pleae help with windows bootstrap

With the help of this group I was able to get this working when I had chef-client v11.x, and chef-server v11.x. I moved to chef-client v12.0 and Chef 12 Enterprise. Again, as before, I followed these instructions: https://docs.chef.io/plugin_knife_windows.html to set up winrm on the Windows box, which checks out.

I do…

knife bootstrap windows winrm ‘mynode.domain.com’ -x domain\Administrator -P password -p 5985 -VV
INFO: Using configuration from /opt/jenkins/workspace/Chef-Deploy-RNIs/chef-deploy-leeds/.chef/knife.rb

Waiting for remote response before bootstrap

…DEBUG:
Adding leed-dc.davis.sensus.lab
DEBUG: :session => :init
DEBUG: :relay_to_servers => echo . & echo Response received.
DEBUG: :relayed => mynode.domain.com
DEBUG: leed-dc.davis.sensus.lab => :run_command

(above lines repeated 12 times)

ERROR: No response received from remote node after 1.84 minutes, giving up.
ERROR: Network Error: getaddrinfo: Name or service not known (http://mynode.domain.com:5985)
Check your knife configuration and network settings

Here’s my knife.rb (secret values changed)

current_dir = File.dirname(FILE)
log_level :info
log_location STDOUT
node_name "jenkins"
client_key "#{current_dir}/jenkins.pem"
validation_client_name "chef-validator"
validation_key “#{current_dir}/chef-validator.pem"
chef_server_url “https://mychefserver.domain.com/organizations/myorg"
cache_type 'BasicFile’
cache_options( :path => “#{ENV[‘HOME’]}/.chef/checksums” )
cookbook_path [”#{current_dir}/…/chef-repo/cookbooks”]
knife[:editor]=“vim”

mynode.domain.com does not resolve, thus knife cannot connect to the
machine that supposedly is behind that fqdn a record. maybe use an ip
address if an fqdn does not exist / is not resolvable.

cheers,

aj

On Thu, Jan 15, 2015 at 10:26 AM, Fouts, Chris Chris.Fouts@sensus.com wrote:

With the help of this group I was able to get this working when I had
chef-client v11.x, and chef-server v11.x. I moved to chef-client v12.0 and
Chef 12 Enterprise. Again, as before, I followed these instructions:
knife windows to set up winrm on the
Windows box, which checks out.

I do…

knife bootstrap windows winrm 'mynode.domain.com' -x domain\Administrator
-P password -p 5985 -VV

INFO: Using configuration from
/opt/jenkins/workspace/Chef-Deploy-RNIs/chef-deploy-leeds/.chef/knife.rb

Waiting for remote response before bootstrap

..DEBUG:

Adding leed-dc.davis.sensus.lab

DEBUG: :session => :init

DEBUG: :relay_to_servers => echo . & echo Response received.

DEBUG: :relayed => mynode.domain.com

DEBUG: leed-dc.davis.sensus.lab => :run_command

(above lines repeated 12 times)

ERROR: No response received from remote node after 1.84 minutes, giving up.

ERROR: Network Error: getaddrinfo: Name or service not known
(http://mynode.domain.com:5985)

Check your knife configuration and network settings

Here’s my knife.rb (secret values changed)

current_dir = File.dirname(FILE)

log_level :info

log_location STDOUT

node_name "jenkins"

client_key "#{current_dir}/jenkins.pem"

validation_client_name "chef-validator"

validation_key "#{current_dir}/chef-validator.pem"

chef_server_url
"https://mychefserver.domain.com/organizations/myorg"

cache_type 'BasicFile'

cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )

cookbook_path ["#{current_dir}/../chef-repo/cookbooks"]

knife[:editor]="vim"

Are you bootstrapping from a Windows node or a Linux node? What OS is the windows node?

If you are attempting from a linux or Mac node, could you try (replacing the url with the fqdn or ip of your target node)

curl --header “Content-Type: application/soap+xml;charset=UTF-8” --header “WSMANIDENTIFY: unauthenticated” http://192.168.1.82:5985/wsman --data ‘<s:Envelope xmlns:s=“http://www.w3.org/2003/05/soap-envelope” xmlns:wsmid=“http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd”><s:Header/><s:Body>wsmid:Identify/</s:Body></s:Envelope>’

or if on Windows

test-wsman 192.168.1.82


Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.com

On January 14, 2015 at 3:26:50 PM, Fouts, Chris (chris.fouts@sensus.com) wrote:

With the help of this group I was able to get this working when I had chef-client v11.x, and chef-server v11.x. I moved to chef-client v12.0 and Chef 12 Enterprise. Again, as before, I followed these instructions: https://docs.chef.io/plugin_knife_windows.html to set up winrm on the Windows box, which checks out.

I do…

knife bootstrap windows winrm ‘mynode.domain.com’ -x domain\Administrator -P password -p 5985 -VV

INFO: Using configuration from /opt/jenkins/workspace/Chef-Deploy-RNIs/chef-deploy-leeds/.chef/knife.rb

Waiting for remote response before bootstrap

…DEBUG:

Adding leed-dc.davis.sensus.lab

DEBUG: :session => :init

DEBUG: :relay_to_servers => echo . & echo Response received.

DEBUG: :relayed => mynode.domain.com

DEBUG: leed-dc.davis.sensus.lab => :run_command

(above lines repeated 12 times)

ERROR: No response received from remote node after 1.84 minutes, giving up.

ERROR: Network Error: getaddrinfo: Name or service not known (http://mynode.domain.com:5985)

Check your knife configuration and network settings

Here’s my knife.rb (secret values changed)

current_dir = File.dirname(FILE)

log_level :info

log_location STDOUT

node_name “jenkins”

client_key “#{current_dir}/jenkins.pem”

validation_client_name “chef-validator”

validation_key “#{current_dir}/chef-validator.pem”

chef_server_url “https://mychefserver.domain.com/organizations/myorg

cache_type ‘BasicFile’

cache_options( :path => “#{ENV[‘HOME’]}/.chef/checksums” )

cookbook_path ["#{current_dir}/…/chef-repo/cookbooks"]

knife[:editor]=“vim”

But It DOES resolve, that's why I'm able to do this (IPs changed)

nslookup mynode.domain.com
Server: 10.x.x.x
Address: 10.x.x.x

Name: mynode.domain.com
Address: 10.x.x.x

ping mynode.domain.com -c 1
PING mynode.domain.com (10.x.x.x) 56(84) bytes of data.
64 bytes from mynode.domain.com (10.x.x.x): icmp_seq=1 ttl=128 time=0.167 ms

--- mynode.domain.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.167/0.167/0.167/0.000 ms

knife winrm 'mynode.domain.com' 'dir C:\Users\Administrator' -m -x domain\administrator -P 'password' –p 5985
mynode.domain.com Volume in drive C has no label.
mynode.domain.com Volume Serial Number is 4085-33CD
mynode.domain.com leeds-dc Directory of C:\Users\Administrator
mynode.domain.com
mynode.domain.com 01/16/2014 10:07 PM .
mynode.domain.com 01/16/2014 10:07 PM ..
mynode.domain.com 09/19/2014 09:54 AM Contacts
mynode.domain.com 09/19/2014 09:54 AM Desktop
mynode.domain.com 09/19/2014 09:54 AM Documents
mynode.domain.com 09/19/2014 09:54 AM Downloads
mynode.domain.com 09/19/2014 09:54 AM Favorites
mynode.domain.com 09/19/2014 09:54 AM Links
mynode.domain.com 09/19/2014 09:54 AM Music
mynode.domain.com 09/19/2014 09:54 AM Pictures
mynode.domain.com 09/19/2014 09:54 AM Saved Games
mynode.domain.com 09/19/2014 09:54 AM Searches
mynode.domain.com 09/19/2014 09:54 AM Videos
mynode.domain.com
mynode.domain.com Directory of C:\Users\Administrator
mynode.domain.com
mynode.domain.com
mynode.domain.com Directory of C:\Users\Administrator
mynode.domain.com
mynode.domain.com 0 File(s) 0 bytes
mynode.domain.com 13 Dir(s) 45,180,260,352 bytes free

-----Original Message-----
From: AJ Christensen [mailto:aj@junglistheavy.industries]
Sent: Wednesday, January 14, 2015 4:28 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Pleae help with windows bootstrap

mynode.domain.com does not resolve, thus knife cannot connect to the machine that supposedly is behind that fqdn a record. maybe use an ip address if an fqdn does not exist / is not resolvable.

cheers,

aj

On Thu, Jan 15, 2015 at 10:26 AM, Fouts, Chris Chris.Fouts@sensus.com wrote:

With the help of this group I was able to get this working when I had
chef-client v11.x, and chef-server v11.x. I moved to chef-client v12.0
and Chef 12 Enterprise. Again, as before, I followed these instructions:
knife windows to set up winrm on the
Windows box, which checks out.

I do…

knife bootstrap windows winrm 'mynode.domain.com' -x
domain\Administrator -P password -p 5985 -VV

INFO: Using configuration from
/opt/jenkins/workspace/Chef-Deploy-RNIs/chef-deploy-leeds/.chef/knife.
rb

Waiting for remote response before bootstrap

..DEBUG:

Adding leed-dc.davis.sensus.lab

DEBUG: :session => :init

DEBUG: :relay_to_servers => echo . & echo Response received.

DEBUG: :relayed => mynode.domain.com

DEBUG: leed-dc.davis.sensus.lab => :run_command

(above lines repeated 12 times)

ERROR: No response received from remote node after 1.84 minutes, giving up.

ERROR: Network Error: getaddrinfo: Name or service not known
(http://mynode.domain.com:5985)

Check your knife configuration and network settings

Here’s my knife.rb (secret values changed)

current_dir = File.dirname(FILE)

log_level :info

log_location STDOUT

node_name "jenkins"

client_key "#{current_dir}/jenkins.pem"

validation_client_name "chef-validator"

validation_key "#{current_dir}/chef-validator.pem"

chef_server_url
"https://mychefserver.domain.com/organizations/myorg"

cache_type 'BasicFile'

cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )

cookbook_path ["#{current_dir}/../chef-repo/cookbooks"]

knife[:editor]="vim"

I’m bootstrapping a Windows Server 2012 R2 node from a RHEL 5.11 chef-client.

Chris

From: Steven Murawski [mailto:steven.murawski@gmail.com]
Sent: Wednesday, January 14, 2015 4:33 PM
To: Fouts, Chris; chef@lists.opscode.com
Subject: Re: [chef] Pleae help with windows bootstrap

Are you bootstrapping from a Windows node or a Linux node? What OS is the windows node?

If you are attempting from a linux or Mac node, could you try (replacing the url with the fqdn or ip of your target node)

curl --header “Content-Type: application/soap+xml;charset=UTF-8” --header “WSMANIDENTIFY: unauthenticated” http://192.168.1.82:5985/wsman --data ‘<s:Envelope xmlns:s=“http://www.w3.org/2003/05/soap-envelope” xmlns:wsmid=“http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd”><s:Header/><s:Body>wsmid:Identify/</s:Body></s:Envelope>’

or if on Windows

test-wsman 192.168.1.82


Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.comhttp://stevenmurawski.com/

On January 14, 2015 at 3:26:50 PM, Fouts, Chris (chris.fouts@sensus.commailto:chris.fouts@sensus.com) wrote:
With the help of this group I was able to get this working when I had chef-client v11.x, and chef-server v11.x. I moved to chef-client v12.0 and Chef 12 Enterprise. Again, as before, I followed these instructions: https://docs.chef.io/plugin_knife_windows.html to set up winrm on the Windows box, which checks out.

I do…

knife bootstrap windows winrm ‘mynode.domain.com’ -x domain\Administrator -P password -p 5985 -VV
INFO: Using configuration from /opt/jenkins/workspace/Chef-Deploy-RNIs/chef-deploy-leeds/.chef/knife.rb

Waiting for remote response before bootstrap

…DEBUG:
Adding leed-dc.davis.sensus.lab
DEBUG: :session => :init
DEBUG: :relay_to_servers => echo . & echo Response received.
DEBUG: :relayed => mynode.domain.com
DEBUG: leed-dc.davis.sensus.lab => :run_command

(above lines repeated 12 times)

ERROR: No response received from remote node after 1.84 minutes, giving up.
ERROR: Network Error: getaddrinfo: Name or service not known (http://mynode.domain.com:5985)
Check your knife configuration and network settings

Here’s my knife.rb (secret values changed)

current_dir = File.dirname(FILE)
log_level :info
log_location STDOUT
node_name "jenkins"
client_key "#{current_dir}/jenkins.pem"
validation_client_name "chef-validator"
validation_key “#{current_dir}/chef-validator.pem"
chef_server_url “https://mychefserver.domain.com/organizations/myorg"
cache_type 'BasicFile’
cache_options( :path => “#{ENV[‘HOME’]}/.chef/checksums” )
cookbook_path [”#{current_dir}/…/chef-repo/cookbooks”]
knife[:editor]=“vim”

Ok my bad, I had to use single quotes for the username and password. But now I get this. Do I have an incompatible windows gem?

bootstrap windows winrm mynode.domain.com -x ‘Administrator’ -P ‘password’ -p 5985 -VV

Waiting for remote response before bootstrap.mynode.domain.com .
Mynode.domain.com Response received.
Remote node responded after 0.01 minutes.
Bootstrapping Chef on mynode.domain.com
DEBUG: Looking for bootstrap template in /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/knife-windows-0.8.2/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/knife-windows-0.8.2/lib/chef/knife/bootstrap
ERROR: ArgumentError: wrong number of arguments (3 for 4)

Chris

From: Fouts, Chris [mailto:Chris.Fouts@Sensus.com]
Sent: Wednesday, January 14, 2015 4:41 PM
To: Steven Murawski; chef@lists.opscode.com
Subject: [chef] RE: Pleae help with windows bootstrap

I’m bootstrapping a Windows Server 2012 R2 node from a RHEL 5.11 chef-client.

Chris

From: Steven Murawski [mailto:steven.murawski@gmail.com]
Sent: Wednesday, January 14, 2015 4:33 PM
To: Fouts, Chris; chef@lists.opscode.commailto:chef@lists.opscode.com
Subject: Re: [chef] Pleae help with windows bootstrap

Are you bootstrapping from a Windows node or a Linux node? What OS is the windows node?

If you are attempting from a linux or Mac node, could you try (replacing the url with the fqdn or ip of your target node)

curl --header “Content-Type: application/soap+xml;charset=UTF-8” --header “WSMANIDENTIFY: unauthenticated” http://192.168.1.82:5985/wsman --data ‘<s:Envelope xmlns:s=“http://www.w3.org/2003/05/soap-envelope” xmlns:wsmid=“http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd”><s:Header/><s:Body>wsmid:Identify/</s:Body></s:Envelope>’

or if on Windows

test-wsman 192.168.1.82


Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.comhttp://stevenmurawski.com/

On January 14, 2015 at 3:26:50 PM, Fouts, Chris (chris.fouts@sensus.commailto:chris.fouts@sensus.com) wrote:
With the help of this group I was able to get this working when I had chef-client v11.x, and chef-server v11.x. I moved to chef-client v12.0 and Chef 12 Enterprise. Again, as before, I followed these instructions: https://docs.chef.io/plugin_knife_windows.html to set up winrm on the Windows box, which checks out.

I do…

knife bootstrap windows winrm ‘mynode.domain.com’ -x domain\Administrator -P password -p 5985 -VV
INFO: Using configuration from /opt/jenkins/workspace/Chef-Deploy-RNIs/chef-deploy-leeds/.chef/knife.rb

Waiting for remote response before bootstrap

…DEBUG:
Adding leed-dc.davis.sensus.lab
DEBUG: :session => :init
DEBUG: :relay_to_servers => echo . & echo Response received.
DEBUG: :relayed => mynode.domain.com
DEBUG: leed-dc.davis.sensus.lab => :run_command

(above lines repeated 12 times)

ERROR: No response received from remote node after 1.84 minutes, giving up.
ERROR: Network Error: getaddrinfo: Name or service not known (http://mynode.domain.com:5985)
Check your knife configuration and network settings

Here’s my knife.rb (secret values changed)

current_dir = File.dirname(FILE)
log_level :info
log_location STDOUT
node_name "jenkins"
client_key "#{current_dir}/jenkins.pem"
validation_client_name "chef-validator"
validation_key “#{current_dir}/chef-validator.pem"
chef_server_url “https://mychefserver.domain.com/organizations/myorg"
cache_type 'BasicFile’
cache_options( :path => “#{ENV[‘HOME’]}/.chef/checksums” )
cookbook_path [”#{current_dir}/…/chef-repo/cookbooks”]
knife[:editor]=“vim”

Yes that was the case, incompatible files. I upgraded my chef-client to v12.0.3 and it works now. Thanks!

Chris

From: Fouts, Chris [mailto:Chris.Fouts@Sensus.com]
Sent: Wednesday, January 14, 2015 5:24 PM
To: chef@lists.opscode.com; Steven Murawski
Subject: [chef] RE: RE: Pleae help with windows bootstrap

Ok my bad, I had to use single quotes for the username and password. But now I get this. Do I have an incompatible windows gem?

bootstrap windows winrm mynode.domain.com -x ‘Administrator’ -P ‘password’ -p 5985 -VV

Waiting for remote response before bootstrap.mynode.domain.com .
Mynode.domain.com Response received.
Remote node responded after 0.01 minutes.
Bootstrapping Chef on mynode.domain.com
DEBUG: Looking for bootstrap template in /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/knife-windows-0.8.2/lib/chef/knife/bootstrap
DEBUG: Found bootstrap template in /opt/chef/embedded/lib/ruby/gems/2.1.0/gems/knife-windows-0.8.2/lib/chef/knife/bootstrap
ERROR: ArgumentError: wrong number of arguments (3 for 4)

Chris

From: Fouts, Chris [mailto:Chris.Fouts@Sensus.com]
Sent: Wednesday, January 14, 2015 4:41 PM
To: Steven Murawski; chef@lists.opscode.commailto:chef@lists.opscode.com
Subject: [chef] RE: Pleae help with windows bootstrap

I’m bootstrapping a Windows Server 2012 R2 node from a RHEL 5.11 chef-client.

Chris

From: Steven Murawski [mailto:steven.murawski@gmail.com]
Sent: Wednesday, January 14, 2015 4:33 PM
To: Fouts, Chris; chef@lists.opscode.commailto:chef@lists.opscode.com
Subject: Re: [chef] Pleae help with windows bootstrap

Are you bootstrapping from a Windows node or a Linux node? What OS is the windows node?

If you are attempting from a linux or Mac node, could you try (replacing the url with the fqdn or ip of your target node)

curl --header “Content-Type: application/soap+xml;charset=UTF-8” --header “WSMANIDENTIFY: unauthenticated” http://192.168.1.82:5985/wsman --data ‘<s:Envelope xmlns:s=“http://www.w3.org/2003/05/soap-envelope” xmlns:wsmid=“http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd”><s:Header/><s:Body>wsmid:Identify/</s:Body></s:Envelope>’

or if on Windows

test-wsman 192.168.1.82


Steven Murawski
Community Software Development Engineer @ Chef
Microsoft MVP - PowerShell
http://stevenmurawski.comhttp://stevenmurawski.com/

On January 14, 2015 at 3:26:50 PM, Fouts, Chris (chris.fouts@sensus.commailto:chris.fouts@sensus.com) wrote:
With the help of this group I was able to get this working when I had chef-client v11.x, and chef-server v11.x. I moved to chef-client v12.0 and Chef 12 Enterprise. Again, as before, I followed these instructions: https://docs.chef.io/plugin_knife_windows.html to set up winrm on the Windows box, which checks out.

I do…

knife bootstrap windows winrm ‘mynode.domain.com’ -x domain\Administrator -P password -p 5985 -VV
INFO: Using configuration from /opt/jenkins/workspace/Chef-Deploy-RNIs/chef-deploy-leeds/.chef/knife.rb

Waiting for remote response before bootstrap

…DEBUG:
Adding leed-dc.davis.sensus.lab
DEBUG: :session => :init
DEBUG: :relay_to_servers => echo . & echo Response received.
DEBUG: :relayed => mynode.domain.com
DEBUG: leed-dc.davis.sensus.lab => :run_command

(above lines repeated 12 times)

ERROR: No response received from remote node after 1.84 minutes, giving up.
ERROR: Network Error: getaddrinfo: Name or service not known (http://mynode.domain.com:5985)
Check your knife configuration and network settings

Here’s my knife.rb (secret values changed)

current_dir = File.dirname(FILE)
log_level :info
log_location STDOUT
node_name "jenkins"
client_key "#{current_dir}/jenkins.pem"
validation_client_name "chef-validator"
validation_key “#{current_dir}/chef-validator.pem"
chef_server_url “https://mychefserver.domain.com/organizations/myorg"
cache_type 'BasicFile’
cache_options( :path => “#{ENV[‘HOME’]}/.chef/checksums” )
cookbook_path [”#{current_dir}/…/chef-repo/cookbooks”]
knife[:editor]=“vim”