Docker build fails with "Exited with code exit status 56" when downloading assets

Docker builds can fail with the following error:

curl: (56) OpenSSL SSL_read: SSL_ERROR_SYSCALL, errno 104
The command '/bin/sh -c curl -v -o /downloads/out.zip https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip' returned a non-zero code: 56

Exited with code exit status 56
CircleCI received exit code 56

This can occur on Remote Docker (setup_remote_docker) and Linux Machine Executors.

To resolve this issue on Remote Docker, add the following run step after setup_remote_docker but before docker build or other Docker commands:

- run: ssh remote-docker 'sudo iptables -I INPUT -m conntrack --ctstate INVALID -j DROP'

To resolve this issue on Linux Machine Executors, add the following run step before docker build or other Docker commands:

- run: sudo iptables -I INPUT -m conntrack --ctstate INVALID -j DROP
Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.