- From: Steven Danna <
>
- To: <
>
- Subject: [chef] Re: Re: Error uploading cookbooks
- Date: Wed, 12 Dec 2012 07:36:55 -0800
On 12/12/12 7:27 AM, Loïc Antoine-Gombeaud wrote:
>
Actually, it seems that Chef::REST follows redirects by sending GET
>
requests only, thus conforming to the HTTP RFCs. This article discusses
>
this behaviour : http://www.alanflavell.org.uk/www/post-redirect.
There is a bug report about this issue here:
http://tickets.opscode.com/browse/CHEF-2682
Those interesting in fixing it might take note of RFC 2616:
>
If the 301 status code is received in response to a request other
>
than GET or HEAD, the user agent MUST NOT automatically redirect the
>
request unless it can be confirmed by the user, since this might
>
change the conditions under which the request was issued.
Cheers,
Steven
>
This may be a problem, since the original request was a POST...
>
>
A solution would be to avoid this redirection altogether by using your
>
server's FQDN (i.e. hq-tor-chef.quickplay.local) in your knife.rb,
>
instead of localhost. I'm curious to know if that would work, since I
>
had issues concerning the FQDN when I first set up my Chef Server.
>
>
On Wed, Dec 12, 2012 at 4:18 PM, Loïc Antoine-Gombeaud
>
<
>
>
<mailto:
>>
>
wrote:
>
>
I'm not sure how to do that, but I believe seeing the body of the
>
"HTTP Request via GET to hq-tor-chef.quickplay.local:443/sandboxes"
>
would help a lot : it seems to be returning valid JSON, but without
>
a 'checksums' key/value.
>
>
On Wed, Dec 12, 2012 at 3:09 PM, Mark Pimentel
>
>
<
>
>
<mailto:
>>
>
wrote:
>
>
Just deployed the latest bootstrap chef-server onto a redhat 6.3
>
node and I get this error when uploading a cookbook:
>
>
DEBUG: Using configuration from /root/.chef/knife.rb
>
DEBUG: No chefignore file found at
>
/root/chef-repo/cookbooks/chefignore no files will be ignored
>
DEBUG: Signing the request as markp
>
DEBUG: Sending HTTP Request via GET to localhost:80/cookbooks
>
DEBUG: ---- HTTP Status and Header Data: ----
>
DEBUG: HTTP 1.1 301 Moved Permanently
>
DEBUG: server: nginx/1.0.15
>
DEBUG: date: Wed, 12 Dec 2012 14:07:40 GMT
>
DEBUG: content-type: text/html
>
DEBUG: content-length: 185
>
DEBUG: connection: close
>
DEBUG: location:
>
https://hq-tor-chef.quickplay.local/cookbooks?num_versions=all
>
DEBUG: ---- End HTTP Status/Header Data ----
>
DEBUG: Following redirect 1/10
>
DEBUG: Signing the request as markp
>
DEBUG: Sending HTTP Request via GET to
>
hq-tor-chef.quickplay.local:443/cookbooks
>
DEBUG: ---- HTTP Status and Header Data: ----
>
DEBUG: HTTP 1.1 200 OK
>
DEBUG: server: nginx/1.0.15
>
DEBUG: date: Wed, 12 Dec 2012 14:07:40 GMT
>
DEBUG: content-type: application/json; charset=utf-8
>
DEBUG: transfer-encoding: chunked
>
DEBUG: connection: close
>
DEBUG: ---- End HTTP Status/Header Data ----
>
Uploading site [0.1.0]
>
INFO: Validating ruby files
>
DEBUG: Ruby file
>
/root/chef-repo/cookbooks/site/attributes/default.rb is
>
unchanged, skipping syntax check
>
DEBUG: Ruby file /root/chef-repo/cookbooks/site/metadata.rb is
>
unchanged, skipping syntax check
>
DEBUG: Ruby file /root/chef-repo/cookbooks/site/recipes/nfs.rb
>
is unchanged, skipping syntax check
>
DEBUG: Ruby file
>
/root/chef-repo/cookbooks/site/recipes/default.rb is unchanged,
>
skipping syntax check
>
INFO: Validating templates
>
INFO: Syntax OK
>
INFO: Saving site
>
DEBUG: Signing the request as markp
>
DEBUG: Sending HTTP Request via POST to localhost:80/sandboxes
>
DEBUG: ---- HTTP Status and Header Data: ----
>
DEBUG: HTTP 1.1 301 Moved Permanently
>
DEBUG: server: nginx/1.0.15
>
DEBUG: date: Wed, 12 Dec 2012 14:07:40 GMT
>
DEBUG: content-type: text/html
>
DEBUG: content-length: 185
>
DEBUG: connection: close
>
DEBUG: location: https://hq-tor-chef.quickplay.local/sandboxes
>
DEBUG: ---- End HTTP Status/Header Data ----
>
DEBUG: Following redirect 1/10
>
DEBUG: Signing the request as markp
>
DEBUG: Sending HTTP Request via GET to
>
hq-tor-chef.quickplay.local:443/sandboxes
>
DEBUG: ---- HTTP Status and Header Data: ----
>
DEBUG: HTTP 1.1 200 OK
>
DEBUG: server: nginx/1.0.15
>
DEBUG: date: Wed, 12 Dec 2012 14:07:40 GMT
>
DEBUG: content-type: application/json; charset=utf-8
>
DEBUG: transfer-encoding: chunked
>
DEBUG: connection: close
>
DEBUG: ---- End HTTP Status/Header Data ----
>
INFO: Uploading files
>
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/cookbook_uploader.rb:80:in
>
`upload_cookbooks': undefined method `each' for nil:NilClass
>
(NoMethodError)
>
from
>
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/knife/cookbook_upload.rb:231:in
>
`upload'
>
from
>
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/knife/cookbook_upload.rb:122:in
>
`block in run'
>
from
>
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/knife/cookbook_upload.rb:119:in
>
`each'
>
from
>
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/knife/cookbook_upload.rb:119:in
>
`run'
>
from
>
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/knife.rb:408:in
>
`run_with_pretty_exceptions'
>
from
>
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/knife.rb:168:in
>
`run'
>
from
>
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/application/knife.rb:123:in
>
`run'
>
from
>
/opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/bin/knife:25:in
>
`<top (required)>'
>
from /opt/ruby/bin/knife:23:in `load'
>
from /opt/ruby/bin/knife:23:in `<main>'
>
>
The install was done over a ruby-1.9.3 compiled from source.
>
>
--
>
Thanks,
>
>
Mark
>
>
>
>
>
--
>
Loïc ANTOINE-GOMBEAUD
>
IT Engineer I
>
Plinga GmbH | www.plinga.com <http://www.plinga.com>
>
Saarbrücker Straße 20/21 | 10405 Berlin | Germany
>
>
E-Mail:
>
>
>
<mailto:
>
>
|
>
Skype:loic.plinga
>
Telefon : +49(0)160-92286573 <tel:%2B49%280%29160-92286573>
>
>
Geschäftsführer: Johannes Kreibohm, Florian Schmidt-Amelung
>
Eingetragen beim Amtsgericht Charlottenburg, HRB 119994
>
>
>
>
>
--
>
Loïc ANTOINE-GOMBEAUD
>
IT Engineer I
>
Plinga GmbH | www.plinga.com <http://www.plinga.com>
>
Saarbrücker Straße 20/21 | 10405 Berlin | Germany
>
>
E-Mail:
>
>
>
<mailto:
>
>
|
>
Skype:loic.plinga
>
Telefon : +49(0)160-92286573
>
>
Geschäftsführer: Johannes Kreibohm, Florian Schmidt-Amelung
>
Eingetragen beim Amtsgericht Charlottenburg, HRB 119994
>
--
Steven Danna
Systems Engineer, Opscode, Inc
GPG Key:
http://stevendanna.github.com/downloads/code/public.key
Attachment:
signature.asc
Description: OpenPGP digital signature
Archive powered by MHonArc 2.6.16.