Failed to download image continuously, do I need to config a https proxy and how?

raspberrypi3
docker
network

#1

Hi folks,

First, thanks for you develop this awesome software, it’s really helpful.

As titled, I meet the problem when I follow the quick start guide and push the demo service as the first commit, I can see the deployment progress again and again and never succeed in the dashboard, and the image download errors are printed in the log [0].

I consider if it caused by my network (I’m in China), if so is there a way to allow me configure https proxy for image downloading and how? I tried to export http_proxy and https_proxy variable but didn’t work. (I had configured redsocks, without it I couldn’t even online my device).

Thanks,
zhiyan

[0] (I removed “http://registry2.resin.io/” due to the link amount limit in the post on new user)
30.05.18 14:21:43 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:21:46 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:21:56 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:22:10 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:22:30 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:22:44 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:22:58 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:23:12 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:23:26 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:30:48 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:31:12 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:31:26 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:31:30 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:31:40 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:31:45 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:31:55 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:31:59 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:32:10 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:32:14 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:32:24 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:32:29 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:32:39 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:32:43 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:32:53 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/: net/http: TLS handshake timeout ’
30.05.18 14:32:57 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 14:33:18 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to '(HTTP code 500) server error - Get v2/v2/eb35d3527a0c6e02fbd6d83a0007b113/manifests/sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc: Get api.resin.io/auth/v1/token?account=XXX&scope=YYY&service=registry2.resin.io: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers) ’
30.05.18 15:05:52 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 16:59:06 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to ‘failed to register layer: Error processing tar file(exit status 1): unexpected EOF’
30.05.18 16:59:10 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 18:49:24 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to ‘failed to register layer: Error processing tar file(exit status 1): unexpected EOF’
30.05.18 18:49:27 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 21:06:03 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to ‘failed to register layer: Error processing tar file(exit status 1): unexpected EOF’
30.05.18 21:06:08 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
30.05.18 23:21:34 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to ‘failed to register layer: Error processing tar file(exit status 1): unexpected EOF’
30.05.18 23:21:38 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’
31.05.18 01:12:17 (+0000) Failed to download image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’ due to ‘failed to register layer: Error processing tar file(exit status 1): unexpected EOF’
31.05.18 01:12:22 (+0000) Downloading image ‘v2/eb35d3527a0c6e02fbd6d83a0007b113@sha256:c1436cb8feedce60fb1ed51f70948358b3dc14ef9bfda4bf71a13e415cd5f9fc’


#2

I am having the same issue. Did you ever get this resolved?


#5

Hi @zhiyanliu, the Great Firewall does have a bad effect on our device’s unfortunately, resin.io services are blocked.

We have incoming proxy improvements, so the entire device communication (including DNS) going through an HTTP proxy, which might help in your case. That’s not released yet, but should be soon, and I guess if you’ll have a workable external HTTP proxy, it should get devices into a better shape.

Working with China’s network is quite difficult, but we are looking into multiple solutions, will keep you posted.


#7

Hi @imrehg , thanks for your inputs, I’m looking forward to trying your built-in proxy solutions, really. Actually I have configured an external proxy, it partially works to make my devices connect to resion.io (dashboard shows devices under online status), however it doesn’t work for service image download. I tried to configure http_proxy and https_proxy environment variables manually in “host OS” container, but it still fails.

@i_ball8 nope :frowning: