Dev Container: Failed to connect to local daemon

after building from source and dependencies, I try evoking incus admin init to start the daemon and I end up getting this error:

Error: Failed to connect to local daemon: Get "http://unix.socket/1.0": dial unix /var/lib/incus/unix.socket: connect: permission denied

I am running this on the supplied devcontainer which had been only working if I ran incusd in a shell session

I wouldn’t expect the daemon to automatically start in that environment, you may need to start it yourself with something like incusd --verbose

How about in the Ubuntu VM? I ran into the same issue on that environment and I am not sure what the solution is (or really what the issue is since the socket does exist in that path)

My goal is to be able to get clustering setup so I can replicate Issue 2166

I think because I built from source I have to invoke incusd from the CLI

The file /var/lib/incus/unix.socket might be there, but if there’s no program listening onto the socket, the socket is dead. See https://unix.stackexchange.com/questions/556748/how-to-check-whether-a-socket-is-listening-or-not for some tips on how to figure out whether there’s a program behind that listens to a socket. You can use socat, ss, lsof, etc.

When you compile Incus, you get the incusd binary. You would need to setup some service file (i.e. systemd) so that your Linux distribution would start and keep running the Incus service.

For your debugging purposes, you may find useful to start incusd --verbose from a new terminal window so that you can see in real-time what’s going on while debugging the thing you are interested in.