महाराज-ग्राहक client.rb की उपस्थिति के बावजूद डिफ़ॉल्ट config मानों का उपयोग करके कोई त्रुटि

वोट
1

एक पूरी ताजा पर इस समस्या के बाद Windows सर्वर 2012R2 स्थापित करें। मैं एक ही बात हो, कोई फर्क नहीं पड़ता अगर मैं चलाने chef-clientया अगर मैं चलाने के chef-client -c C:\chef\client.rb। मेरे client.rb, जो मैं सत्यापित करने के बाद डिफ़ॉल्ट पथ पर है, शामिल हैं:

log_level :debug
log_location STDOUT
chef_server_url 'https://chef.t93.us/organizations/<orgname>'
validation_client_name '<orgname>-validator'
validation_key 'C:\chef\<orgname>-validator.pem'
ssl_ca_file 'C:\chef\<dom_ain>.crt'

साथ तार <>की जगह उचित मान हैं <>

मैं हमेशा लॉगिंग स्तर डिबग करने के लिए सेट (का उपयोग कर CLI स्विच के बाद से client.rb में लॉग मूल्य प्रभाव नहीं ले रही है) के साथ निम्नलिखित उत्पादन मिलता है,:

[2016-04-06T16:57:36-07:00] DEBUG: Sleeping for 0 seconds
[2016-04-06T16:57:36-07:00] INFO: *** Chef 12.8.1 ***
[2016-04-06T16:57:36-07:00] INFO: Chef-client pid: 2924
[2016-04-06T16:57:36-07:00] DEBUG: Chef-client request_id: 1101fdac-22de-458c-9b8b-d724a85e1879
[2016-04-06T16:57:36-07:00] DEBUG: Could not load sigar gem. Skipping NetworkRoutes plugin
[2016-04-06T16:57:37-07:00] DEBUG: Could not load sigar gem. Skipping NetworkListeners plugin
[2016-04-06T16:57:37-07:00] DEBUG: [inet] Using default interface 0x13 and default gateway 10.10.10.1 to set the default ip to 10.10.10.14
[2016-04-06T16:57:37-07:00] DEBUG: setting macaddress to '82:1B:DC:34:31:3F' from interface '0x13' for family 'inet'
[2016-04-06T16:57:37-07:00] DEBUG: [inet6] no default interface, picking the first ipaddress
[2016-04-06T16:57:37-07:00] DEBUG: No data to collect for plugin LSB. Continuing...
[2016-04-06T16:57:38-07:00] DEBUG: azure plugin: No hints present for azure and doesn't appear to be azure.
[2016-04-06T16:57:39-07:00] DEBUG: ec2 plugin: has_ec2_dmi? == false
[2016-04-06T16:57:39-07:00] DEBUG: ec2 plugin: has_xen_mac? == false
[2016-04-06T16:57:39-07:00] DEBUG: ec2 plugin: has_ec2metadata_bin? == false
[2016-04-06T16:57:39-07:00] DEBUG: ec2 plugin: looks_like_ec2? == false
[2016-04-06T16:57:39-07:00] DEBUG: Plugin GCE threw #<SocketError: getaddrinfo: No such host is known. >
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/mixin/gce_metadata.rb:30:in `pack_sockaddr_in'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/mixin/gce_metadata.rb:30:in `can_metadata_connect?'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/plugins/gce.rb:30:in `has_gce_metadata?'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/plugins/gce.rb:39:in `looks_like_gce?'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/plugins/gce.rb:43:in `block (2 levels) in <main>'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/dsl/plugin/versionvii.rb:90:in `instance_eval'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/dsl/plugin/versionvii.rb:90:in `run_plugin'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/dsl/plugin.rb:98:in `run'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/dsl/plugin.rb:169:in `safe_run'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/runner.rb:84:in `run_v7_plugin'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/runner.rb:43:in `run_plugin'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/system.rb:98:in `block in run_plugins'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/system.rb:97:in `each'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/system.rb:97:in `run_plugins'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/ohai-8.11.1/lib/ohai/system.rb:75:in `all_plugins'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/client.rb:559:in `run_ohai'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/client.rb:262:in `run'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:252:in `run_with_graceful_exit_option'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:228:in `block in run_chef_client'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:211:in `run_chef_client'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:445:in `block in interval_run_chef_client'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:435:in `loop'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:435:in `interval_run_chef_client'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:424:in `run_application'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:58:in `run'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/bin/chef-client:26:in `<top (required)>'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/bin/chef-client:60:in `load'
[2016-04-06T16:57:39-07:00] DEBUG: C:/opscode/chef/bin/chef-client:60:in `<main>'
[2016-04-06T16:57:39-07:00] DEBUG: eucalyptus plugin: has_euca_mac? == false
[2016-04-06T16:57:39-07:00] DEBUG: eucalyptus plugin: looks_like_euca? == false
[2016-04-06T16:57:39-07:00] DEBUG: linode plugin: looks_like_linode? == false
[2016-04-06T16:57:39-07:00] DEBUG: NOT ohai openstack
[2016-04-06T16:57:39-07:00] DEBUG: digitalocean plugin: No hints present for and doesn't look like digitalocean
[2016-04-06T16:57:39-07:00] DEBUG: softlayer plugin: looks_like_softlayer? == false
[2016-04-06T16:57:39-07:00] DEBUG: No data to collect for plugin PS. Continuing...
[2016-04-06T16:57:39-07:00] DEBUG: No data to collect for plugin Filesystem2. Continuing...
[2016-04-06T16:57:39-07:00] DEBUG: No data to collect for plugin SystemProfile. Continuing...
[2016-04-06T16:57:39-07:00] DEBUG: No data to collect for plugin InitPackage. Continuing...
[2016-04-06T16:57:39-07:00] DEBUG: ip_scopes: cannot load gem, plugin disabled: cannot load such file -- ipaddr_extensions
[2016-04-06T16:57:39-07:00] DEBUG: Failed to find sshd configuration file
[2016-04-06T16:57:39-07:00] DEBUG: No data to collect for plugin BlockDevice. Continuing...
[2016-04-06T16:57:39-07:00] DEBUG: No data to collect for plugin Mdadm. Continuing...
[2016-04-06T16:57:39-07:00] DEBUG: No data to collect for plugin Zpools. Continuing...
[2016-04-06T16:57:39-07:00] DEBUG: No data to collect for plugin VMware. Continuing...
[2016-04-06T16:57:39-07:00] INFO: Client key C:\chef\client.pem is not present - registering
[2016-04-06T16:57:39-07:00] WARN: Failed to read the private key C:\chef\validation.pem: #<Errno::ENOENT: No such file or directory - C:\chef\validation.pem>
[0m
================================================================================[0m
[31mChef encountered an error attempting to create the client 2012r2dev.JLA.local[0m
================================================================================[0m

[0mPrivate Key Not Found:[0m
----------------------[0m
Your private key could not be loaded. If the key file exists, ensure that it is
[0mreadable by chef-client.
[0m
[0mRelevant Config Settings:[0m
-------------------------[0m
validation_key C:\chef\validation.pem
[0m
[0m[2016-04-06T16:57:39-07:00] DEBUG: Re-raising exception: Chef::Exceptions::PrivateKeyMissing - I cannot read C:\chef\validation.pem, which you told me to use to sign requests!
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http/authenticator.rb:86:in `rescue in load_signing_key'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http/authenticator.rb:76:in `load_signing_key'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http/authenticator.rb:40:in `initialize'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http.rb:93:in `new'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http.rb:93:in `block in initialize'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http.rb:92:in `each'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http.rb:92:in `initialize'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/server_api.rb:36:in `initialize'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:150:in `new'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:150:in `http_api'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:96:in `create'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:87:in `create_or_update'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:58:in `run'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/client.rb:619:in `register'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/client.rb:264:in `run'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:252:in `run_with_graceful_exit_option'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:228:in `block in run_chef_client'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:211:in `run_chef_client'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:445:in `block in interval_run_chef_client'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:435:in `loop'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:435:in `interval_run_chef_client'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:424:in `run_application'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:58:in `run'
  C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/bin/chef-client:26:in `<top (required)>'
  C:/opscode/chef/bin/chef-client:60:in `load'
  C:/opscode/chef/bin/chef-client:60:in `<main>'
[2016-04-06T16:57:39-07:00] ERROR: Running exception handlers
[2016-04-06T16:57:39-07:00] ERROR: Exception handlers complete
[2016-04-06T16:57:39-07:00] FATAL: Stacktrace dumped to C:/chef/cache/chef-stacktrace.out
[2016-04-06T16:57:39-07:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-04-06T16:57:39-07:00] DEBUG: Chef::Exceptions::PrivateKeyMissing: I cannot read C:\chef\validation.pem, which you told me to use to sign requests!
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http/authenticator.rb:86:in `rescue in load_signing_key'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http/authenticator.rb:76:in `load_signing_key'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http/authenticator.rb:40:in `initialize'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http.rb:93:in `new'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http.rb:93:in `block in initialize'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http.rb:92:in `each'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/http.rb:92:in `initialize'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/server_api.rb:36:in `initialize'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:150:in `new'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:150:in `http_api'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:96:in `create'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:87:in `create_or_update'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/api_client/registration.rb:58:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/client.rb:619:in `register'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/client.rb:264:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:252:in `run_with_graceful_exit_option'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:228:in `block in run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/local_mode.rb:44:in `with_server_connectivity'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:211:in `run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:445:in `block in interval_run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:435:in `loop'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:435:in `interval_run_chef_client'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application/client.rb:424:in `run_application'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/lib/chef/application.rb:58:in `run'
C:/opscode/chef/embedded/lib/ruby/gems/2.0.0/gems/chef-12.8.1-universal-mingw32/bin/chef-client:26:in `<top (required)>'
C:/opscode/chef/bin/chef-client:60:in `load'
C:/opscode/chef/bin/chef-client:60:in `<main>'
[2016-04-06T16:57:39-07:00] FATAL: Chef::Exceptions::PrivateKeyMissing: I cannot read C:\chef\validation.pem, which you told me to use to sign requests!

यही कारण है कि एक रन जहां मैं भी config करने के लिए पथ निर्दिष्ट का उपयोग करने से है -c। ग्राहक डिफ़ॉल्ट config मान उपयोग कर रही है और मैं क्यों निर्धारित नहीं कर सकता।

06/04/2016 को 23:57
का स्रोत उपयोगकर्ता
अन्य भाषाओं में...                            


1 जवाब

वोट
2

यहाँ जवाब है: मैं client.rb Powershell जिसका डिफ़ॉल्ट एन्कोडिंग "यूनिकोड" है में बाहर फ़ाइल का उपयोग कर बाहर फ़ाइल लिख रहा था ( http://ss64.com/ps/out-file.html )। जाहिर है बावर्ची इस के साथ समस्या है। समाधान UTF8 में उत्पादन के लिए है।

07/04/2016 को 17:07
का स्रोत उपयोगकर्ता

Cookies help us deliver our services. By using our services, you agree to our use of cookies. Learn more