{"action":"created","issue":{"url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/322","labels_url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/322/labels{/name}","comments_url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/322/comments","events_url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/322/events","html_url":"https://github.com/opscode-cookbooks/jenkins/issues/322","id":55690709,"number":322,"title":"junkins_plugin ContentLengthMismatch for remote url","user":{"login":"fletchowns","id":153107,"avatar_url":"https://avatars.githubusercontent.com/u/153107?v=3","gravatar_id":"","url":"https://api.github.com/users/fletchowns","html_url":"https://github.com/fletchowns","followers_url":"https://api.github.com/users/fletchowns/followers","following_url":"https://api.github.com/users/fletchowns/following{/other_user}","gists_url":"https://api.github.com/users/fletchowns/gists{/gist_id}","starred_url":"https://api.github.com/users/fletchowns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fletchowns/subscriptions","organizations_url":"https://api.github.com/users/fletchowns/orgs","repos_url":"https://api.github.com/users/fletchowns/repos","events_url":"https://api.github.com/users/fletchowns/events{/privacy}","received_events_url":"https://api.github.com/users/fletchowns/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-01-27T23:23:31Z","updated_at":"2015-01-28T18:48:29Z","closed_at":"2015-01-28T18:48:29Z","body":"I have plugins uploaded to S3 and I'm running into this quite frequently. Not sure if it's an issue with S3 or what, I was able to curl the URL and download it on my machine, and the sha256 matches the [official one](http://updates.jenkins-ci.org/download/plugins/git-client/1.12.0/git-client.hpi). Other remote_file uses in this chef run that hit this same bucket don't have any issue. This is running on a local VirtualBox VM via Vagrant. Any ideas?\r\n\r\n```\r\n==> default: Resource Declaration:\r\n==> default: ---------------------\r\n==> default: # In /tmp/vagrant-chef-3/chef-solo-1/cookbooks/mycorp-jenkins/recipes/jenkins_plugins.rb\r\n==> default:\r\n==> default:  15:       jenkins_plugin plugin[\"name\"] do\r\n==> default:  16:               source \"#{node['mycorp-jenkins']['plugin_source_url']}/#{plugin['name']}/#{plugin['version']}/#{plugin['name']}.hpi\"\r\n==> default:  17:               version plugin[\"version\"]\r\n==> default:\r\n==> default:  18:               install_deps false\r\n==> default:  19:       end\r\n==> default:  20: end\r\n==> default:\r\n==> default: Compiled Resource:\r\n==> default: ------------------\r\n==> default: # Declared in /tmp/vagrant-chef-3/chef-solo-1/cookbooks/mycorp-jenkins/recipes/jenkins_plugins.rb:15:in `block in from_file'\r\n==> default:\r\n==> default:\r\n==> default: jenkins_plugin(\"git-client\") do\r\n==> default:   action :install\r\n==> default:   retries 0\r\n==> default:   retry_delay 2\r\n==> default:   guard_interpreter :default\r\n==> default:   cookbook_name :\"mycorp-jenkins\"\r\n==> default:   recipe_name \"jenkins_plugins\"\r\n==> default:   source \"https://s3-us-west-1.amazonaws.com/my-bucket/jenkins-plugins/git-client/1.12.0/git-client.hpi\"\r\n==> default:   version \"1.12.0\"\r\n==> default: end\r\n==> default:\r\n==> default:\r\n==> default:\r\n==> default: [2015-01-27T22:31:00+00:00] INFO: Running queued delayed notifications before re-raising exception\r\n==> default: [2015-01-27T22:31:00+00:00] DEBUG: Re-raising exception: Chef::Exceptions::ContentLengthMismatch - jenkins_plugin[git-client] (mycorp-jenkins:\r\n:jenkins_plugins line 15) had an error: Chef::Exceptions::ContentLengthMismatch: remote_file[/var/chef/cache/jenkins-cli.jar] (dynamically defined) had an error\r\n: Chef::Exceptions::ContentLengthMismatch: Response body length 179864 does not match HTTP Content-Length header 751490.\r\n==> default: /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.2/lib/chef/http/validate_content_length.rb:102:in `validate'\r\n==> default:   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.2/lib/chef/http/validate_content_length.rb:60:in `handle_stream_complete'\r\n==> default:   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.2/lib/chef/http.rb:236:in `block in apply_stream_complete_middleware'\r\n==> default:   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.2/lib/chef/http.rb:234:in `each'\r\n==> default:   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.2/lib/chef/http.rb:234:in `inject'\r\n==> default:   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.2/lib/chef/http.rb:234:in `apply_stream_complete_middleware'\r\n==> default:   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.2/lib/chef/http.rb:174:in `block in streaming_request'\r\n==> default:   /opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.16.2/lib/chef/http/basic_client.rb:74:in `block in request'\r\n```"},"comment":{"url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/comments/71891570","html_url":"https://github.com/opscode-cookbooks/jenkins/issues/322#issuecomment-71891570","issue_url":"https://api.github.com/repos/opscode-cookbooks/jenkins/issues/322","id":71891570,"user":{"login":"fletchowns","id":153107,"avatar_url":"https://avatars.githubusercontent.com/u/153107?v=3","gravatar_id":"","url":"https://api.github.com/users/fletchowns","html_url":"https://github.com/fletchowns","followers_url":"https://api.github.com/users/fletchowns/followers","following_url":"https://api.github.com/users/fletchowns/following{/other_user}","gists_url":"https://api.github.com/users/fletchowns/gists{/gist_id}","starred_url":"https://api.github.com/users/fletchowns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fletchowns/subscriptions","organizations_url":"https://api.github.com/users/fletchowns/orgs","repos_url":"https://api.github.com/users/fletchowns/repos","events_url":"https://api.github.com/users/fletchowns/events{/privacy}","received_events_url":"https://api.github.com/users/fletchowns/received_events","type":"User","site_admin":false},"created_at":"2015-01-28T18:48:29Z","updated_at":"2015-01-28T18:48:29Z","body":"Thanks Lamont! Couldn't get that command to work (and don't know much about ethtool) but now that I know the actual file download it's failing on I was able to reproduce it with curl.\r\n\r\nDownloading jenkins-cli.jar through nginx reverse proxy:\r\n```\r\n[vagrant@jenkins ~]$ curl -versbose https://jenkins.mycorp.com//jnlpJars/jenkins-cli.jar -o jenkins-cli.jar\r\n* About to connect() to jenkins.mycorp.com port 443 (#0)\r\n*   Trying 127.0.1.1... connected\r\n* Connected to jenkins.mycorp.com (127.0.1.1) port 443 (#0)\r\n* Initializing NSS with certpath: sql:/etc/pki/nssdb\r\n*   CAfile: /etc/pki/tls/certs/ca-bundle.crt\r\n  CApath: none\r\n* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA\r\n> GET //jnlpJars/jenkins-cli.jar HTTP/1.1\r\n> User-Agent: curl/7.19.7 (x86_64-redhat-linux-gnu) libcurl/7.19.7 NSS/3.16.2.3 Basic ECC zlib/1.2.3 libidn/1.18 libssh2/1.4.2\r\n> Host: jenkins.mycorp.com\r\n> Accept: */*\r\n> Referer: rsbose\r\n>\r\n  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current\r\n                                 Dload  Upload   Total   Spent    Left  Speed\r\n  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0< HTTP/1.1 200 OK\r\n< Server: nginx/1.6.2\r\n< Date: Wed, 28 Jan 2015 18:36:26 GMT\r\n< Content-Type: application/java-archive\r\n< Content-Length: 751490\r\n< Connection: keep-alive\r\n< Content-Disposition: attachment; filename=jenkins-cli.jar\r\n< Last-Modified: Wed, 28 Jan 2015 03:52:35 GMT\r\n< Expires: Wed, 28 Jan 2015 03:52:35 GMT\r\n< Accept-Ranges: bytes\r\n< X-Content-Type-Options: nosniff\r\n<\r\n{ [data not shown]\r\n* transfer closed with 276719 bytes remaining to read\r\n 63  733k   63  463k    0     0  4278k      0 --:--:-- --:--:-- --:--:-- 16.7M* Closing connection #0\r\n\r\ncurl: (18) transfer closed with 276719 bytes remaining to read\r\n```\r\n\r\nAnd the nginx error log shows this:\r\n```\r\n2015/01/28 18:42:02 [crit] 1005#0: *21 open() \"/opt/nginx-1.6.2/proxy_temp/0/01/0000000010\" failed (13: Permission denied) while reading upstream, client: 127.0.1.1, server: jenkins, request: \"GET //jnlpJars/jenkins-cli.jar HTTP/1.1\", upstream: \"http://127.0.0.1:8080//jnlpJars/jenkins-cli.jar\", host: \"jenkins.mycorp.com\", referrer: \"rsbose\"\r\n```\r\n\r\nThe permissions to `/opt/nginx-1.6.2/proxy_temp` looked ok but it turned out that an unrelated script was mucking with the permissions of the parent directory.\r\n\r\nThanks so much for your time, really appreciate it. I'll go ahead and close this one out."}}