# "chef-client -z" can not find my node

**URL:** <https://discourse.chef.io/t/chef-client-z-can-not-find-my-node/5738>\
**Category:** Chef Infra (archive)\
**Created:** [September 18, 2014, 5:53pm UTC](https://discourse.chef.io/t/chef-client-z-can-not-find-my-node/5738 "2014-09-18T17:53:14Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![DV1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/dv1/32/186_2.png) [@DV1](https://discourse.chef.io/u/DV1)\
**Post date:** [September 18, 2014, 8:59pm UTC](https://discourse.chef.io/t/chef-client-z-can-not-find-my-node/5738/4 "2014-09-18T20:59:46Z")

</div>

I never used chef-zero, but you named the role file was\_v85\_role.rb, I  
guess it should be named was\_v85.rb

On Thu, Sep 18, 2014 at 1:03 PM, Roberto Ferreira Junior \<  
[robeferre@gmail.com](mailto:robeferre@gmail.com)\> wrote:

> Hi Lamont, I already have this role created on the file system, the error  
> still the same.
> 
> [root@sbybz3195 chef]# cat roles/was\_v85\_role.rb  
> run\_list("recipe[was\_v85]")
> 
> The command that I mentioned is a call of an application, I can't change  
> the structure for a while.
> 
> _[root@sbybz3195 chef]# chef-client --local-mode -c client.rb -j  
> nodes/was\_v85\_node.json -N was\_v85_
> 
> I need to change this command from chef-solo to chef-zero to apply the ssl  
> features that are not included on chef solo.
> 
> [root@sbybz3195 chef]# chef-client --local-mode -c client.rb -j  
> nodes/was\_v85\_node.json -N was\_v85  
> [2014-09-18T15:55:34-04:00] INFO: Starting chef-zero on host localhost,  
> port 8889 with repository at repository at /devops/common/chef  
> One version per cookbook  
> roles at /devops/commom/chef/roles
> 
> [2014-09-18T15:55:34-04:00] INFO: Forking chef instance to converge...  
> Starting Chef Client, version 11.14.2  
> [2014-09-18T15:55:34-04:00] INFO: \*\*\* Chef 11.14.2 \*\*\*  
> [2014-09-18T15:55:34-04:00] INFO: Chef-client pid: 3910  
> [2014-09-18T15:55:38-04:00] INFO: Setting the run\_list to  
> ["role[was\_v85\_role]"] from CLI options  
> [2014-09-18T15:55:38-04:00] INFO: HTTP Request Returned 404 Not Found :  
> Object not found: [http://localhost:8889/roles/was\_v85\_role](http://localhost:8889/roles/was_v85_role)
> 
> ================================================================================  
> Error expanding the run\_list:
> 
> ================================================================================
> 
> ## Unexpected API Request Failure:
> 
> Object not found: [http://localhost:8889/roles/was\_v85\_role](http://localhost:8889/roles/was_v85_role)
> 
> [2014-09-18T15:55:38-04:00] FATAL: Stacktrace dumped to  
> /tmp/chef-client/chef-stacktrace.out  
> Chef Client failed. 0 resources updated in 3.728979373 seconds  
> [2014-09-18T15:55:38-04:00] ERROR: 404 "Not Found "  
> [2014-09-18T15:55:38-04:00] FATAL: Chef::Exceptions::ChildConvergeError:  
> Chef run process exited unsuccessfully (exit code 1)
> 
> Muito obrigado,
> 
> --  
> Roberto Ferreira Junior  
> [robeferre@gmail.com](mailto:robeferre@gmail.com)
> 
> - 55 11 952335115
> 
> On Thu, Sep 18, 2014 at 4:08 PM, Lamont Granquist [lamont@opscode.com](mailto:lamont@opscode.com)  
> wrote:
> 
> > chef-client -z gets data from the file system via the chef-zero server  
> > that gets spun up on localhost:8889. the behavior you are seeing is  
> > working as designed.
> > 
> > you need to add a roles/was\_v85\_role.json file and then your run will  
> > converge.
> > 
> > you also don't have to pass the -j option on the command line. you  
> > might, however, want to create a separate dna.json file and invoke it with  
> > "-j dna.json" which has the same contents. the chef-zero server will then  
> > create the nodes/was\_v85\_node.json file and save the updated node there at  
> > the end of the run\_list. if you don't want chef-zero to overwrite your  
> > json file with the updated node contents, then use "-j dna.json" instead.
> > 
> > On 9/18/14, 10:53 AM, Roberto Ferreira Junior wrote:
> > 
> > Hi,
> > 
> > ```
> > I have tried to execute my cookbook using this command:
> > 
> > *[root@sbybz3195 chef]# chef-client --local-mode -c client.rb
> > 
> > ```
> > 
> > -j nodes/was\_v85\_node.json -N was\_v85\*
> > 
> > ```
> > This is my node declaration called by the chef execution:
> > 
> > *{"run_list":["role[was_v85_role]"]}*
> > 
> > I have received this message:
> > 
> > [2014-09-18T13:14:30-04:00] INFO: Forking chef instance to
> > 
> > ```
> > 
> > converge...  
> > Starting Chef Client, version 11.14.2  
> > [2014-09-18T13:14:30-04:00] INFO: \*\*\* Chef 11.14.2 \*\*\*  
> > [2014-09-18T13:14:30-04:00] INFO: Chef-client pid: 2040  
> > [2014-09-18T13:14:33-04:00] INFO: Setting the run\_list to  
> > ["role[was\_v85\_role]"] from CLI options  
> > [2014-09-18T13:14:33-04:00] _INFO: HTTP Request Returned 404 Not  
> > Found : Object not found: [http://localhost:8889/roles/was\_v85\_role](http://localhost:8889/roles/was_v85_role)  
> > [http://localhost:8889/roles/was\_v85\_role](http://localhost:8889/roles/was_v85_role)_
> > 
> > ```
> > ==============================
> > 
> > ```
> > 
> > ==================================================  
> > Error expanding the run\_list:
> > 
> > ================================================================================
> > 
> > ```
> > Unexpected API Request Failure:
> > -------------------------------
> > Object not found: http://localhost:8889/roles/was_v85_role * ( I
> > 
> > ```
> > 
> > REALLY DON'T NEED THIS DATA COMING FROM THE API I JUST TO GET THE NODE FROM  
> > DE FS)\*
> > 
> > ```
> > [2014-09-18T13:14:33-04:00] FATAL: Stacktrace dumped to
> > 
> > ```
> > 
> > /tmp/chef-client/chef-stacktrace.out  
> > Chef Client failed. 0 resources updated in 3.514151 seconds  
> > [2014-09-18T13:14:33-04:00] ERROR: 404 "Not Found "  
> > [2014-09-18T13:14:33-04:00] FATAL:  
> > Chef::Exceptions::ChildConvergeError: Chef run process exited  
> > unsuccessfully (exit code 1)
> > 
> > ```
> > I would like figure out why my role declaration inside my node isn't
> > 
> > ```
> > 
> > working
> > 
> > ```
> > Here's my client.rb declaration:
> > 
> > [root@sbybz3195 chef]# cat client.rb
> > CHEF_DIR = File.expand_path(File.dirname( __FILE__ ))
> > file_cache_path "/tmp/chef-client"
> > * role_path "/devops/commom/chef/roles"*
> > #role_path CHEF_DIR + "/devops/commom/chef/roles"
> > environment_path CHEF_DIR + "/environments"
> > data_bag_path CHEF_DIR + "/data_bags"
> > cookbook_path CHEF_DIR + "/cookbooks"
> > 
> > ssl_client_cert CHEF_DIR + "/.ssl/client.crt"
> > ssl_client_key CHEF_DIR + "/.ssl/client.key"
> > ssl_verify_mode :verify_peer
> > 
> > #LOG
> > log_level:info
> > 
> > It works pretty well with chef solo, but not with "chef-client
> > 
> > ```
> > 
> > -local--mode", any suggestion?
> > 
> > Muito obrigado,
> > 
> > --  
> > Roberto Ferreira Junior  
> > [robeferre@gmail.com](mailto:robeferre@gmail.com)
> > 
> > - 55 11 952335115

--  
Best regards, Dmitriy V.

---

_[View the full topic](https://discourse.chef.io/t/chef-client-z-can-not-find-my-node/5738)._
