I can't pull images

I try to create a lxc instance but keep getting connection reset by peer.
incus init images:ubuntu/22.04 testing

Error: Failed instance creation: Get “https://sgp1lxdmirror01.do.letsbuildthe.cloud/images/ubuntu/jammy/amd64/default/20250126_07:42/incus.tar.xz”: read tcp 192.168.0.51:60444->167.71.218.48:443: read: connection reset by peer

nslookup sgp1lxdmirror01.do.letsbuildthe.cloud

Server: 192.168.0.48
Address: 192.168.0.48#53

Non-authoritative answer:
Name: sgp1lxdmirror01.do.letsbuildthe.cloud
Address: 167.71.218.48
Name: sgp1lxdmirror01.do.letsbuildthe.cloud
Address: 2400:6180:0:d0::10f8:6001

nslookup sgp1lxdmirror01.do.letsbuildthe.cloud 1.1.1.1

Server: 1.1.1.1
Address: 1.1.1.1#53

Non-authoritative answer:
Name: sgp1lxdmirror01.do.letsbuildthe.cloud
Address: 167.71.218.48
Name: sgp1lxdmirror01.do.letsbuildthe.cloud
Address: 2400:6180:0:d0::10f8:6001

any ideas?

curl to that URL works for me:

% curl -fsS https://sgp1lxdmirror01.do.letsbuildthe.cloud/images/ubuntu/jammy/amd64/default/20250126_07:42/incus.tar.xz | tar -tvzf -

-rw-r--r--  0 root   root      526 26 Jan 07:47 metadata.yaml
drwxr-xr-x  0 root   root        0 26 Jan 07:47 templates/
-rw-r--r--  0 root   root       21 26 Jan 07:47 templates/hostname.tpl
-rw-r--r--  0 root   root      140 26 Jan 07:47 templates/hosts.tpl
% 

Try the command yourself, then try with -4 and -6 flags to see if the issue is with IPv6.

If this curl command doesn’t work for you, then perhaps there’s some local network issue on your side. Do you need to use a proxy perhaps? Are you behind some sort of man-in-the-middle firewall?

curl failed too.
how does incus use proxy to pull image? is http_proxy or https_proxy or HTTP_PROXY or HTTPS_PROXY?
I can’t find any document about it.
thank you for helping me.

The incus documentation is here: Incus documentation

Type “proxy” into the search box. This will lead you to settings core.http_proxy and core.https_proxy

It does say it will pick up HTTP_PROXY and HTTPS_PROXY, but I presume those have to be set in the environment that starts the incus daemon (e.g. from systemd unit file) - setting them in your shell before doing an incus init won’t make any difference.

Hence I think it’s easier to apply those incus configuration settings directly.

thank you very much.
I was using HTTP_PROXY and HTTPS_PROXY, and incus just ignore my setting.
I succeeded to pull image after set core.proxy_https and core.proxy_http.

2 Likes