-2
當我通過工作站執行Chef食譜時,我總是得到這個錯誤,我無法理解缺失的是什麼?執行廚師Mixlib時出現此錯誤:: ShellOut :: ShellCommandFailed
> knife bootstrap 10.192.74.59 --ssh-user scs --ssh-password 'cisco123' --sudo --use-sudo-password --node-name webserver10.192.74.59 --run-list 'recipe[f5-node-initiator]'
> Node webserver10.192.74.59 exists, overwrite it? (Y/N) Y
> Client webserver10.192.74.59 exists, overwrite it? (Y/N) Y
> Creating new client for webserver10.192.74.59
> Creating new node for webserver10.192.74.59
> Connecting to 10.192.74.59
> 10.192.74.59 [sudo] password for scs: -----> Existing Chef installation detected
10.192.74.59 Starting the first Chef Client run...
10.192.74.59 Starting Chef Client, version 12.15.19
10.192.74.59 resolving cookbooks for run list: ["f5-node-initiator"]
10.192.74.59 Synchronizing Cookbooks:
10.192.74.59 - f5-node-initiator (0.0.1)
10.192.74.59 Installing Cookbook Gems:
10.192.74.59 Compiling Cookbooks...
10.192.74.59 Converging 4 resources
10.192.74.59 Recipe: f5-node-initiator::default
10.192.74.59 * cookbook_file[/var/chef/cache/f5-icontrol-10.2.0.2.gem] action create (up to date)
10.192.74.59 * cookbook_file[/usr/local/bin/f5-node-initiator] action create (up to date)
10.192.74.59 * gem_package[f5-icontrol] action install (up to date)
10.192.74.59 * execute[f5-node-initiator] action run
10.192.74.59
10.192.74.59 ================================================================================
10.192.74.59 Error executing action `run` on resource 'execute[f5-node-initiator]'
10.192.74.59 ================================================================================
10.192.74.59
10.192.74.59 Mixlib::ShellOut::ShellCommandFailed
10.192.74.59 ------------------------------------
10.192.74.59 Expected process to exit with [0], but received '1'
10.192.74.59 ---- Begin output of f5-node-initiator -b 10.192.73.79 -u -p -n -d 10.192.74.59:80 ----
10.192.74.59 STDOUT:
10.192.74.59 STDERR: /var/lib/gems/2.3.0/gems/soap4r-1.5.8/lib/xsd/charset.rb:13: warning: variable $KCODE is no longer effective
10.192.74.59 /var/lib/gems/2.3.0/gems/soap4r-1.5.8/lib/xsd/xmlparser.rb:74:in `<top (required)>': XML processor module not found. (RuntimeError)
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
10.192.74.59 from /var/lib/gems/2.3.0/gems/soap4r-1.5.8/lib/wsdl/parser.rb:12:in `<top (required)>'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
10.192.74.59 from /var/lib/gems/2.3.0/gems/soap4r-1.5.8/lib/soap/wsdlDriver.rb:9:in `<top (required)>'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
10.192.74.59 from /var/lib/gems/2.3.0/gems/f5-icontrol-10.2.0.2/lib/f5-icontrol.rb:2:in `<top (required)>'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `require'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:127:in `rescue in require'
10.192.74.59 from /usr/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in `require'
10.192.74.59 from /usr/local/bin/f5-node-initiator:31:in `<main>'
10.192.74.59 ---- End output of f5-node-initiator -b 10.192.73.79 -u -p -n -d 10.192.74.59:80 ----
10.192.74.59 Ran f5-node-initiator -b 10.192.73.79 -u -p -n -d 10.192.74.59:80 returned 1
10.192.74.59
10.192.74.59 Resource Declaration:
10.192.74.59 ---------------------
10.192.74.59 # In /var/chef/cache/cookbooks/f5-node-initiator/recipes/default.rb
10.192.74.59
10.192.74.59 25: execute "f5-node-initiator" do
10.192.74.59 26: command "f5-node-initiator -b #{node[:bigip][:address]} -u #{node[:bigip][:user]} -p #{node[:bigip][:pass]} -n #{node[:bigip][:pool_name]} -d #{node[:bigip][:node_address]}:#{node[:bigip][:node_port]}"
10.192.74.59 27: # action :nothing
10.192.74.59 28: end
10.192.74.59
10.192.74.59 Compiled Resource:
10.192.74.59 ------------------
10.192.74.59 # Declared in /var/chef/cache/cookbooks/f5-node-initiator/recipes/default.rb:25:in `from_file'
10.192.74.59
10.192.74.59 execute("f5-node-initiator") do
10.192.74.59 action [:run]
10.192.74.59 retries 0
10.192.74.59 retry_delay 2
10.192.74.59 default_guard_interpreter :execute
10.192.74.59 command "f5-node-initiator -b 10.192.73.79 -u -p -n -d 10.192.74.59:80"
10.192.74.59 backup 5
10.192.74.59 returns 0
10.192.74.59 declared_type :execute
10.192.74.59 cookbook_name "f5-node-initiator"
10.192.74.59 recipe_name "default"
10.192.74.59 end
10.192.74.59
10.192.74.59 Platform:
這本食譜的作者開始了一個新的[這裏](https://github.com/swalberg/chef-f5),這個聽起來非常過時,主要的錯誤在於廚師很久以前就不存在了,你可以嘗試重新添加它,但我認爲使用更新的食譜會更好。 – Tensibai