[chef] Re: Re: Re: Re: Error uploading cookbooks


Chronological Thread 
  • From: Loïc Antoine-Gombeaud < >
  • To:
  • Subject: [chef] Re: Re: Re: Re: Error uploading cookbooks
  • Date: Wed, 12 Dec 2012 17:23:47 +0100

I added a warning when redirecting with a different method, not sure if it is the appropriate log level though : https://github.com/opscode/chef/pull/534
Also, I notice that changing to the FQDN has solved the first issue :)

On Wed, Dec 12, 2012 at 4:52 PM, Mark Pimentel < " target="_blank"> > wrote:
So I updated the server option in the knife.rb to be the fqdn of the server and now I get this:

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 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 15:51:34 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/../chef-repo/cookbooks/site/attributes/default.rb is unchanged, skipping syntax check
DEBUG: Ruby file /root/.chef/../chef-repo/cookbooks/site/metadata.rb is unchanged, skipping syntax check
DEBUG: Ruby file /root/.chef/../chef-repo/cookbooks/site/recipes/nfs.rb is unchanged, skipping syntax check
DEBUG: Ruby file /root/.chef/../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 hq-tor-chef.quickplay.local:443/sandboxes
DEBUG: ---- HTTP Status and Header Data: ----
DEBUG: HTTP 1.1 201 Created
DEBUG: server: nginx/1.0.15
DEBUG: date: Wed, 12 Dec 2012 15:51:34 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
INFO: Uploading /root/chef-repo/cookbooks/site/recipes/nfs.rb (checksum hex = 8ed03d6cab76d23d9a287cdf85ba99ac) to https://hq-tor-chef.quickplay.local/sandboxes/5777250a18924455a3794023b36a27f5/8ed03d6cab76d23d9a287cdf85ba99ac
INFO: Uploading /root/chef-repo/cookbooks/site/recipes/default.rb (checksum hex = 40319a324ba808cf84b192b14126efb0) to https://hq-tor-chef.quickplay.local/sandboxes/5777250a18924455a3794023b36a27f5/40319a324ba808cf84b192b14126efb0
INFO: Uploading /root/chef-repo/cookbooks/site/attributes/default.rb (checksum hex = 53e43bdeca8ac48ecb5540663cb657ca) to https://hq-tor-chef.quickplay.local/sandboxes/5777250a18924455a3794023b36a27f5/53e43bdeca8ac48ecb5540663cb657ca
INFO: Uploading /root/chef-repo/cookbooks/site/metadata.rb (checksum hex = 868ce5688c78fbae0c460380132927c5) to https://hq-tor-chef.quickplay.local/sandboxes/5777250a18924455a3794023b36a27f5/868ce5688c78fbae0c460380132927c5
INFO: Uploading /root/chef-repo/cookbooks/site/README.md (checksum hex = f3ea896f400a1e1d9fd93473e59fd5d2) to https://hq-tor-chef.quickplay.local/sandboxes/5777250a18924455a3794023b36a27f5/f3ea896f400a1e1d9fd93473e59fd5d2
INFO: Uploading /root/chef-repo/cookbooks/site/metadata.json (checksum hex = 44fa6e9bc46b13182d346bdc7965ed00) to https://hq-tor-chef.quickplay.local/sandboxes/5777250a18924455a3794023b36a27f5/44fa6e9bc46b13182d346bdc7965ed00
ERROR: Failed to upload  : 500 Internal Server Error
{"error":["No such file or directory - /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-server-api-10.16.2/sandbox20121212-29912-108n7n3.lock"]}ERROR: Failed to upload  : 500 Internal Server Error
{"error":["No such file or directory - /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-server-api-10.16.2/sandbox20121212-29912-t7rrqh.lock"]}
ERROR: Failed to upload  : 500 Internal Server Error
{"error":["No such file or directory - /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-server-api-10.16.2/sandbox20121212-29912-u3twkg.lock"]}
ERROR: Failed to upload  : 500 Internal Server Error
{"error":["No such file or directory - /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-server-api-10.16.2/sandbox20121212-29912-onv4k9.lock"]}

/opt/ruby/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/abstract_response.rb:48:in `return!': 500 Internal Server Error (RestClient::InternalServerError)
from /opt/ruby/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:230:in `process_result'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:178:in `block in transmit'
from /opt/ruby/lib/ruby/1.9.1/net/http.rb:745:in `start'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:172:in `transmit'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:64:in `execute'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/request.rb:33:in `execute'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/rest-client-1.6.7/lib/restclient/resource.rb:76:in `put'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/cookbook_uploader.rb:142:in `block in uploader_function_for'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/cookbook_uploader.rb:25:in `call'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/cookbook_uploader.rb:25:in `block (3 levels) in setup_worker_threads'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/cookbook_uploader.rb:24:in `loop'
from /opt/ruby/lib/ruby/gems/1.9.1/gems/chef-10.16.2/lib/chef/cookbook_uploader.rb:24:in `block (2 levels) in setup_worker_threads'


On Wed, Dec 12, 2012 at 10:36 AM, Steven Danna < " target="_blank"> > wrote:
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
> < " target="_blank"> <mailto: " target="_blank"> >> 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
>     < " target="_blank"> <mailto: " target="_blank"> >> 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: " target="_blank"> <mailto: " target="_blank"> > |
>     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: " target="_blank"> <mailto: " target="_blank"> > |
> 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




--
Thanks,

Mark



--
Loïc ANTOINE-GOMBEAUD
IT Engineer I
Plinga GmbH | www.plinga.com
Saarbrücker Straße 20/21 | 10405 Berlin | Germany

E-Mail: " target="_blank"> | Skype:loic.plinga
Telefon : +49(0)160-92286573

Geschäftsführer: Johannes Kreibohm, Florian Schmidt-Amelung
Eingetragen beim Amtsgericht Charlottenburg, HRB 119994




Archive powered by MHonArc 2.6.16.

§