- From: Daniel DeLeo <
>
- To:
- Subject: [chef] Re: ERROR: No socketless chef-zero server
- Date: Mon, 4 May 2015 10:36:35 -0700
On Saturday, May 2, 2015 at 2:41 PM, Christine Draper wrote:
>
I'm getting the following using chef-client 12.3 with chef-zero 4.2.1:
>
>
ERROR: No socketless chef-zero server on given port 8889
First, a bit of background on the socketless Chef Zero stuff. In any version
of Chef with local mode, when you run `chef-client -z` or `knife -z`, it runs
some code that asks Chef Zero to start, and then asks Chef Zero what URL to
use to connect to it. It then sets `Chef::Config[:chef_server_url]` to the
given URL. Before Chef 12.3, this URL would be
http://localhost:8889
(usually). In Chef 12.3, socketless mode was introduced. Chef Zero still runs
in a background thread and listens for connections on localhost:8889 by
default (unless you use the `—no-listen` option), but internally chef/knife
will ask Chef Zero for a “socktless mode URL”, which will be something like
“chefzero://localhost:8889”. When Chef/knife makes an HTTP request, it checks
the URL scheme, and if it’s “chefzero” then it follows a different code path
to make the “request” just by calling ruby code and not actually using HTTP.
>
>
I have a centos VM running under Vagrant, on a private network. I then run
>
chef-zero on the same private network:
>
>
chef-zero -H 10.0.5.1
>
>
And use knife to bootstrap. The run fails when trying to create the client
>
with the following stacktrace:
>
>
ChefZero::ServerNotFound: No socketless chef-zero server on given port 8889
What are the exact arguments you’re using with `knife bootstrap` ? Based on
the behavior you’re seeing, it does seem like you’re running `knife
bootstrap` with local mode enabled. But then I am confused about how this
would have worked before, since the chef_server_url for knife would have to
have been
http://localhost:8889. But that doesn’t make sense because then how
would chef-client on the bootstrap machine talk to the other chef-zero you’re
spinning up?
>
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-zero-4.2.1/lib/chef_zero/socketless_server_map.rb:78:in
>
`request'
>
/opt/chef/embedded/lib/ruby/gems/2.1.0/gems/chef-zero-4.2.1/lib/chef_zero/socketless_server_map.rb:33:in
>
`request'
>
/opt/chef/embedded/apps/chef/lib/chef/http/socketless_chef_zero_client.rb:153:in
>
`request'
>
<snip>
>
>
I tried running chef-client with both --no-listen and --listen, but got the
>
same error in both cases.
>
>
Any ideas?
>
>
Thanks,
>
Christine Draper
Since the socketless operation is a new feature, it’s definitely possible
there’s a bug here, but I’ll need to know more about your configuration to
see how things are supposed to be working.
Thanks,
--
Daniel DeLeo
Archive powered by MHonArc 2.6.16.