# Error uploading Cookbooks

**URL:** <https://discourse.chef.io/t/error-uploading-cookbooks/3708>\
**Category:** Chef Infra (archive)\
**Created:** [March 6, 2013, 9:12pm UTC](https://discourse.chef.io/t/error-uploading-cookbooks/3708 "2013-03-06T21:12:37Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Pimentel](https://avatars.discourse-cdn.com/v4/letter/m/9f8e36/32.png) [@Mark\_Pimentel](https://discourse.chef.io/u/Mark_Pimentel)\
**Post date:** [March 6, 2013, 9:12pm UTC](https://discourse.chef.io/t/error-uploading-cookbooks/3708/1 "2013-03-06T21:12:37Z")

</div>

I am trying to upload a cookbook to my Chef 11.0.2 server and I am getting  
an error.

DEBUG: ---- HTTP Status and Header Data: ----  
DEBUG: HTTP 1.1 500 Internal Server Error  
DEBUG: server: nginx/1.2.3  
DEBUG: date: Wed, 06 Mar 2013 20:27:39 GMT  
DEBUG: content-type: application/json  
DEBUG: content-length: 36  
DEBUG: connection: close  
DEBUG: x-ops-api-info: flavor=osc;version=11.0.2;erchef=1.2.5  
DEBUG: ---- End HTTP Status/Header Data ----  
INFO: HTTP Request Returned 500 Internal Server Error: internal service  
error  
ERROR: Server returned error for  
[https://hq-tor-chef.quickplay.local/sandboxes/0000000000001c52a724fedde7f52add](https://hq-tor-chef.quickplay.local/sandboxes/0000000000001c52a724fedde7f52add),  
retrying 1/5 in 3s

This only occurs on cookbooks, not roles, data\_bags etc.

–  
Thanks,

Mark

---

<div class="post-metadata">

**Author:** ![kallistec](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/kallistec/32/23_2.png) [@kallistec](https://discourse.chef.io/u/kallistec)\
**Post date:** [March 6, 2013, 9:21pm UTC](https://discourse.chef.io/t/error-uploading-cookbooks/3708/2 "2013-03-06T21:21:03Z")

</div>

On Wednesday, March 6, 2013 at 1:12 PM, Mark Pimentel wrote:

> I am trying to upload a cookbook to my Chef 11.0.2 server and I am getting an error.
> 
> DEBUG: ---- HTTP Status and Header Data: ----  
> DEBUG: HTTP 1.1 500 Internal Server Error  
> DEBUG: server: nginx/1.2.3  
> DEBUG: date: Wed, 06 Mar 2013 20:27:39 GMT  
> DEBUG: content-type: application/json  
> DEBUG: content-length: 36  
> DEBUG: connection: close  
> DEBUG: x-ops-api-info: flavor=osc;version=11.0.2;erchef=1.2.5  
> DEBUG: ---- End HTTP Status/Header Data ----  
> INFO: HTTP Request Returned 500 Internal Server Error: internal service error  
> ERROR: Server returned error for [https://hq-tor-chef.quickplay.local/sandboxes/0000000000001c52a724fedde7f52add](https://hq-tor-chef.quickplay.local/sandboxes/0000000000001c52a724fedde7f52add), retrying 1/5 in 3s
> 
> This only occurs on cookbooks, not roles, data\_bags etc.
> 
> --  
> Thanks,
> 
> Mark  
> Can you get relevant logs with `chef-server-ctl tail` and share them?

--  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Baruch\_Shpirer](https://avatars.discourse-cdn.com/v4/letter/b/dc4da7/32.png) [@Baruch\_Shpirer](https://discourse.chef.io/u/Baruch_Shpirer)\
**Post date:** [March 6, 2013, 9:44pm UTC](https://discourse.chef.io/t/error-uploading-cookbooks/3708/3 "2013-03-06T21:44:03Z")

</div>

Attaching some logs while trying to do cookbook upload

==\> /var/log/chef-server/erchef/current \<==  
2013-03-06\_21:13:49.98214 {webmachine\_resource,do,3,  
2013-03-06\_21:13:49.98214 [{file,“src/webmachine\_resource.erl”},{line,125}]},  
2013-03-06\_21:13:49.98215 {webmachine\_decision\_core,resource\_call,1,  
2013-03-06\_21:13:49.98215 [{file,“src/webmachine\_decision\_core.erl”},{line,48}]},  
2013-03-06\_21:13:49.98215 {webmachine\_decision\_core,accept\_helper,0,  
2013-03-06\_21:13:49.98216 [{file,“src/webmachine\_decision\_core.erl”},{line,583}]},  
2013-03-06\_21:13:49.98216 {webmachine\_decision\_core,decision,1,  
2013-03-06\_21:13:49.98216 [{file,“src/webmachine\_decision\_core.erl”},{line,489}]},  
2013-03-06\_21:13:49.98217 {webmachine\_decision\_core,handle\_request,2,  
2013-03-06\_21:13:49.98218 [{file,“src/webmachine\_decision\_core.erl”},{line,33}]}]}}

==\> /var/log/chef-server/nginx/access.log \<==  
192.168.75.74 - - [06/Mar/2013:16:40:58 -0500] “GET /cookbooks?num\_versions=all HTTP/1.1” 200 “0.020” 979 “-” “Chef Knife/0.10.10 (ruby-1.9.2-p180; ohai-0.6.12; x86\_64-linux; +http://opscode.com)” “127.0.0.1:8000” “200” “0.013” “0.10.10” “version=1.0” “baruchs” “2013-03-06T21:40:58Z” “2jmj7l5rSw0yVb/vlWAYkK/YBwk=” 940  
192.168.75.74 - - [06/Mar/2013:16:40:58 -0500] “POST /sandboxes HTTP/1.1” 201 “0.070” 752 “-” “Chef Knife/0.10.10 (ruby-1.9.2-p180; ohai-0.6.12; x86\_64-linux; +http://opscode.com)” “127.0.0.1:8000” “201” “0.023” “0.10.10” “version=1.0” “baruchs” “2013-03-06T21:40:58Z” “17WVwc7QAnAtCnOlTAlgc5YUZM8=” 1232  
192.168.75.74 - - [06/Mar/2013:16:40:58 -0500] “PUT /bookshelf/organization-00000000000000000000000000000000/checksum-960131de20bb72d55d52df914d73a5e2?AWSAccessKeyId=e849c1918a22eabefc7e7832b27173ab5b93016d&Expires=1362606958&Signature=G5O2Ex3Gz7l0aWmmwyiHRPQFmI0%3D HTTP/1.1” 204 “0.014” 0 “-” “Ruby” “127.0.0.1:4321” “204” “0.007” “-” “version=1.0” “baruchs” “2013-03-06T21:40:58Z” “hZyLgj7RPtRg/pSvY7LOq2Fotrc=” 3573

==\> /var/log/chef-server/erchef/erchef.log.1 \<==  
2013-03-06T21:40:58Z [erchef@127.0.0.1](mailto:erchef@127.0.0.1) INFO req\_id=rXyk1ks5Taz5qtOTGtPtuQ==; status=200; method=GET; path=/cookbooks?num\_versions=all; user=baruchs; msg=[]; req\_time=9; rdbms\_time=3; rdbms\_count=2  
2013-03-06T21:40:58Z [erchef@127.0.0.1](mailto:erchef@127.0.0.1) INFO req\_id=2Qzog7D0fQQx3g3z1KUPZQ==; status=201; method=POST; path=/sandboxes; user=baruchs; msg=[]; req\_time=20; rdbms\_time=16; rdbms\_count=3

==\> /var/log/chef-server/erchef/current \<==  
2013-03-06\_21:41:03.84624  
2013-03-06\_21:41:03.84638 =ERROR REPORT==== 6-Mar-2013::16:41:03 ===  
2013-03-06\_21:41:03.84639 Checking presence of checksum: \<\<“960131de20bb72d55d52df914d73a5e2”\>\> for org \<\<“00000000000000000000000000000000”\>\> from bucket “bookshelf” has taken longer than 5000 ms

==\> /var/log/chef-server/nginx/access.log \<==  
192.168.75.74 - - [06/Mar/2013:16:41:03 -0500] “PUT /sandboxes/000000000000be13430442db7a83ab5f HTTP/1.1” 500 “5.059” 36 “-” “Chef Knife/0.10.10 (ruby-1.9.2-p180; ohai-0.6.12; x86\_64-linux; +http://opscode.com)” “127.0.0.1:8000” “500” “5.010” “0.10.10” “version=1.0” “baruchs” “2013-03-06T21:40:58Z” “oMRtV6loUDnbKJuGcW6nqBbF8ww=” 1029

==\> /var/log/chef-server/erchef/current \<==  
2013-03-06\_21:41:03.84851  
2013-03-06\_21:41:03.84854 =ERROR REPORT==== 6-Mar-2013::16:41:03 ===  
2013-03-06\_21:41:03.84854 webmachine error: path="/sandboxes/000000000000be13430442db7a83ab5f"  
2013-03-06\_21:41:03.84855 {error,  
2013-03-06\_21:41:03.84860 {throw,  
2013-03-06\_21:41:03.84861 {checksum\_check\_error,1},  
2013-03-06\_21:41:03.84862 [{chef\_wm\_named\_sandbox,validate\_checksums\_uploaded,2,  
2013-03-06\_21:41:03.84862 [{file,“src/chef\_wm\_named\_sandbox.erl”},{line,144}]},  
2013-03-06\_21:41:03.84864 {chef\_wm\_named\_sandbox,from\_json,2,  
2013-03-06\_21:41:03.84865 [{file,“src/chef\_wm\_named\_sandbox.erl”},{line,99}]},  
2013-03-06\_21:41:03.84865 {webmachine\_resource,resource\_call,3,  
2013-03-06\_21:41:03.84866 [{file,“src/webmachine\_resource.erl”},{line,166}]},  
2013-03-06\_21:41:03.84867 {webmachine\_resource,do,3,  
2013-03-06\_21:41:03.84867 [{file,“src/webmachine\_resource.erl”},{line,125}]},  
2013-03-06\_21:41:03.84868 {webmachine\_decision\_core,resource\_call,1,  
2013-03-06\_21:41:03.84869 [{file,“src/webmachine\_decision\_core.erl”},{line,48}]},  
2013-03-06\_21:41:03.84869 {webmachine\_decision\_core,accept\_helper,0,  
2013-03-06\_21:41:03.84870 [{file,“src/webmachine\_decision\_core.erl”},{line,583}]},  
2013-03-06\_21:41:03.84871 {webmachine\_decision\_core,decision,1,  
2013-03-06\_21:41:03.84871 [{file,“src/webmachine\_decision\_core.erl”},{line,489}]},  
2013-03-06\_21:41:03.84872 {webmachine\_decision\_core,handle\_request,2,  
2013-03-06\_21:41:03.84874 [{file,“src/webmachine\_decision\_core.erl”},{line,33}]}]}}

==\> /var/log/chef-server/erchef/erchef.log.1 \<==  
2013-03-06T21:41:03Z [erchef@127.0.0.1](mailto:erchef@127.0.0.1) ERR req\_id=FOOYERUCt/btbq9O/5AAkg==; status=500; method=PUT; path=/sandboxes/000000000000be13430442db7a83ab5f; user=baruchs; msg=[]; req\_time=5007; rdbms\_time=3; rdbms\_count=2; s3\_time=5000; s3\_count=1

From: Daniel DeLeo [[mailto:ddeleo@kallistec.com](mailto:ddeleo@kallistec.com)] On Behalf Of Daniel DeLeo  
Sent: Wednesday, March 06/03/2013 16:21  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Error uploading Cookbooks

On Wednesday, March 6, 2013 at 1:12 PM, Mark Pimentel wrote:  
I am trying to upload a cookbook to my Chef 11.0.2 server and I am getting an error.

DEBUG: ---- HTTP Status and Header Data: ----  
DEBUG: HTTP 1.1 500 Internal Server Error  
DEBUG: server: nginx/1.2.3  
DEBUG: date: Wed, 06 Mar 2013 20:27:39 GMT  
DEBUG: content-type: application/json  
DEBUG: content-length: 36  
DEBUG: connection: close  
DEBUG: x-ops-api-info: flavor=osc;version=11.0.2;erchef=1.2.5  
DEBUG: ---- End HTTP Status/Header Data ----  
INFO: HTTP Request Returned 500 Internal Server Error: internal service error  
ERROR: Server returned error for [https://hq-tor-chef.quickplay.local/sandboxes/0000000000001c52a724fedde7f52add](https://hq-tor-chef.quickplay.local/sandboxes/0000000000001c52a724fedde7f52add), retrying 1/5 in 3s

This only occurs on cookbooks, not roles, data\_bags etc.

–  
Thanks,

Mark  
Can you get relevant logs with `chef-server-ctl tail` and share them?

–  
Daniel DeLeo

---

<div class="post-metadata">

**Author:** ![Seth\_Falcon\_01](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/seth_falcon_01/32/429_2.png) [@Seth\_Falcon\_01](https://discourse.chef.io/u/Seth_Falcon_01)\
**Post date:** [March 6, 2013, 11:51pm UTC](https://discourse.chef.io/t/error-uploading-cookbooks/3708/4 "2013-03-06T23:51:14Z")

</div>

Hi there,

In the logs I see this bit, which seems to be getting closer to the cause of the issues you are seeing:

> 2013-03-06\_21:41:03.84638 =ERROR REPORT==== 6-Mar-2013::16:41:03 ===  
> 2013-03-06\_21:41:03.84639 Checking presence of checksum: \<\<"960131de20bb72d55d52df914d73a5e2"\>\> for org \<\<"00000000000000000000000000000000"\>\> from bucket "bookshelf" has taken longer than 5000 ms

It would be interesting to see if you always see this error leading up to the cookbook upload failure and if it is for the same checksum or different checksums.

The timeout is tunable, but unless your server is under considerable load, I would have expected that you'd run into this -- so there may be something else going on or a bug we will identify 🙂

As an aside, it would be worth upgrading to 11.0.6 as there are some security fixes that are worth having.

On Mar 6, 2013, at 1:44 PM, Baruch Shpirer wrote:

> 192.168.75.74 - - [06/Mar/2013:16:40:58 -0500] "POST /sandboxes HTTP/1.1" 201 "0.070" 752 "-" "Chef Knife/0.10.10 (ruby-1.9.2-p180; ohai-0.6.12; x86\_64-linux; +http://opscode.com)" "127.0.0.1:8000" "201" "0.023" "0.10.10" "version=1.0" "baruchs" "2013-03-06T21:40:58Z" "17WVwc7QAnAtCnOlTAlgc5YUZM8=" 1232

So a sandbox was created.

> 192.168.75.74 - - [06/Mar/2013:16:40:58 -0500] "PUT /bookshelf/organization-00000000000000000000000000000000/checksum-960131de20bb72d55d52df914d73a5e2?AWSAccessKeyId=e849c1918a22eabefc7e7832b27173ab5b93016d&Expires=1362606958&Signature=G5O2Ex3Gz7l0aWmmwyiHRPQFmI0%3D HTTP/1.1" 204 "0.014" 0 "-" "Ruby" "127.0.0.1:4321" "204" "0.007" "-" "version=1.0" "baruchs" "2013-03-06T21:40:58Z" "hZyLgj7RPtRg/pSvY7LOq2Fotrc=" 3573

The problem checksum appears to have been successfully uploaded to bookshelf. You could verify that it is on disk by looking in /var/opt/chef-server/bookshelf/data for a file with the 960131de20bb72d55d52df914d73a5e2 in its name.

> ==\> /var/log/chef-server/erchef/erchef.log.1 \<==  
> 2013-03-06T21:40:58Z [erchef@127.0.0.1](mailto:erchef@127.0.0.1) INFO req\_id=rXyk1ks5Taz5qtOTGtPtuQ==; status=200; method=GET; path=/cookbooks?num\_versions=all; user=baruchs; msg=; req\_time=9; rdbms\_time=3; rdbms\_count=2  
> 2013-03-06T21:40:58Z [erchef@127.0.0.1](mailto:erchef@127.0.0.1) INFO req\_id=2Qzog7D0fQQx3g3z1KUPZQ==; status=201; method=POST; path=/sandboxes; user=baruchs; msg=; req\_time=20; rdbms\_time=16; rdbms\_count=3
> 
> ==\> /var/log/chef-server/erchef/current \<==  
> 2013-03-06\_21:41:03.84624  
> 2013-03-06\_21:41:03.84638 =ERROR REPORT==== 6-Mar-2013::16:41:03 ===  
> 2013-03-06\_21:41:03.84639 Checking presence of checksum: \<\<"960131de20bb72d55d52df914d73a5e2"\>\> for org \<\<"00000000000000000000000000000000"\>\> from bucket "bookshelf" has taken longer than 5000 ms
> 
> ==\> /var/log/chef-server/nginx/access.log \<==  
> 192.168.75.74 - - [06/Mar/2013:16:41:03 -0500] "PUT /sandboxes/000000000000be13430442db7a83ab5f HTTP/1.1" 500 "5.059" 36 "-" "Chef Knife/0.10.10 (ruby-1.9.2-p180; ohai-0.6.12; x86\_64-linux; +http://opscode.com)" "127.0.0.1:8000" "500" "5.010" "0.10.10" "version=1.0" "baruchs" "2013-03-06T21:40:58Z" "oMRtV6loUDnbKJuGcW6nqBbF8ww=" 1029

Here we see the error report for the failure to verify the existance of the checksum in bookshelf and then the 500 for the request trying to commit the sandbox.

Does this happen for any cookbook upload? E.g. can you see what happens if you try to upload one of the community cookbooks?

- seth

---

<div class="post-metadata">

**Author:** ![Baruch\_Shpirer](https://avatars.discourse-cdn.com/v4/letter/b/dc4da7/32.png) [@Baruch\_Shpirer](https://discourse.chef.io/u/Baruch_Shpirer)\
**Post date:** [March 7, 2013, 4:15am UTC](https://discourse.chef.io/t/error-uploading-cookbooks/3708/5 "2013-03-07T04:15:18Z")

</div>

We found the problem, we changed IP and the older one was still in /etc/hosts and nginx didn’t like it  
Thanks for the help

-----Original Message-----  
From: Seth Falcon [[mailto:seth@opscode.com](mailto:seth@opscode.com)]  
Sent: Wednesday, March 06/03/2013 18:51  
To: [chef@lists.opscode.com](mailto:chef@lists.opscode.com)  
Subject: [chef] Re: Error uploading Cookbooks

Hi there,

In the logs I see this bit, which seems to be getting closer to the cause of the issues you are seeing:

> 2013-03-06\_21:41:03.84638 =ERROR REPORT==== 6-Mar-2013::16:41:03 ===  
> 2013-03-06\_21:41:03.84639 Checking presence of checksum:  
> \<\<"960131de20bb72d55d52df914d73a5e2"\>\> for org  
> \<\<"00000000000000000000000000000000"\>\> from bucket "bookshelf" has  
> taken longer than 5000 ms

It would be interesting to see if you always see this error leading up to the cookbook upload failure and if it is for the same checksum or different checksums.

The timeout is tunable, but unless your server is under considerable load, I would have expected that you'd run into this -- so there may be something else going on or a bug we will identify 🙂

As an aside, it would be worth upgrading to 11.0.6 as there are some security fixes that are worth having.

On Mar 6, 2013, at 1:44 PM, Baruch Shpirer wrote:

> 192.168.75.74 - - [06/Mar/2013:16:40:58 -0500] "POST /sandboxes  
> HTTP/1.1" 201 "0.070" 752 "-" "Chef Knife/0.10.10 (ruby-1.9.2-p180;  
> ohai-0.6.12; x86\_64-linux; +http://opscode.com)" "127.0.0.1:8000"  
> "201" "0.023" "0.10.10" "version=1.0" "baruchs" "2013-03-06T21:40:58Z"  
> "17WVwc7QAnAtCnOlTAlgc5YUZM8=" 1232

So a sandbox was created.

> 192.168.75.74 - - [06/Mar/2013:16:40:58 -0500] "PUT  
> /bookshelf/organization-00000000000000000000000000000000/checksum-9601  
> 31de20bb72d55d52df914d73a5e2?AWSAccessKeyId=e849c1918a22eabefc7e7832b2  
> 7173ab5b93016d&Expires=1362606958&Signature=G5O2Ex3Gz7l0aWmmwyiHRPQFmI  
> 0%3D HTTP/1.1" 204 "0.014" 0 "-" "Ruby" "127.0.0.1:4321" "204" "0.007"  
> "-" "version=1.0" "baruchs" "2013-03-06T21:40:58Z"  
> "hZyLgj7RPtRg/pSvY7LOq2Fotrc=" 3573

The problem checksum appears to have been successfully uploaded to bookshelf. You could verify that it is on disk by looking in /var/opt/chef-server/bookshelf/data for a file with the 960131de20bb72d55d52df914d73a5e2 in its name.

> ==\> /var/log/chef-server/erchef/erchef.log.1 \<== 2013-03-06T21:40:58Z  
> [erchef@127.0.0.1](mailto:erchef@127.0.0.1) INFO req\_id=rXyk1ks5Taz5qtOTGtPtuQ==; status=200;  
> method=GET; path=/cookbooks?num\_versions=all; user=baruchs; msg=;  
> req\_time=9; rdbms\_time=3; rdbms\_count=2 2013-03-06T21:40:58Z  
> [erchef@127.0.0.1](mailto:erchef@127.0.0.1) INFO req\_id=2Qzog7D0fQQx3g3z1KUPZQ==; status=201;  
> method=POST; path=/sandboxes; user=baruchs; msg=; req\_time=20;  
> rdbms\_time=16; rdbms\_count=3
> 
> ==\> /var/log/chef-server/erchef/current \<==  
> 2013-03-06\_21:41:03.84624  
> 2013-03-06\_21:41:03.84638 =ERROR REPORT==== 6-Mar-2013::16:41:03 ===  
> 2013-03-06\_21:41:03.84639 Checking presence of checksum:  
> \<\<"960131de20bb72d55d52df914d73a5e2"\>\> for org  
> \<\<"00000000000000000000000000000000"\>\> from bucket "bookshelf" has  
> taken longer than 5000 ms
> 
> ==\> /var/log/chef-server/nginx/access.log \<==  
> 192.168.75.74 - - [06/Mar/2013:16:41:03 -0500] "PUT  
> /sandboxes/000000000000be13430442db7a83ab5f HTTP/1.1" 500 "5.059" 36  
> "-" "Chef Knife/0.10.10 (ruby-1.9.2-p180; ohai-0.6.12; x86\_64-linux;  
> +http://opscode.com)" "127.0.0.1:8000" "500" "5.010" "0.10.10"  
> "version=1.0" "baruchs" "2013-03-06T21:40:58Z"  
> "oMRtV6loUDnbKJuGcW6nqBbF8ww=" 1029

Here we see the error report for the failure to verify the existance of the checksum in bookshelf and then the 500 for the request trying to commit the sandbox.

Does this happen for any cookbook upload? E.g. can you see what happens if you try to upload one of the community cookbooks?

- seth
