Not production ready - getting same error everywhere lxc list error: The remote isn't a private LXD server

Hello,

I started playing with LXD recently> I had the impression that it was a mature product. But everythign I do leads me to the same unexplained error: The remote isn’t a private LXD server
It comes as a response to lxc remote but also to lxc list.
I cannot seem to find much documentation and information online, other than your own answers and documentation here, which makes me worry about using LXD.
Yes, I have read your reply that I need to remove the remote and add it again without the Public option… every time I add it its added as public…

So I feel trapped.

Thanks for your help!

Hmm, can we take a step back here and can you tell us what you’re trying to do, on what LXD version, what command you ran, what the output is and what you expected it to do?

The error you’re getting would indeed happen if the remote is marked public.
A remote will end up marked as public either because you passed --public or because the protocol is simplestreams (in which case there is no concept of private).

A normal:

lxc remote add some-name https://<some IP>:8443

Should result in a new remote using the LXD protocol and marked as private.

1 Like

Stephan, Thank you so much for your quick reply.
I have installed the latest version on two separate machines. One local one is remote. The local is Fedora the remote is Ubuntu 16.04. On that I followed your demo and installed it as a snap.
Both of them have the same issue. Both were working and both stopped working.

This error started popping up on everything I tried to do so I removed the images then I thought I need to add it back but am not able to do that. Probably because it is using simplestreams as you explained.

This whole thing gives me a sense that this product is buggy.

Re-adding the images remote can be done with:

lxc remote add images https://images.linuxcontainers.org --protocol=simplestreams

What does lxc remote list show on both of your systems?

1 Like
# lxc remote list
+------------------+------------------------------------------+---------------+-----------+--------+--------+
|       NAME       |                   URL                    |   PROTOCOL    | AUTH TYPE | PUBLIC | STATIC |
+------------------+------------------------------------------+---------------+-----------+--------+--------+
| images           | https://images.linuxcontainers.org:8443  | lxd           |           | YES    | NO     |
+------------------+------------------------------------------+---------------+-----------+--------+--------+
| local            | unix://                                  | lxd           | tls       | NO     | YES    |
+------------------+------------------------------------------+---------------+-----------+--------+--------+
| ubuntu (default) | https://cloud-images.ubuntu.com/releases | simplestreams |           | YES    | YES    |
+------------------+------------------------------------------+---------------+-----------+--------+--------+
| ubuntu-daily     | https://cloud-images.ubuntu.com/daily    | simplestreams |           | YES    | YES    |
+------------------+------------------------------------------+---------------+-----------+--------+--------+

lxc list

error: The remote isn’t a private LXD server

The listing above shows the “ubuntu” remote as your default remote.

This means that if you wanted to list your local containers you should now use:

lxc list local:

To set the local remote as the default again (as it is out of the box), you should do:

lxc remote set-default local

Thanks again.

I followed your instructions (not sure what was the purpose) but here is what it says:

lxc remote list

±-----------------±-----------------------------------------±--------------±----------±-------±-------+
| NAME | URL | PROTOCOL | AUTH TYPE | PUBLIC | STATIC |
±-----------------±-----------------------------------------±--------------±----------±-------±-------+
| images (default) | https://images.linuxcontainers.org:8443 | lxd | | YES | NO |
±-----------------±-----------------------------------------±--------------±----------±-------±-------+
| local | unix:// | lxd | tls | NO | YES |
±-----------------±-----------------------------------------±--------------±----------±-------±-------+
| ubuntu | https://cloud-images.ubuntu.com/releases | simplestreams | | YES | YES |
±-----------------±-----------------------------------------±--------------±----------±-------±-------+
| ubuntu-daily | https://cloud-images.ubuntu.com/daily | simplestreams | | YES | YES |
±-----------------±-----------------------------------------±--------------±----------±-------±-------+

lxc list

error: The remote isn’t a private LXD serve

The output above suggests you ran lxc remote set-default images, not lxc remote set-default local.

I did both. I don’t understand why would I need the default to be local. I need to use images.
But I think that it does not matter. lxd does not work either way :frowning:

1 Like

You can only have one default remote (that’s kinda the point). That default remote is the one which your client uses when you don’t specify it every time you interact with an object.

lxc list is usually expanded to lxc list local: because the local remote is set as the default.

Based on the output you’ve provided, you keep either setting the ubuntu or images remote as your default, which makes it so that lxc list now does the equivalent of either lxc list ubuntu: or lxc list images:, neither of which are going to work as those are read-only image servers, not container hosts.

Technically you could do:

lxc remote set-default images
lxc launch ubuntu/xenial local:c1
lxc list local:

But it’s really going to be awkward having to always specify the local server whenever you interact with LXD, the above would be far easier if you stick to the default of having the local remote be the default, making it:

lxc remote set-default local
lxc launch images:ubuntu/xenial c1
lxc list
1 Like

I just hit this issue and realized it’s a point of confusion with the LXD vernacular. After using Docker, Flatpak, and Linux repos, the idea of setting a default “remote” sounds like I’m setting a default source from which to download my images. I think even new users understand that the LXCs run locally but probably not that the local LXC host is called a “remote”, just like actually remote “remotes”.

The OP here seemed, like me, to just want to list the images available on a remote image server, then download and run them locally. Perhaps that’s already become obvious since this post, but I wanted to bring up the point here, where the user confusion is visible.