Noob help - lxd init fails on Ubuntu 16.04

When I use lxd, it fails on lxd init .

$ snap install lxd
lxd 3.0.0 from 'canonical' installed
$ lxd init
Error: Failed to connect to local LXD: Get http://unix.socket/1.0: dial unix 
/var/snap/lxd/common/lxd/unix.socket: connect: no such file or directory

I have the following on my computer:

$ snapcraft --version
snapcraft, version 2.42.1
$ uname -a
4.13.0-43-generic #48~16.04.1-Ubuntu SMP Thu May 17 12:56:46 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

I don’t know if this is relevant, but my computer uses Intel i7-7500U and has Secure Boot UEFI.

Below is output of more commands:

$ snap services lxd
Service     Startup  Current
lxd.daemon  enabled  active
$ snap logs lxd.daemon
2018-05-28T22:22:42Z lxd.daemon[1404]:   5: fd:  11: pids
2018-05-28T22:22:42Z lxd.daemon[1404]:   6: fd:  12: perf_event
2018-05-28T22:22:42Z lxd.daemon[1404]:   7: fd:  13: hugetlb
2018-05-28T22:22:42Z lxd.daemon[1404]:   8: fd:  14: cpu,cpuacct
2018-05-28T22:22:42Z lxd.daemon[1404]:   9: fd:  15: freezer
2018-05-28T22:22:42Z lxd.daemon[1404]:  10: fd:  16: net_cls,net_prio
2018-05-28T22:22:42Z lxd.daemon[1404]:  11: fd:  17: name=systemd
2018-05-28T22:22:42Z lxd.daemon[1404]: lvl=warn msg="CGroup memory swap accounting is disabled, swap limits will be ignored." t=2018-05-28T22:22:42+0000
2018-05-28T22:22:42Z lxd.daemon[1404]: lvl=warn msg="Failed to update instance types: Get lookup on [::1]:53: dial udp [::1]:53: connect: cannot assign requested address" t=2018-05-28T22:22:42+0000
2018-05-28T22:22:43Z lxd.daemon[1404]: => LXD is ready
$ lxd init
Error: Failed to connect to local LXD: Get http://unix.socket/1.0: dial unix /var/snap/lxd/common/lxd/unix.socket: connect: permission denied

Does lxd snap requires ipv6? Can I force ipv4? Is something else wrong?


$ groups myusername 
 myusername : myusername adm cdrom sudo dip plugdev lpadmin sambashare lxd 

I am a member of lxd group. but

$ groups 
 myusername adm cdrom sudo dip plugdev lpadmin sambashare 

has no lxd. What does it mean?

Also, whats the correct channel to get support on lxd ? (ubuntu forums, askubuntu, this forum, … ?)

First, this might be a shortcut to the issue: you have installed the snap of LXD but your computer is in an interim state because there is already installed a Deb package of LXD in 16.04. in such cases, you would need to run sudo lxd.migrate and follow the instructions to fully migrate to the snap (you are asked to remove the Deb packages of LXD as well).

Regarding how to get support on LXD, this forum is the most active venue. The others are not that active. I follow them and answer lxd-related questions. Askubuntu gets about one question per week, and ubuntuforums does not have a dedicated subforum for LXD. Linuxquestions sees a bit more activity than ubuntuforums.

run newgrp lxd or logout/login to have your active list of groups be updated.