0

I have successfully installed the LXD 3.13 snap package. I have run lxd init and added myself to the lxd group, and am able to create containers:

$ lxc launch ubuntu: example
Creating example
Starting example

However, I am unable to connect to the REST API. I tried running curl --unix-socket /var/lib/lxd/unix.socket s/ as per here, a response of curl: (7) Couldn't connect to server is given.

Using node-lxd, I also receive an error saying:

constructor {
  _message: 'HTTP Error',
  _status: 'Failed',
  _statusCode: 400,
  _innerError:
   { Error: connect ENOENT /var/lib/lxd/unix.socket
       at PipeConnectWrap.afterConnect [as oncomplete] (net.js:1104:14)
     errno: 'ENOENT',
     code: 'ENOENT',
     syscall: 'connect' } }

1 Answer 1

0

The Unix socket for the snap package of LXD is at

/var/snap/lxd/common/lxd/unix.socket

You have been using the path for the Unix socket of the apt package of LXD.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .