Unable to run "incus admin init" for adding cluster member

Hello everyone,

I just bought two mini PC to try incus clustering but I am having issues for two days now when trying to put them in a cluster. I enabled clustering on one node. I am now trying to add the other server as cluster member but when I run incus admin init then get to the question about the ip or dns of the server, I am getting an error. I think it should accept even the default value, which is the IP address of the host. But nope. It says: Invalid input: Can't bind address "192.168.0.177:8443": listen tcp 192.168.0.177:8443: bind: address already in use.

Entering the IP address manually also produces the same error. I have uninstall and reinstall incus twice already but I am still getting the same error. I am probably doing something wrong but I am not able to catch it.

I am using incus 6.0.0 on an Ubuntu 24.04 host.

I am wondering if someone could help me fix this issue.

Thank you,
Mamadou

Welcome!

From the screenshot I can see that you are running sudo incus admin init twice or more than once.

When you run sudo incus admin init the first time on a node, it sets up your system appropriately, may open up the port 8443 to be used by Incus and also sets up any managed network interfaces.

This means that you would only run incus admin init once. If you want to run a second time, you would need to tear down the setup (i.e. uninstall), so that you run again from scratch.

It is possible that you have some other service running and using port 8443. You can verify that using lsof. In my case below, my Incus is already listening to port 8443. Verify on your side as well. If you are starting on a clean server, no service should be listening on port 8443.

$ sudo lsof -i :8443
COMMAND  PID USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
incusd  3505 root   25u  IPv6  55747      0t0  TCP *:8443 (LISTEN)
$ 

In addition, a cluster setup of Incus requires at least three nodes.

When you want to form or create an Incus cluster, follow these steps.

  1. If you already have an existing (non-clustered) Incus installation, you can convert it to the initial Incus bootstrap cluster node.
  2. Otherwise, when you run incus admin init to setup Incus for the first time, you setup from the beginning as the (first) Incus bootstrap cluster node.

Then you start adding the additional nodes to the cluster. The big difference here is that any additional nodes should be fresh Incus installations that you have just created with incus admin init.

2 Likes

@simos Thank you for the assistance. It worked like charm after I reinstalled incus on 3 nodes, then followed the instructions you pointed out. I had 2 PCs but I added a raspberry pi as third node.

Thank you again,
Sandy

1 Like