I am trying to use remote_file resource to download the zip file from my https server.
Sometimes the remote_file resource downloads the file completely and sometimes it fails with the error shown below:-

As the error message states, this is likely an issue with your network or the configuration of the remote server. The server had told chef that the file was about 800k, but the file that chef got was only about 240k, and therefore was probably incomplete and/or corrupted. If the problem is really intermittent and you just want to work around the issue for now, you could add retries to the remote file resource. If you have access to the logs on the server that hosts the file, that may be a good place to start troubleshooting the issue for a more robust solution.