Reputation: 13
I've got chef installed on my Windows 8.1 desktop and am trying to bootstrap a node in a managed Chef server. This is the first time I've tried it.
When I run the knife bootstrap windows winrm NODE_IP --winrm-user NODE_USER --winrm-password 'NODE_PASSWORD'
command, I get the following Ruby error...
C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:2104:in `raise_if_conflicts': Unable to activate winrm-s-0.3.1, because winrm-1.2.0 conflicts with winrm (~> 1.3.0) (Gem::ConflictError)
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1282:in `activate'
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1316:in `block in activate_dependencies'
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1302:in `each'
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1302:in `activate_dependencies'
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/specification.rb:1284:in `activate'
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:198:in `rescue in try_activate'
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems.rb:195:in `try_activate'
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:126:in `rescue in require'
from C:/opscode/chefdk/embedded/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:39:in `require'
from C:/Users/adamgilmore/.chefdk/gem/ruby/2.1.0/gems/knife-windows-0.8.6/lib/chef/knife/bootstrap_windows_base.rb:22:in `<top (required)>'
from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife/core/subcommand_loader.rb:44:in `load'
from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife/core/subcommand_loader.rb:44:in `block in load_commands'
from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife/core/subcommand_loader.rb:44:in `each'
from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife/core/subcommand_loader.rb:44:in `load_commands'
from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife.rb:127:in `load_commands'
from C:/opscode/chefdk/embedded/apps/chef/lib/chef/knife.rb:208:in `run'
from C:/opscode/chefdk/embedded/apps/chef/lib/chef/application/knife.rb:142:in `run'
from C:/opscode/chefdk/embedded/apps/chef/bin/knife:25:in `<top (required)>'
from C:/opscode/chefdk/bin/knife:63:in `load'
from C:/opscode/chefdk/bin/knife:63:in `<main>'
Version of Chef installed...
Chef Development Kit Version: 0.6.2
chef-client version: 12.3.0
berks version: 3.2.4
kitchen version: 1.4.0
Gems installed
activesupport (4.2.1)
addressable (2.3.8)
akami (1.3.1)
app_conf (0.4.2)
appbundler (0.4.0)
archive (0.0.6)
aruba (0.6.2)
ast (2.0.0)
astrolabe (1.3.0)
aws-sdk-v1 (1.64.0)
axiom-types (0.1.1)
berkshelf (3.2.4)
berkshelf-api-client (1.2.1)
bigdecimal (1.2.4)
buff-config (1.0.1)
buff-extensions (1.0.0)
buff-ignore (1.1.1)
buff-ruby_engine (0.1.0)
buff-shell_out (0.2.0)
builder (3.2.2)
bundler (1.7.12)
cane (2.6.2)
celluloid (0.16.0)
celluloid-io (0.16.2)
CFPropertyList (2.3.1)
chef (12.3.0 x86-mingw32)
chef-dk (0.6.2)
chef-provisioning (1.1.1)
chef-provisioning-aws (1.1.1)
chef-provisioning-azure (0.3.2)
chef-provisioning-fog (0.13.2)
chef-provisioning-vagrant (0.8.3)
chef-vault (2.4.0)
chef-zero (4.2.2, 1.5.6)
cheffish (1.2)
chefspec (4.2.0)
childprocess (0.5.6)
cleanroom (1.0.0)
codeclimate-test-reporter (0.4.7)
coderay (1.1.0)
coercible (1.0.0)
cookbook-omnifetch (0.2.1)
countloc (0.4.0)
crack (0.4.2)
cucumber (2.0.0, 1.3.19)
cucumber-core (1.1.3)
dep-selector-libgecode (1.0.2)
dep_selector (1.0.3)
descendants_tracker (0.0.4)
diff-lcs (1.2.5)
diffy (3.0.7)
docile (1.1.5)
domain_name (0.5.24)
em-winrm (0.7.0, 0.6.0)
equalizer (0.0.11)
erubis (2.7.0)
eventmachine (1.0.7)
excon (0.45.3)
fakefs (0.6.7)
faraday (0.9.1)
fauxhai (2.3.0, 2.2.0)
ffi (1.9.8 x86-mingw32, 1.3.1 x86-mingw32)
ffi-yajl (2.2.0)
finstyle (1.4.0)
fission (0.5.0)
fog (1.31.0)
fog-atmos (0.1.0)
fog-aws (0.4.0)
fog-brightbox (0.7.1)
fog-core (1.30.0)
fog-ecloud (0.1.3)
fog-google (0.0.5)
fog-json (1.0.2)
fog-local (0.2.1)
fog-powerdns (0.1.1)
fog-profitbricks (0.0.3)
fog-radosgw (0.0.4)
fog-riakcs (0.1.0)
fog-sakuracloud (1.0.1)
fog-serverlove (0.1.2)
fog-softlayer (0.4.6)
fog-storm_on_demand (0.1.1)
fog-terremark (0.1.0)
fog-vmfusion (0.1.0)
fog-voxel (0.1.0)
fog-xml (0.1.2)
foodcritic (4.0.0)
formatador (0.2.5)
fuubar (1.3.3)
gherkin (2.12.2 x86-mingw32)
git (1.2.9.1)
grape (0.11.0)
grape-msgpack (0.1.2)
gssapi (1.2.0, 1.0.3)
guard (2.12.6)
guard-compat (1.2.1)
guard-rspec (4.5.2)
gyoku (1.3.1)
hashie (2.1.2)
highline (1.7.2)
hitimes (1.2.2 x86-mingw32)
http (0.8.12)
http-cookie (1.0.2)
http-form_data (1.0.1)
http_parser.rb (0.6.0)
httpclient (2.6.0.1)
httpi (0.9.7)
i18n (0.7.0)
ice_nine (0.11.1)
inflecto (0.0.2)
inifile (2.0.2)
io-console (0.4.2)
ipaddress (0.8.0)
json (1.8.3, 1.8.1)
kitchen-vagrant (0.18.0)
knife-spork (1.5.0)
knife-windows (0.8.6, 0.8.5)
libyajl2 (1.2.0)
listen (2.10.0)
little-plugger (1.1.3)
logging (1.8.2)
lumberjack (1.0.9)
macaddr (1.7.1)
maruku (0.7.2)
metaclass (0.0.4)
method_source (0.8.2)
mime-types (2.6.1)
mini_portile (0.6.2, 0.6.0)
minitar (0.5.4)
minitest (5.7.0, 4.7.5)
mixlib-authentication (1.3.0)
mixlib-cli (1.5.0)
mixlib-config (2.2.1)
mixlib-log (1.6.0)
mixlib-shellout (2.1.0 universal-mingw32)
mocha (1.1.0)
moneta (0.6.0)
msgpack (0.5.12 x86-mingw32)
multi_json (1.11.1)
multi_test (0.1.2)
multi_xml (0.5.5)
multipart-post (2.0.0)
nenv (0.2.0)
net-http-persistent (2.9.4)
net-scp (1.2.1)
net-ssh (2.9.2)
net-ssh-gateway (1.2.0)
net-ssh-multi (1.2.1)
nio4r (1.1.0)
nokogiri (1.6.6.2 x86-mingw32, 1.6.3.1 x86-mingw32)
nori (2.6.0, 1.1.5)
notiffany (0.0.6)
octokit (3.8.0)
ohai (8.4.0)
paint (1.0.0)
parallel (1.6.0)
parser (2.3.0.pre.1)
plist (3.1.0)
polyglot (0.3.5)
powerpack (0.0.9)
pry (0.10.1 i386-mingw32)
psych (2.0.5)
puma (1.6.3)
rack (1.6.1, 1.5.3)
rack-accept (0.4.5)
rack-mount (0.8.3)
rainbow (2.0.0)
rake (10.4.2, 10.1.1, 10.1.0, 0.9.6)
rb-fsevent (0.9.5)
rb-inotify (0.9.5)
rdoc (4.1.0)
reel (0.5.0)
retryable (2.0.1)
ridley (4.2.0)
rspec (3.3.0, 3.0.0)
rspec-core (3.3.0, 3.0.4)
rspec-expectations (3.3.0, 3.0.4)
rspec-its (1.2.0)
rspec-mocks (3.3.0, 3.0.4)
rspec-support (3.3.0, 3.0.4)
rspec_junit_formatter (0.2.3)
rubocop (0.28.0)
ruby-progressbar (1.7.5)
ruby_gntp (0.3.4)
rubygems-update (2.4.4)
rubyntlm (0.4.0, 0.1.1)
rubyzip (1.1.7)
rufus-lru (1.0.5)
safe_yaml (1.0.4)
savon (0.9.5)
sawyer (0.6.0)
semverse (1.2.1)
serverspec (2.18.0)
shellany (0.0.1)
simplecov (0.10.0)
simplecov-html (0.10.0)
slop (3.6.0)
solve (1.2.1)
specinfra (2.35.1)
spork (0.9.2)
stuartpreston-azure-sdk-for-ruby (0.7.1)
systemu (2.6.5)
test-kitchen (1.4.0)
test-unit (2.1.5.0)
thor (0.19.1)
thread_safe (0.3.5)
timers (4.0.1)
treetop (1.4.15)
tzinfo (1.2.2)
unf (0.1.4)
unf_ext (0.0.7.1 x86-mingw32)
uuid (2.3.8)
uuidtools (2.1.5)
varia_model (0.4.0)
virtus (1.0.5)
wasabi (1.0.0)
webmock (1.21.0)
websocket_parser (1.0.0)
win32-api (1.5.3 universal-mingw32)
win32-dir (0.4.5)
win32-event (0.6.1)
win32-eventlog (0.6.1)
win32-ipc (0.6.3)
win32-mmap (0.4.0)
win32-mutex (0.4.1)
win32-process (0.7.5)
win32-service (0.8.2)
win32console (1.3.2 x86-mingw32)
windows-api (0.4.4)
windows-pr (1.2.4)
winrm (1.3.3, 1.2.0)
winrm-s (0.3.1, 0.2.4)
winrm-transport (1.0.1, 1.0.0)
wmi-lite (1.0.0)
yajl-ruby (1.2.1)
yard (0.8.7.6)
Am not a Ruby developer, so finding it hard to debug - any help much appreciated.
Upvotes: 0
Views: 3572
Reputation: 1
I had same issue. The reason was due to multiple winrm versions installed. So I uninstalled the lower version of winrm that was installed as part of chef dev kit installation.
root@ip-XXX-XX-XX-XXX:/opt/chefdk/embedded/lib/ruby/gems/2.1.0/gems# gem uninstall -i /opt/chefdk/embedded/lib/ruby/gems/2.1.0 winrm You have requested to uninstall the gem: winrm-1.2.0 chef-provisioning-0.18 depends on winrm (~> 1.2.0) If you remove this gem, these dependencies will not be met. Continue with Uninstall? [yN] y Successfully uninstalled winrm-1.2.0 root@ip-XXX-XX-XX-XXX:/opt/chefdk/embedded/bin# knife ec2 server list WARNING: No knife configuration file found ERROR: You did not provide a valid 'AWS Access Key Id' value. ERROR: You did not provide a valid 'AWS Secret Access Key' value.
Upvotes: 0
Reputation: 113
I saw the same issue when I set up a new linux machine from which I need to bootstrap windows nodes. There was no previously existing version of knife-windows on that system before I installed 0.8.6. Uninstalling 0.8.6 and specifically installing 0.8.5 solved the problem for now, it's a poor long term solution.
Upvotes: 0
Reputation: 56
I just had the same problem. The issue is that you have both knife-windows 0.8.5 and 0.8.6 installed. The Getting Started documentation for setting up your workstation says that you need to install knife-windows, but it is already installed. When you install it, it installs 0.8.6. There seems to be an issue with that version. The bootstrap script doesn't specifically use 0.8.5 so it just uses the latest version available. You could try to modify the script, but what I did was to just uninstall knife-windows 0.8.6 (chef gem uninstall knife-windows --version 0.8.6). I was able to bootstrap the machine afterwards.
Upvotes: 4
Reputation: 19
Got the same issue here. This site maybe of help to you https://github.com/chef/knife-windows/issues/236
As for me, I rename the .~/.chefdk to ~/.chefdk_old.
Upvotes: 0