After upgrade to 5.18-db8c6f9 can't run lxc as user

After the upgrade to 5.18-db8c6f9 I can’t seem to run lxc ls as a normal user anymore – works as root though:

peter@pirx ~ » lxc ls
Error: Get "http://unix.socket/1.0": dial unix /var/lib/lxd/unix.socket: connect: no such file or directory
peter@pirx ~ » sudo lxc ls                                                                                                                                1 ↵
+------+---------+--------------------+------+-----------------+-----------+
| NAME |  STATE  |        IPV4        | IPV6 |      TYPE       | SNAPSHOTS |
+------+---------+--------------------+------+-----------------+-----------+
| ed-0 | RUNNING | 10.0.8.58 (enp5s0) |      | VIRTUAL-MACHINE | 0         |
+------+---------+--------------------+------+-----------------+-----------+

I tried downgrading to 5.17/stable but that didn’t change the behaviour

Any hints much appreciated, happy to provide more info if it helps

Hi,

What OS version are you running on?

Please can you show the output of groups peter

Here you go:

peter@pirx ~ » groups
peter adm disk cdrom sudo dip plugdev kvm lpadmin lxd sambashare libvirt docker microk8s
peter@pirx ~ » snap version
snap    2.60.3
snapd   2.60.3
series  16
ubuntu  22.04
kernel  6.2.0-34-generic
peter@pirx ~ » lsb_release -a      
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy

cheers!

What do you see for this command:

sudo ls /var/snap/lxd/common/lxd/unix.socket -ls
0 srw-rw---- 1 root lxd 0 Oct  6 09:09 /var/snap/lxd/common/lxd/unix.socket

Seems similar

peter@pirx ~ » sudo ls /var/snap/lxd/common/lxd/unix.socket -ls                                                                                                                                          1 ↵
0 srw-rw---- 1 root lxd 0 Oct  5 19:10 /var/snap/lxd/common/lxd/unix.socket

This seems strange. Its not trying to use the snap.
Do you have a custom lxc binary in your path perhaps?

D’oh indeed I built lxd from source and it did place an ~/bin/lxc – the (coincidental) snap upgrade served as a great red herring :rofl:
Sorry for the noise

1 Like

Thanks @tomp for the help :slight_smile:

1 Like