Chef-Client间歇性地失败

时间:2016-02-18 14:11:15

标签: chef chef-recipe

我正在尝试在Windows机器上与Chef Zero一起玩。这就是我所做的。

  • 已安装ChefDK
  • 创建食谱修改了默认食谱以创建本地文件
  • 导航到Windows用户文件夹中的.chef文件夹,并提供以下命令。

    chef-client -z -o testcookbook
    

当我运行此命令时,我收到以下错误。你们中的任何人都可以帮我解决这个问题吗?最后粘贴了简单的配方文件。

C:\Users\ntusername\.chef>chef-client -z -o testcookbook
WARN:    
WARN: Did not find config file: C:\chef\client.rb,using command line options.    
WARN:
Starting Chef Client, version 12.5.1
Creating a new client identity for mycomputer.domainname using the validator key.
========================================================================
Chef encountered an error attempting to create the client "mycomputer.domainname"
========================================================================
Running handlers:    
ERROR: Running exception handlers    
Running handlers complete    
ERROR: Exception handlers complete    
Chef Client failed. 0 resources updated in 01 minutes 08 seconds    
FATAL: Stacktrace dumped to C:/Users/myntusername/.chef/cache/chef-stacktrace.out
FATAL: Chef::Exceptions::CannotWritePrivateKey: I cannot write your private key to C:\chef\client.pem - check permissions?

配方:

file "c:\mydish.txt" do
    action :create
end

0 个答案:

没有答案