Help with HTTP Content-Length header issue?


#1

I have a cookbook that uses a remote file resource to get a file from an nginx file server, like this. The server is NOT configured for gzip-like compression.

remote_file “/tmp/vcredist_x64-1.0.2013.exe” do
source " http://nginx-server/path/ vcredist_x64-1.0.2013.exe "
end

When I run it I get…

================================================================================
Error executing action create on resource ‘remote_file[c:\windows\temp\chef-client\vcredist_x64-1.0.2013.exe]’

Chef::Exceptions::ContentLengthMismatch

Response body length 1592008 does not match HTTP Content-Length header 2155670.

What’s strange is this has been working, and my cookbook has NOT changed in months. I did upgrade to chef-client 12.3.0, so I tried 12.2.1, but that gives the same error.

Any clues?


#2

Sounds kinda like one that I ran into awhile back:
http://lists.opscode.com/sympa/arc/chef/2015-01/msg00381.html

Some more details here:

Double check your nginx error log to see if something similar is occurring

Greg

On Fri, May 15, 2015 at 3:52 PM, Fouts, Chris Chris.Fouts@sensus.com
wrote:

I have a cookbook that uses a remote file resource to get a file from an
nginx file server, like this. The server is NOT configured for gzip-like
compression.

remote_file “/tmp/vcredist_x64-1.0.2013.exe” do

source " http://nginx-server/path/ vcredist_x64-1.0.2013.exe "

end

When I run it I get…

================================================================================

Error executing action create on resource
’remote_file[c:\windows\temp\chef-client\vcredist_x64-1.0.2013.exe]’

================================================================================

Chef::Exceptions::ContentLengthMismatch


Response body length 1592008 does not match HTTP Content-Length header
2155670.

What’s strange is this has been working, and my cookbook has NOT changed
in months. I did upgrade to chef-client 12.3.0, so I tried 12.2.1, but that
gives the same error.

Any clues?