4

I have a handful of servers who have not checked into the (in-house open-source) chef server in some time. When running chef-client as root, I get the message

WARN: Can not find config file: /etc/chef/client.rb, using defaults.

Running with the "-c /path/to/config" option yields the same result.

But as you can see, the files are in-place with both read and execute permissions:

root@client:~# ls -lah /etc/chef
total 24K
drwxr-xr-x  2 root root 4.0K 2011-08-19 09:24 .
drwxr-xr-x 91 root root 4.0K 2012-03-12 14:55 ..
-rw-rw-r--  1 root root  148 2010-09-15 13:14 client.json
-rw-------  1 root root 1.7K 2010-09-20 13:14 client.pem
-rwxr-xr--  1 root root  765 2011-08-19 09:24 client.rb
-rw-rw-r--  1 root root  145 2010-08-25 16:18 solo.rb

Y U NO SEE FILES, chef-client?!

gWaldo
  • 11,957
  • 8
  • 42
  • 69

1 Answers1

3

There is likely a load error of some kind in your /etc/chef/client.rb. For example, if you're using a report or exception handler and the the library file they're trying to load isn't available, Chef will report the error you're seeing.

You don't need +x on client.rb.

If this isn't enough information, please post your /etc/chef/client.rb contents.

jtimberman
  • 7,587
  • 2
  • 34
  • 42
  • The next error is `WARN: no such file to load -- pony`. Yup, Chef is lying (saying that it can't find the config) because it want's a freaking pony... – gWaldo Mar 14 '12 at 19:11
  • The fix was `gem install pony --no-ri --no-rdoc` – gWaldo Mar 14 '12 at 19:12