Problems with keyserver

Hello,

I have an older hostsystem with Debian 10 as operating system. There I have now installed LXC.
vm-bs30:~$ lxc-create --version
3.0.3

Now when I run the following command, I get an error:

vm-bs30:~$ sudo lxc-create -n Debian10 -t download
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: Debian10_template: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: Debian10_template: tools/lxc_create.c: main: 327 Failed to create container Debian10_template

But if I select the template directly, it works
vm-bs30:~$ sudo lxc-create -n Debian10 -t debian -- -r buster

Is this because of the old version of lxc? Is there a solution for this problem? I can’t update the host system at the moment, so I’m depending on this LXC version.

Nah, it’s because the GPG key network has been under attack for years and is a bit of a mess.
Recent versions of LXC no longer rely on GPG for the index files.

Note that LXC 3.0 is out of support as it’s over 5 years old now.

A potential workaround may be to set DOWNLOAD_KEYSERVER in your environment to keyserver.ubuntu.com, hoping that this key server still functions.

1 Like

thx, for the fast replay!

it is like it is :slight_smile: how can I run a newer version under debian buster? is this possible?

this also does not work. but that is not a bad thing. I can specify the version directly

I’m not seeing any backport for buster, though as buster has been end of life since June 2022, I suspect the majority of the Debian repositories (like the backports repository) have been removed by now. You can still get basic security updates through the Debian LTS repos, but even that is into its last year now.

Note that you most likely can “steal” the lxc-download script from a much newer LXC version and just put it in place in /usr/share/lxc/templates. The API for our template scripts has been left basically unmodified for the past decade :slight_smile:

1 Like

I know, and we will update the server soon too. But before that, a few small things need to be done. :slight_smile:

I will try this with the copy of the script, thanks!

Great, it works!