I have recently updated to juju2.0-beta11 running on Ubuntu 16.04.

I was using the previous release with success but I am having problems since the upgrade a few days ago. When I now try and run any commands about the model on my controller the command line hangs. If I run a --debug option, I get a message about permissions denied on LXD and wondering if I am the lxd group:

2016-07-04 12:51:53 DEBUG juju.juju api.go:143 failed to connect via bootstrap config: constructing environ: invalid config: can't connect to the local LXD server: Permission denied, are you in the lxd group?

Please configure LXD by running:
    $ newgrp lxd
    $ lxd init

If I run groups I can see that I am already in the lxd group

infinityplusb@mypc:~$ groups
lxd adm cdrom sudo ...

If I try and destroy the controller, I cannot, nor can I create a new controller, all due to the same issue with lxd permissions. How can I a) fix the permissions and/or b) delete the existing controller/models, so I can get back to work again. :)


While not really an answer, my workaround was to use lxc directly, and delete all of the running instances. Then remove lxd, clean it up, reboot and reinstall it.

lxc list

Then for each fingerprint in the list, run

lxc image delete FINGERPRINT

Once all the running lxc instances were deleted

sudo apt-get remove –purge lxd
sudo rm -r /var/lib/lxd /var/log/lxd

Reboot. Then,

sudo apt install lxd

Not a great solution, but it worked for me.

| improve this answer | |

Try making sure that /var/lib/lxd/unix.socket is owned by the lxd group. In a recent install of lxd, it ended up being owned by root, and although the user starting juju was in the lxd group, because the unix.socket was owned by root, it failed with the message you saw.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.