"lxc image list ubuntu:" connection fails

> lxc image list ubuntu:
Error: Failed parsing stream: Get "https://cloud-images.ubuntu.com/releases/streams/v1/index.json": read tcp [ip]->192.91.66.131:80: read: connection reset by peer

Any idea what’s going on here? This works fine:

curl https://cloud-images.ubuntu.com/releases/streams/v1/index.json

It works for me, for what it’s worth.

Looking at your error, the IP 192.91.66.131 is owned by Texas Instruments which is odd as I’d expect an IP owned by Canonical for this DNS.

Do you have a proxy configured for LXD?

Yes, I should have specified that I have a proxy configured via the http_proxy and https_proxy environment variables. That might be what that IP is.

I’m using LXD 6.2. I just tried running lxc image list ubuntu: with the same proxy configured inside an Ubuntu 22.04 container (which has LXD 5.0.4) and it works there. So maybe downgrading to LXD 5.x will fix the issue.

Your proxy is being connected on port 80, dunno if that’s expected but it not, that might explain the connection reset you got.

Downgrading between major version is not an option. That said, I don’t think that’d actually fix it. Also, if there is a bug with recent LXD, we want it fixed :slight_smile:

This sounds similar to Failed parsing stream while listing or starting instances · Issue #14839 · canonical/lxd · GitHub

Thanks for pointing me to that issue. I made a comment there.