- From: Daniel DeLeo <
>
- To: Michael Pereira <
>
- Cc:
- Subject: [chef] Re: Re: 400 bad request
- Date: Mon, 10 Aug 2015 10:47:44 -0700
On Monday, August 10, 2015 at 6:10 AM, Michael Pereira wrote:
>
>
Hi,
>
>
Can you please share more information about pretty printing the node-data?
>
>
I am having the same error but on a node that was cloned from an existing
>
chef-managed node, from which I removed the content under /et/chef/.
>
Whenever I try to bootstrap it or run chef-client, I get the following
>
errors:
I wrote this in another email but didn’t send it to the list (doh!): Your
error has the same/similar symptom as Nikhil, but the underlying cause is
different.
>
>
>
>
:~/chef-repo
>
> [master]$ sudo chef-client
>
> Starting Chef Client, version 12.4.1
>
> /opt/chef/embedded/apps/chef/lib/chef/mixin/path_sanity.rb:25: warning:
>
> Insecure world writable dir /nis3/home in PATH, mode 040777
>
> Creating a new client identity for client-machine using the validator key.
>
> ================================================================================
>
> Chef encountered an error attempting to create the client "client-machine"
>
> ================================================================================
>
> Invalid Request Data:
>
> ---------------------
>
> The data in your request was invalid (HTTP 400).
>
> Server Response:
>
> ----------------
>
> Since Server API v1, all keys must be updated via the keys endpoint.
>
>
>
> Running handlers:
>
> [2015-08-07T15:25:57-04:00] ERROR: Running exception handlers
>
> Running handlers complete
>
> [2015-08-07T15:25:57-04:00] ERROR: Exception handlers complete
>
> Chef Client failed. 0 resources updated in 1.552398 seconds
>
> [2015-08-07T15:25:57-04:00] FATAL: Stacktrace dumped to
>
> /var/chef/cache/chef-stacktrace.out
>
> [2015-08-07T15:25:57-04:00] ERROR: 400 "Bad Request"
>
> [2015-08-07T15:25:57-04:00] FATAL: Chef::Exceptions::ChildConvergeError:
>
> Chef run process exited unsuccessfully (exit code 1)
>
>
:~/chef-repo
>
> [master]$ sudo cat /var/chef/cache/chef-stacktrace.out
>
> Generated at 2015-08-07 15:25:57 -0400
>
> Net::HTTPServerException: 400 "Bad Request"
>
> /opt/chef/embedded/lib/ruby/2.1.0/net/http/response.rb:119:in `error!'
>
> /opt/chef/embedded/apps/chef/lib/chef/http.rb:145:in `request'
>
> /opt/chef/embedded/apps/chef/lib/chef/http.rb:118:in `put'
>
> /opt/chef/embedded/apps/chef/lib/chef/api_client/registration.rb:99:in
>
> `update'
>
> /opt/chef/embedded/apps/chef/lib/chef/api_client/registration.rb:89:in
>
> `rescue in create_or_update'
>
> /opt/chef/embedded/apps/chef/lib/chef/api_client/registration.rb:84:in
>
> `create_or_update'
>
> /opt/chef/embedded/apps/chef/lib/chef/api_client/registration.rb:57:in
>
> `run'
>
> /opt/chef/embedded/apps/chef/lib/chef/client.rb:608:in `register'
>
> /opt/chef/embedded/apps/chef/lib/chef/client.rb:253:in `run'
>
>
From this stack trace, it looks like you’re re-using a client/node name that
already exists on the server. Some recent changes to the API have made this
raise a different error than it used to, but it wouldn’t have worked before.
The best way to deal with this is to delete the "client-machine” client and
node on the server before you bootstrap a new one.
We will look at making a change to have this produce a clearer error (I think
the error message was much better in the past).
>
>
The chef server version is 12.1.0-1 and the client-machine has
>
chef-12.4.1-1.el5
>
>
Thanks for your help
>
>
--
>
Michael Pereira
>
(201) 855-9607
HTH,
--
Daniel DeLeo
>
Archive powered by MHonArc 2.6.16.