厨师找不到HOME环境 - 扩大`〜'

时间:2014-02-26 12:08:31

标签: chef cookbook

当我的厨师 - 客户端间隔运行时,它会引发此错误并退出而不同步任何烹饪书。但是如果我手动调用它,它会在我的提示符下工作。知道怎么解决吗?

[2014-02-26T11:58:12+00:00] INFO: Forking chef instance to converge...
[2014-02-26T11:58:12+00:00] INFO: *** Chef 11.10.4 ***
[2014-02-26T11:58:12+00:00] INFO: Chef-client pid: 7880
[2014-02-26T11:58:13+00:00] INFO: Run List is [role[TestingRolesAs_Main]]
[2014-02-26T11:58:13+00:00] INFO: Run List expands to [some cookbooks here, chef-client]
[2014-02-26T11:58:13+00:00] INFO: Starting Chef Run for 
[2014-02-26T11:58:13+00:00] INFO: Running start handlers
[2014-02-26T11:58:13+00:00] INFO: Start handlers complete.
[2014-02-26T11:58:13+00:00] INFO: HTTP Request Returned 404 Object Not Found: 
[2014-02-26T11:58:13+00:00] INFO: Loading cookbooks [chef-client, cron, listpackages, logrotate, s247agentinstall, s247cleanup, servermonitoragent]
[2014-02-26T11:58:13+00:00] ERROR: Running exception handlers
[2014-02-26T11:58:13+00:00] ERROR: Exception handlers complete
[2014-02-26T11:58:13+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2014-02-26T11:58:13+00:00] ERROR: couldn't find HOME environment -- expanding `~'
[2014-02-26T11:58:13+00:00] ERROR: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
[2014-02-26T11:58:13+00:00] ERROR: Sleeping for 300 seconds before trying again

1 个答案:

答案 0 :(得分:0)

您的食谱中的某个路径设置为~/something

当Chef作为守护进程运行时,它使用最小的shell环境,可能未设置HOME变量,因此无法展开~