ganto/copr-lxc3

Error: Get http://unix.socket/1.0: dial unix /run/lxd.socket: connect: no such file or directory

abitrolly opened this issue · 5 comments

~ lxc launch ubuntu:18.04 local:u18  
Error: Get http://unix.socket/1.0: dial unix /run/lxd.socket: connect: no such file or directory

Where could be the problem?

➜  ~ systemctl status lxd-containers.service      
● lxd-containers.service - LXD - container startup/shutdown
   Loaded: loaded (/usr/lib/systemd/system/lxd-containers.service; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:lxd(1)
➜  ~ systemctl status lxd.socket 
● lxd.socket - LXD - unix socket
   Loaded: loaded (/usr/lib/systemd/system/lxd.socket; enabled; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:lxd(1)
   Listen: /run/lxd.socket (Stream)
➜  ~ systemctl status lxd.service 
● lxd.service - LXD - main daemon
   Loaded: loaded (/usr/lib/systemd/system/lxd.service; indirect; vendor preset: disabled)
   Active: inactive (dead)
     Docs: man:lxd(1)

Fedora 31

➜  ~ lxc version --force-local
Client version: 3.18
Server version: unreachable
Installed Packages
Name         : lxd
Version      : 3.18
Release      : 0.1.fc31
Architecture : x86_64
Size         : 36 M
Source       : lxd-3.18-0.1.fc31.src.rpm
Repository   : @System
From repo    : ganto-lxc3

Uninstalling gives these errors.

Running transaction
  Preparing        :                                                                                                                                                  1/1 
  Running scriptlet: lxd-3.18-0.1.fc31.x86_64                                                                                                                         1/1 
  Running scriptlet: lxd-3.18-0.1.fc31.x86_64                                                                                                                         1/5 
Removed /etc/systemd/system/sockets.target.wants/lxd.socket.
Removed /etc/systemd/system/multi-user.target.wants/lxd-containers.service.
Failed to disable unit: Unit file lxd-container.service does not exist.

  Erasing          : lxd-3.18-0.1.fc31.x86_64                                                                                                                         1/5 
  Running scriptlet: lxd-3.18-0.1.fc31.x86_64                                                                                                                         1/5 
  Running scriptlet: lxcfs-3.1.2-0.2.fc31.x86_64                                                                                                                      2/5 
  Erasing          : lxcfs-3.1.2-0.2.fc31.x86_64                                                                                                                      2/5 
  Running scriptlet: lxcfs-3.1.2-0.2.fc31.x86_64                                                                                                                      2/5 
  Erasing          : lxc-templates-3.2.1-0.3.fc31.x86_64                                                                                                              3/5 
  Running scriptlet: lxc-libs-3.2.1-0.3.fc31.x86_64                                                                                                                   4/5 
Failed to stop lxc@.service: Unit name lxc@.service is missing the instance name.
See system logs and 'systemctl status lxc@.service' for details.

  Erasing          : lxc-libs-3.2.1-0.3.fc31.x86_64                                                                                                                   4/5 

And this is shown during install.

$ sudo dnf install lxd
...
  Running scriptlet: lxd-3.18-0.1.fc31.x86_64                                                                                                                         5/5 
Failed to preset unit: Unit file lxd-container.service does not exist.

ganto commented

Indeed. Thanks for reporting this. 👍

There is a typo in the spec file. Seems that dnf was more reserved about invalid systemd units in the past. Will fix it with the next release and properly test it on Fedora 31.

ganto commented

Sorry for the big delay. I now decided to create a new 3.18 build (lxd-3.18-0.2) that should fix the issue with the lxd-containers.service name.

The socket error occurred because you forgot to source the profile after installing the RPMs. Please follow the steps at https://copr.fedorainfracloud.org/coprs/ganto/lxc3/.

I'm closing the issue for now. Feel free to re-open if you still have issues.