[chef] Re [2]: Re [2]: Re [2]: Can't bootstrap windows node after upgrading to ChefDK v4. (Please help! Windows platform)


Chronological Thread 
  • From:
  • To:
  • Cc:
  • Subject: [chef] Re [2]: Re [2]: Re [2]: Can't bootstrap windows node after upgrading to ChefDK v4. (Please help! Windows platform)
  • Date: Fri, 13 Feb 2015 22:07:14 +0200

Hi Adam,

No luck.

Here what I have got:
PS C:\opscode\chef-repo> Gem uninstall knife-windows

You have requested to uninstall the gem:
        knife-windows-0.8.2

knife-ec2-0.10.0 depends on knife-windows (>= 0.8.2)
knife-ec2-0.8.0 depends on knife-windows (>= 0.5.12)
If you remove this gem, these dependencies will not be met.
Continue with Uninstall? [yN]  y
Successfully uninstalled knife-windows-0.8.2

PS C:\opscode\chef-repo> Gem install knife-windows
Fetching: knife-windows-0.8.3.gem (100%)
Successfully installed knife-windows-0.8.3
Parsing documentation for knife-windows-0.8.3
Installing ri documentation for knife-windows-0.8.3
1 gem installed

PS C:\opscode\chef-repo> Gem list knife-windows

*** LOCAL GEMS ***

knife-windows (0.8.3)

PS C:\opscode\chef-repo> knife bootstrap windows winrm –m 172.25.3.201 –x 'Administrator' -P 'password' ipconfig

Waiting for remote response before bootstrap.......................ERROR: No response received from remote node after 2.
17 minutes, giving up.
ERROR: URI::InvalidURIError: bad URI(is not URI?): http://ûm:5985/wsman

Windows IP Configuration


Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . : ec2.internal
   IPv4 Address. . . . . . . . . . . : 172.26.1.79
   Subnet Mask . . . . . . . . . . . : 255.255.252.0
   Default Gateway . . . . . . . . . : 172.26.0.1

Tunnel adapter isatap.ec2.internal:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . : ec2.internal

Tunnel adapter Local Area Connection* 11:

   Media State . . . . . . . . . . . : Media disconnected
   Connection-specific DNS Suffix  . :

And here how I check connection to the box I am going to bootstrap from workstation:
(powershell script)

$DBServerPassword = 'password'
$ServerIP = '172.25.3.201'
$i = 0

$securepassword = ConvertTo-SecureString $DBServerPassword -AsPlainText -Force
$creds = New-Object System.Management.Automation.PSCredential ("Administrator", $securepassword)

while ($true)
{
    $s = New-PSSession $serverIP -Credential $creds 2>$null
    if ($s -ne $null)
    {
        write-host "Successfully connected" -ForegroundColor Green
        Remove-PSSession $s
        break
    }
    $i = $i + 1
    "$(Get-Date) Waiting for remote PS connection to $serverIP"
    if ($i -eq 10) {
        write-host "can't connect to the host" -ForegroundColor Red
        break
    }
}

And it (powershell) establishes connection immediatelly.

Should I install knife-windows -pre?

Thank you in advance.

Regards,
Taras.
13 лютого 2015, 19:49:38, від Adam Edwards < " target="_self"> >:

The knife-windows gem is not currently part of ChefDK. Really, most of its functionality should just be part of Chef Client (and thus part of ChefDK) as you imply.

 

To update, just do the following:

 

Gem uninstall knife-windows

Gem install knife-windows

 

That should install 0.8.3. That said, it’s not clear to me that changes between 0.8.2 and 0.8.3 will address the problem.

 

To simplify this, can you use the knife-winrm command, i.e.:

knife bootstrap windows winrm –m 172.25.3.201 –x ‘administrator’ -P 'password' ipconfig

That should fail faster and be a narrower repro.

Note that there’s still a nasty bug in knife-windows during bootstrap that is fixed in the pre-release, which you could install with gem install knife-windows --pre. So if we get past the auth part, it may make sense for you to upgrade to the pre-release.

Thanks.

-Adam

 

 

 

Hi Adam,

 

Here what I have,

 

PS C:\opscode\chef-repo> Gem list knife-windows

 

*** LOCAL GEMS ***

 

knife-windows (0.8.2)

 

So actually after instaling ChefDK 4 I haven't got latest gems version?

How should I update everything up to date with all gems etc?

 

Thank you for replying so quickly and your support.

 

Regards,

Taras.

 

13 лютого 2015, 19:15:37, від Adam Edwards < " target="_blank"> >:

 

Use this command Taras:

 

Gem list knife-windows

 

It will show the version. And actually, 0.8.3 is the official latest (0.8.4 is a pre-release gem).

 

That output still seems abbreviated for –VV, but let’s first see the gem version before digging there.

 

-Adam

 

 

Hi Adam,

 

Authentication on client side using WinRM is configured for basic auth. 

Sorry for the silly questions but how to find-out version of knife-windows?

 

Here is the same bootstrap command with -VV at the end:

 

PS C:\opscode\chef-repo> knife bootstrap windows winrm 172.25.3.201 -r "role[eu1],recipe[push-jobs]" -x 'Administrator'

-P 'password' -N 'eu1-cstftp-norg' --template-file 'c:\opscode\chef-repo\.chef\bootstrap\windows-chef-client-msi.erb'

-VV

 

Waiting for remote response before bootstrap...................ERROR: No response received from remote node after 2.13 m

inutes, giving up.

ERROR: RuntimeError: Command execution failed.

'-N' is not recognized as an internal or external command,

operable program or batch file.

 

And I see 1 more issue. 

"-N" - is not recognized... But I always used to use it for naming of adding nodes... :(

 

Thank you in advance for helping me.

Regards,

Taras.

13 лютого 2015, 16:52:24, від Adam Edwards < " target="_blank"> >:

 

Taras, what version of knife-windows are you running? The latest is 0.8.4.

 

Can you also get full logs from your knife-windows bootstrap attempt, e.g. with –VV and share those?

 

Also, how did you configure authentication – are you using Negotiate on the server, or have you configured basic auth?

 

-Adam

 

From: " target="_blank"> [mailto: " target="_blank"> ]
Sent: Friday, February 13, 2015 6:44 AM
To: " target="_blank">
Subject: [chef] Can't bootstrap windows node after upgrading to ChefDK v4. (Please help! Windows platform)

 

Hi Chefs,

 

Please help!

 

I have upgraded my workstation (windows 2008 platform) from 3.6 to 4.0.

And it seem that I have lost possibility to bootstrap nodes (windows platform as well).

 

WinRM on client side is configured fine and I can reach it form workstation as well.

have tried it using powershell. 

 

For bootstrap I am using command as follow:

 

knife bootstrap windows winrm 172.25.3.201 -r "role[eu1],recipe[push-jobs]" -x 'Administrator' -P 'password' -N 'eu1-cstftp-norg' --template-file 'c:\opscode\chef-repo\.chef\bootstrap\windows-chef-client-msi.erb'

 

All I get is as follow:

Waiting for remote response before bootstrap............... And then time out no response...

 

I tried to install previous ChefDK 3.6 but it seems tha t it doesn't work from newer version to older.

 

chef-client is still the same:

c:\opscode\chef-repo>chef-client --version

Chef: 12.0.3

 

Any ideas on how to fix this issue? Or I should fully delete ChefDK with all folders and set it up from the beginning?

 

Thank you in advance. 

Regards,

Taras.




Archive powered by MHonArc 2.6.16.

§