尝试上传食谱时发生内部服务器错误

尝试上传食谱时发生内部服务器错误

我正在尝试将我们的 Chef 服务器迁移到另一个盒子。我在新盒子中安装了 Chef 的新实例,我可以使用默认管理员和密码访问它。我还可以执行knife node list和上传除食谱之外的所有 Chef 数据。

问题是,当我尝试将食谱从旧的上传到新的时,它就坏了。

> knife cookbook upload apache2
Uploading apache2      [1.5.1]
ERROR: internal server error
Response: internal service error

我尝试过的事情:

  • 检查主机名
  • 打开并验证端口 443
  • 检查 chef-server 文件夹权限

但这些都不起作用。以下是chef-server-ctl tail命令的日志。

2014-11-12T21:40:28Z [email protected] INFO req_id=iG7nM6ILkl84vjVs8f9rFA==; status=200; method=GET; path=/cookbooks?num_versions=all; user=ben; msg=[]; req_time=6; rdbms_time=3; rdbms_count=2
2014-11-12T21:40:29Z [email protected] INFO req_id=w9R2Wt1GHWhYCpFC6MauzA==; status=201; method=POST; path=/sandboxes; user=ben; msg=[]; req_time=281; rdbms_time=217; rdbms_count=3
2014-11-12T21:40:33Z [email protected] ERR req_id=bXsf3IHga8mrhoogEXzSwg==; status=500; method=PUT; path=/sandboxes/0000000000004553487f032bb30dc6fb; user=ben; msg=[]; req_time=499; rdbms_time=4; rdbms_count=2; s3_time=490; s3_count=1

更详细的错误:

2014-11-12_22:24:31.77088 
2014-11-12_22:24:31.77090 =ERROR REPORT==== 13-Nov-2014::11:24:31 ===
2014-11-12_22:24:31.77090 webmachine error: path="/sandboxes/00000000000007d35d55d66b7d3b6935"
2014-11-12_22:24:31.77090 {error,
2014-11-12_22:24:31.77091     {throw,
2014-11-12_22:24:31.77091         {checksum_check_error,111},
2014-11-12_22:24:31.77091         [{chef_wm_named_sandbox,validate_checksums_uploaded,2,
2014-11-12_22:24:31.77091              [{file,"src/chef_wm_named_sandbox.erl"},{line,144}]},
2014-11-12_22:24:31.77092          {chef_wm_named_sandbox,from_json,2,
2014-11-12_22:24:31.77092              [{file,"src/chef_wm_named_sandbox.erl"},{line,99}]},
2014-11-12_22:24:31.77092          {webmachine_resource,resource_call,3,
2014-11-12_22:24:31.77092              [{file,"src/webmachine_resource.erl"},{line,166}]},
2014-11-12_22:24:31.77093          {webmachine_resource,do,3,
2014-11-12_22:24:31.77093              [{file,"src/webmachine_resource.erl"},{line,125}]},
2014-11-12_22:24:31.77093          {webmachine_decision_core,resource_call,1,
2014-11-12_22:24:31.77093              [{file,"src/webmachine_decision_core.erl"},{line,48}]},
2014-11-12_22:24:31.77094          {webmachine_decision_core,accept_helper,0,
2014-11-12_22:24:31.77094              [{file,"src/webmachine_decision_core.erl"},{line,583}]},
2014-11-12_22:24:31.77094          {webmachine_decision_core,decision,1,
2014-11-12_22:24:31.77094              [{file,"src/webmachine_decision_core.erl"},{line,489}]},
2014-11-12_22:24:31.77096          {webmachine_decision_core,handle_request,2,
2014-11-12_22:24:31.77096              [{file,"src/webmachine_decision_core.erl"},{line,33}]}]}}

我正在使用 CentOS 6.5 和我的 chef 版本清单:

chef-server 11.0.8

Component               Installed Version   Version GUID                                   
-------------------------------------------------------------------------------------------
bookshelf               0.2.1               git:0a01f74ffd1313c4dc9bf0d236e03a871add4e01   
chef-expander           11.0.0              git:14b11a96da1273b362f39ab11c411470688a8bd6   
chef-gem                11.4.0              
chef-pedant             1.0.3               git:15de6cd06f16ee5dee501d6aba36f4ba60162e62   
chef-server-cookbooks   11.0.8              
chef-server-ctl         11.0.8              
chef-server-scripts     11.0.8              
chef-server-webui       11.0.4              git:498097c0793e51e4f4e7df9f35ee1a3ed3282841   
chef-solr               11.0.1              git:bcd45175fd402f3082e7146f94c5d571b0620434   
erchef                  1.2.6               git:77ade20f166367b5f0cde468e3c6066b8a327475   
nginx                   1.2.3               md5:0a986e60826d9e3b453dbefc36bf8f6c           
postgresql              9.2.4               md5:6ee5bb53b97da7c6ad9cb0825d3300dd           
preparation             11.0.8              
rabbitmq                2.7.1               md5:34a5f9fb6f22e6681092443fcc80324f           
runit                   2.1.1               md5:8fa53ea8f71d88da9503f62793336bc3           
unicorn                 4.2.0               
version-manifest        11.0.8

有任何想法吗?

答案1

在将食谱上传到服务器之前,请确保 Chef 存储库中没有任何临时/交换文件。Chef 不喜欢这些。

相关内容