Cannot upload cookbooks to newly instantiated OSS server

Hi,

I’ve just installed an OSS Chef Server inside a VPC in AWS. I’m all set up and I can query the server from my workstation with knife just fine.

The problem is when I try to upload my cookbooks to the Chef server through Berkshelf. This is what I get:

Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:inopen’
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:intimeout’
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:100:in timeout' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:inconnect’
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in do_start' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:instart’
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in request' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:inperform_request’
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in call' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/chef_auth.rb:74:incall’
/Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:67:in perform_with_redirection' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:60:incall’
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/response.rb:8:in call' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:247:inrun_request’
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in put' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/sandbox_uploader.rb:91:inupload’
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in public_send' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:indispatch’
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in dispatch' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:inblock in handle_message’
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in block in initialize' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:inblock in create’
Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:inopen’
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:intimeout’

Has anyone had this issue? How can I solve it?

Cheers,
Cassiano Leal

role upload, node list .. those operations works..
bookshelf[:url] needs to be set explicitly in /etc/chef-server/server.rb if
you are one ec2, they pick up the internal hostname, which only breaks
cookbook upload,

On Thu, Jul 11, 2013 at 1:46 PM, Cassiano Leal cassianoleal@gmail.comwrote:

Hi,

I’ve just installed an OSS Chef Server inside a VPC in AWS. I’m all set up
and I can query the server from my workstation with knife just fine.

The problem is when I try to upload my cookbooks to the Chef server
through Berkshelf. This is what I get:

Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname
provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:100:in
timeout' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in connect'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in
do_start' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:in start'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in
request' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in perform_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in
call' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/chef_auth.rb:74:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:67:in
perform_with_redirection' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:60:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/response.rb:8:in
call' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in run_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in
put' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/sandbox_uploader.rb:91:in upload'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in
public_send' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in dispatch'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in
dispatch' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in block in handle_message'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in
block in initialize' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in block in create'
Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname
provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout’
...

Has anyone had this issue? How can I solve it?

Cheers,
Cassiano Leal

Cassiano,

This is a common problem with the out-of-the-box OSS chef-server config
when the server has a well-known IP address but not a public DNS name.

Everything is configured fine except for bookshelf["vip"], which must be
set to node["ipaddress"] rather than node["fqdn"].

You can create a file /etc/chef-server/chef-server.rb with content
bookshelf["vip"]
= node["ipaddress"].

Cheers,
Jay

On Thu, Jul 11, 2013 at 4:46 PM, Cassiano Leal cassianoleal@gmail.comwrote:

Hi,

I’ve just installed an OSS Chef Server inside a VPC in AWS. I’m all set up
and I can query the server from my workstation with knife just fine.

The problem is when I try to upload my cookbooks to the Chef server
through Berkshelf. This is what I get:

Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname
provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:100:in
timeout' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in connect'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in
do_start' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:in start'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in
request' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in perform_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in
call' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/chef_auth.rb:74:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:67:in
perform_with_redirection' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:60:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/response.rb:8:in
call' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in run_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in
put' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/sandbox_uploader.rb:91:in upload'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in
public_send' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in dispatch'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in
dispatch' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in block in handle_message'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in
block in initialize' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in block in create'
Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname
provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout’
...

Has anyone had this issue? How can I solve it?

Cheers,
Cassiano Leal

Thanks guys, but it didn’t work.

Here’s more details about my scenario.

I have the Chef server in a private subnet of a VPC. I connect to it by the means of a VPN that’s located in the public subnet of the VPC. It all works, I can access the Chef server (knife and the web UI), via the internal IP, which is also configured in knife.rb as my chef_server_url.

I created /etc/chef-server/chef-server.rb with:

bookshelf[“vip”] = node[“ipaddress”]

and since it didn’t work I added

bookshelf[“url”] = node[“ipaddress”]

After each change I ran chef-server-ctl restart, but I keep getting the same error. Is there a way I can query these parameters (bookshelf[“vip”] and [“url”]) on the Chef server to be sure that they’re properly set?

Cassiano Leal

On Thursday, July 11, 2013 at 17:54, Jay Feldblum wrote:

Cassiano,

This is a common problem with the out-of-the-box OSS chef-server config when the server has a well-known IP address but not a public DNS name.

Everything is configured fine except for bookshelf["vip"], which must be set to node["ipaddress"] rather than node["fqdn"].

You can create a file /etc/chef-server/chef-server.rb with content bookshelf["vip"] = node["ipaddress"].

Cheers,
Jay

On Thu, Jul 11, 2013 at 4:46 PM, Cassiano Leal <cassianoleal@gmail.com (mailto:cassianoleal@gmail.com)> wrote:

Hi,

I’ve just installed an OSS Chef Server inside a VPC in AWS. I’m all set up and I can query the server from my workstation with knife just fine.

The problem is when I try to upload my cookbooks to the Chef server through Berkshelf. This is what I get:

Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:100:in timeout' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in connect'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in do_start' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:in start'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in request' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in perform_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in call' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/chef_auth.rb:74:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:67:in perform_with_redirection' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:60:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/response.rb:8:in call' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in run_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in put' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/sandbox_uploader.rb:91:in upload'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in public_send' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in dispatch'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in dispatch' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in block in handle_message'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in block in initialize' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in block in create'
Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout’

...

Has anyone had this issue? How can I solve it?

Cheers,
Cassiano Leal

On Thursday, July 11, 2013 at 2:14 PM, Cassiano Leal wrote:

Thanks guys, but it didn’t work.

Here’s more details about my scenario.

I have the Chef server in a private subnet of a VPC. I connect to it by the means of a VPN that’s located in the public subnet of the VPC. It all works, I can access the Chef server (knife and the web UI), via the internal IP, which is also configured in knife.rb as my chef_server_url.

I created /etc/chef-server/chef-server.rb with:

bookshelf[“vip”] = node[“ipaddress”]

and since it didn’t work I added

bookshelf[“url”] = node[“ipaddress”]

After each change I ran chef-server-ctl restart, but I keep getting the same error. Is there a way I can query these parameters (bookshelf[“vip”] and [“url”]) on the Chef server to be sure that they’re properly set?
run chef-server-ctl reconfigure, this generates per-service configs from the master chef-server.rb

--
Daniel DeLeo

Cassiano,

You must run chef-server-ctl reconfigure after updating the chef-server
config file in order to get the changed configured to be applied to the
chef-server. Any changes you make to the chef-server config file before
running chef-server-ctl reconfigure will not have any effect.

Cheers,
Jay

On Thu, Jul 11, 2013 at 5:14 PM, Cassiano Leal cassianoleal@gmail.comwrote:

Thanks guys, but it didn’t work.

Here’s more details about my scenario.

I have the Chef server in a private subnet of a VPC. I connect to it by
the means of a VPN that’s located in the public subnet of the VPC. It all
works, I can access the Chef server (knife and the web UI), via the
internal IP, which is also configured in knife.rb as my chef_server_url.

I created /etc/chef-server/chef-server.rb with:

bookshelf[“vip”] = node[“ipaddress”]

and since it didn’t work I added

bookshelf[“url”] = node[“ipaddress”]

After each change I ran chef-server-ctl restart, but I keep getting the
same error. Is there a way I can query these parameters (bookshelf[“vip”]
and [“url”]) on the Chef server to be sure that they’re properly set?

Cassiano Leal

On Thursday, July 11, 2013 at 17:54, Jay Feldblum wrote:

Cassiano,

This is a common problem with the out-of-the-box OSS chef-server config
when the server has a well-known IP address but not a public DNS name.

Everything is configured fine except for bookshelf["vip"], which must be
set to node["ipaddress"] rather than node["fqdn"].

You can create a file /etc/chef-server/chef-server.rb with content bookshelf["vip"]
= node["ipaddress"].

Cheers,
Jay

On Thu, Jul 11, 2013 at 4:46 PM, Cassiano Leal cassianoleal@gmail.comwrote:

Hi,

I’ve just installed an OSS Chef Server inside a VPC in AWS. I’m all set up
and I can query the server from my workstation with knife just fine.

The problem is when I try to upload my cookbooks to the Chef server
through Berkshelf. This is what I get:

Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname
provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:100:in
timeout' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in connect'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in
do_start' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:in start'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in
request' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in perform_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in
call' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/chef_auth.rb:74:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:67:in
perform_with_redirection' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:60:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/response.rb:8:in
call' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in run_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in
put' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/sandbox_uploader.rb:91:in upload'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in
public_send' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in dispatch'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in
dispatch' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in block in handle_message'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in
block in initialize' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in block in create'
Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname
provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout’
...

Has anyone had this issue? How can I solve it?

Cheers,
Cassiano Leal

set bookshelf[“url”] to ec2 external host name, or the chef_server_url

On Thu, Jul 11, 2013 at 2:14 PM, Cassiano Leal cassianoleal@gmail.comwrote:

Thanks guys, but it didn’t work.

Here’s more details about my scenario.

I have the Chef server in a private subnet of a VPC. I connect to it by
the means of a VPN that’s located in the public subnet of the VPC. It all
works, I can access the Chef server (knife and the web UI), via the
internal IP, which is also configured in knife.rb as my chef_server_url.

I created /etc/chef-server/chef-server.rb with:

bookshelf[“vip”] = node[“ipaddress”]

and since it didn’t work I added

bookshelf[“url”] = node[“ipaddress”]

After each change I ran chef-server-ctl restart, but I keep getting the
same error. Is there a way I can query these parameters (bookshelf[“vip”]
and [“url”]) on the Chef server to be sure that they’re properly set?

Cassiano Leal

On Thursday, July 11, 2013 at 17:54, Jay Feldblum wrote:

Cassiano,

This is a common problem with the out-of-the-box OSS chef-server config
when the server has a well-known IP address but not a public DNS name.

Everything is configured fine except for bookshelf["vip"], which must be
set to node["ipaddress"] rather than node["fqdn"].

You can create a file /etc/chef-server/chef-server.rb with content bookshelf["vip"]
= node["ipaddress"].

Cheers,
Jay

On Thu, Jul 11, 2013 at 4:46 PM, Cassiano Leal cassianoleal@gmail.comwrote:

Hi,

I’ve just installed an OSS Chef Server inside a VPC in AWS. I’m all set up
and I can query the server from my workstation with knife just fine.

The problem is when I try to upload my cookbooks to the Chef server
through Berkshelf. This is what I get:

Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname
provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:100:in
timeout' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in connect'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in
do_start' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:in start'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in
request' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in perform_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in
call' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/chef_auth.rb:74:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:67:in
perform_with_redirection' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:60:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/response.rb:8:in
call' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in run_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in
put' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/sandbox_uploader.rb:91:in upload'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in
public_send' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in dispatch'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in
dispatch' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in block in handle_message'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in
block in initialize' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in block in create'
Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname
provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in
block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout’
...

Has anyone had this issue? How can I solve it?

Cheers,
Cassiano Leal

Thanks to all who replied. I got it to work by setting:

bookshelf["vip"] = node["ipaddress"]
bookshelf["url"] = "https://#{node["ipaddress"]}”

on /etc/chef-server/chef-server.rb and issuing the reconfigure command.

This is my first OSS Chef server, so I guess I’ll be sending lots of questions to this list in the near future! :slight_smile:

Cheers,
Cassiano Leal

On Thursday, July 11, 2013 at 18:18, Jay Feldblum wrote:

Cassiano,

You must run chef-server-ctl reconfigure after updating the chef-server config file in order to get the changed configured to be applied to the chef-server. Any changes you make to the chef-server config file before running chef-server-ctl reconfigure will not have any effect.

Cheers,
Jay

On Thu, Jul 11, 2013 at 5:14 PM, Cassiano Leal <cassianoleal@gmail.com (mailto:cassianoleal@gmail.com)> wrote:

Thanks guys, but it didn’t work.

Here’s more details about my scenario.

I have the Chef server in a private subnet of a VPC. I connect to it by the means of a VPN that’s located in the public subnet of the VPC. It all works, I can access the Chef server (knife and the web UI), via the internal IP, which is also configured in knife.rb as my chef_server_url.

I created /etc/chef-server/chef-server.rb with:

bookshelf[“vip”] = node[“ipaddress”]

and since it didn’t work I added

bookshelf[“url”] = node[“ipaddress”]

After each change I ran chef-server-ctl restart, but I keep getting the same error. Is there a way I can query these parameters (bookshelf[“vip”] and [“url”]) on the Chef server to be sure that they’re properly set?

Cassiano Leal

On Thursday, July 11, 2013 at 17:54, Jay Feldblum wrote:

Cassiano,

This is a common problem with the out-of-the-box OSS chef-server config when the server has a well-known IP address but not a public DNS name.

Everything is configured fine except for bookshelf["vip"], which must be set to node["ipaddress"] rather than node["fqdn"].

You can create a file /etc/chef-server/chef-server.rb with content bookshelf["vip"] = node["ipaddress"].

Cheers,
Jay

On Thu, Jul 11, 2013 at 4:46 PM, Cassiano Leal <cassianoleal@gmail.com (mailto:cassianoleal@gmail.com)> wrote:

Hi,

I’ve just installed an OSS Chef Server inside a VPC in AWS. I’m all set up and I can query the server from my workstation with knife just fine.

The problem is when I try to upload my cookbooks to the Chef server through Berkshelf. This is what I get:

Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:100:in timeout' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in connect'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:756:in do_start' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:745:in start'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:1285:in request' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:75:in perform_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/adapter/net_http.rb:38:in call' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/chef_auth.rb:74:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:67:in perform_with_redirection' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/middleware/follow_redirects.rb:60:in call'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/response.rb:8:in call' /Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:247:in run_request'
/Users/cassiano/.gem/ruby/1.9.3/gems/faraday-0.8.7/lib/faraday/connection.rb:112:in put' /Users/cassiano/.gem/ruby/1.9.3/gems/ridley-1.2.4/lib/ridley/sandbox_uploader.rb:91:in upload'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in public_send' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:25:in dispatch'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/calls.rb:67:in dispatch' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/actor.rb:326:in block in handle_message'
/Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks.rb:42:in block in initialize' /Users/cassiano/.gem/ruby/1.9.3/gems/celluloid-0.14.1/lib/celluloid/tasks/task_fiber.rb:11:in block in create'
Ridley::SandboxUploader crashed!
Faraday::Error::ConnectionFailed: getaddrinfo: nodename nor servname provided, or not known
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in initialize' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in open'
/Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/net/http.rb:763:in block in connect' /Users/cassiano/.rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/timeout.rb:55:in timeout’

...

Has anyone had this issue? How can I solve it?

Cheers,
Cassiano Leal