orenoblog

エンジニアになりたいExcel方眼紙erの物語

knife upload実行時に 413 Request Entity Too Large 発生

私が仕事で立てたChef-ServerのリバースプロキシにNginxを利用しています。

cookbookのfilesに6MB程のzipファイルを格納したままuploadすると
このようなエラーが発生。

$ knife cookbook upload aws
Uploading aws            [0.1.0]
kniERROR: Failed to upload  : 413 Request Entity Too Large
<html>
<head><title>413 Request Entity Too Large</title></head>
<body bgcolor="white">
<center><h1>413 Request Entity Too Large</h1></center>
<hr><center>nginx/1.2.6</center>
</body>
</html>
ERROR: RestClient::RequestEntityTooLarge: 413 Request Entity Too Large

対応方法はNginxの設定ファイルにclient_max_body_sizeを記述してnginxをreloadしたら回避出来ましたとさ。
しゅばばばっ