Unable to locate config files when I tried to run chef-solo

126 Views Asked by At

When I ran ChefSolo in my server, it threw this error saying that it couldn't find my config file (solo.rb and nodes file), even though it is literally under my Chef directory.

chef-solo -c solo.rb -j ".\nodes\test.json"
[2019-06-24T07:04:56+00:00] DEBUG: Reading products and relationships...
[2019-06-24T07:04:56+00:00] DEBUG: Successfully read products and relationships
[2019-06-24T07:04:56+00:00] DEBUG: Searching for the following licenses: ["infra-client", "inspec"]
[2019-06-24T07:04:56+00:00] DEBUG: Found license chef_infra_client at C:/Users/simon.lam/.chef/accepted_licenses/chef_in
fra_client
[2019-06-24T07:04:56+00:00] DEBUG: Found license inspec at C:/Users/simon.lam/.chef/accepted_licenses/inspec
[2019-06-24T07:04:56+00:00] DEBUG: Missing licenses remaining: []
[2019-06-24T07:04:56+00:00] DEBUG: All licenses present
[2019-06-24T07:04:56+00:00] FATAL: Cannot load configuration from .\nodes\local.json

PS C:\git\chef> chef -v
Chef Development Kit Version: 4.0.60
chef-client version: 15.0.300
delivery version: master (9d07501a3b347cc687c902319d23dc32dd5fa621)
berks version: 7.0.8
kitchen version: 2.2.5
inspec version: 4.3.2

when I specified the full path of solo.rb and node config file, it stops complaining

I have tried to installing Chef WorkStation and it still failed with the same error, couldnt find solo.rb. Just wondering if I have missed out any configuration to re-point chef to look into my own git chef directory (C:\git\chef... all my chef cookbooks, nodes and solo.rb are in here). But chef-solo keeps looking for solo.rb in C:\solo.rb, not sure why it does that (maybe the relative path is not working - potential bug).

Thanks

0

There are 0 best solutions below