VMmanager Knowledge Base

Error "LXD unix socket not accessible"

Description

Unable to start the lxd service on a node. The startup results in an error:

root@lxd5:~# lxc list
Error: LXD unix socket not accessible: Get "http://unix.socket/1.0": EOF

This issue occurs in Ubuntu OS and is related to the LXD 5.21.1 LTS version.

For more information about the error, see the official Ubuntu documentation.

Diagnostics

Signs of the problem:

  • cyclic restart of the lxd service;
  • errors in the lxd service log.

To identify the problem:

  1. Check the LXD version:

    lxc --version
  2. Check for a cyclic restart of the lxd service:

    systemctl status snap.lxd.daemon

    If the service is cyclically restarting, the output will display that the service has been active for a few seconds. For example:

    Active: active (running) since Sat 2024-04-13 08:14:17 EEST; 1s ago
  3. Check the log of the lxd service:

    journalctl -u snap.lxd.daemon -n 100

    If there is a problem, the log will display a line:

    level=error msg="Failed loading storage pool" err="Required tool 'zpool' is missing" pool=zfs_pool

Solution

To solve the problem, update the OS kernel and utility packages:

  1. Connect to the cluster node via SSH.
  2. Update the kernel:

    apt-get install --install-recommends linux-generic-hwe-20.04
  3. Update the utility packages:

    apt upgrade libzfs2linux zfs-zed zfsutils-linux
  4. Restart the cluster node.