Hi, I have a problem with snapd, I can’t figure out what the solution can be, could you please help me?
joyce@workstation:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.6 LTS
Release: 16.04
Codename: xenial
joyce@workstation:~$ snap version
snap 2.42.1
snapd unavailable
series -
joyce@workstation:~$ sudo SNAPD_DEBUG=1 /usr/lib/snapd/snapd
AppArmor status: apparmor is enabled and all features are available
2020/05/03 12:14:00.957905 activation.go:64: DEBUG: socket "/run/snapd.socket" was not activated; listening
2020/05/03 12:14:00.957987 activation.go:64: DEBUG: socket "/run/snapd-snap.socket" was not activated; listening
2020/05/03 12:14:00.958779 daemon.go:346: started snapd/2.42.1 (series 16; classic) ubuntu/16.04 (amd64) linux/4.4.0-178-generic.
2020/05/03 12:14:01.023497 daemon.go:439: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
2020/05/03 12:14:01.037701 main.go:143: DEBUG: activation done in 85ms
2020/05/03 12:14:06.038396 daemon.go:540: gracefully waiting for running hooks
2020/05/03 12:14:06.038439 daemon.go:542: done waiting for running hooks
daemon stop requested to wait for socket activation
joyce@workstation:~$ journalctl -u snapd
No journal files were found.
-- No entries --
joyce@workstation:~$ sudo service snaptd start
snaptd: unrecognized service
Whether this could relate to hardware? My laptop works well, no this problem. But my desktop has this problem, I use AMD Ryzen 1700 cpu.
Do you have any snaps installed? Snapd will automatically shut itself down if there are no snaps installed. Try installing the hello-world snap with snap install hello-world.
Hi, I can’t install anything by snap. It seems snapd daemon doesn’t start correctly.
joyce@workstation:~$ snap install hello-world
error: cannot communicate with server: Post http://localhost/v2/snaps/hello-world: dial unix /run/snapd.socket: connect: no such file or directory
Hi, thanks, I do really found something wrong with my systemctl.
joyce@workstation:~$ systemctl start snapd
Failed to add /run/systemd/ask-password to directory watch: No such file or directory
Failed to start snapd.service: Unknown unit: snapd.service
See system logs and 'systemctl status snapd.service' for details.
My installed systemd is not complete, I tried to reinstall it again, it obvisously something wrong going on. I’ll try to figure it out. Before reinstall:
joyce@workstation:~$ ll /run/systemd/
total 0
drwxr-xr-x 6 root root 120 Mai 2 22:13 ./
drwxr-xr-x 30 root root 1140 Mai 4 08:38 ../
drwxr-xr-x 2 root root 240 Mai 4 13:31 inhibit/
drwxr-xr-x 2 root root 60 Mai 2 22:13 seats/
drwxr-xr-x 2 root root 140 Mai 2 22:13 sessions/
drwxr-xr-x 2 root root 80 Mai 2 22:13 users/
When I reinstall:
joyce@workstation:~$ sudo apt-get install --reinstall systemd
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 3.799 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 systemd amd64 229-4ubuntu21.27 [3.799 kB]
Fetched 3.799 kB in 1s (2.975 kB/s)
(Reading database ... 386846 files and directories currently installed.)
Preparing to unpack .../systemd_229-4ubuntu21.27_amd64.deb ...
Unpacking systemd (229-4ubuntu21.27) over (229-4ubuntu21.27) ...
Processing triggers for ureadahead (0.100.0-19.1) ...
ureadahead will be reprofiled on next reboot
Processing triggers for dbus (1.10.6-1ubuntu3.5) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up systemd (229-4ubuntu21.27) ...
addgroup: The group `systemd-journal' already exists as a system group. Exiting.
Operation failed: No such file or directory
[/usr/lib/tmpfiles.d/var.conf:14] Duplicate line for path "/var/log", ignoring.
After I reinstall:
joyce@workstation:~$ ll /run/systemd/
total 4
drwxr-xr-x 10 root root 220 Mai 4 14:10 ./
drwxr-xr-x 31 root root 1180 Mai 4 14:10 ../
drwxr-xr-x 2 root root 40 Mai 4 14:10 ask-password/
drwxr-xr-x 2 root root 240 Mai 4 14:10 inhibit/
drwxr-xr-x 2 root root 40 Mai 4 14:10 machines/
drwxr-xr-x 4 systemd-network systemd-network 80 Mai 4 14:10 netif/
drwxr-xr-x 2 root root 60 Mai 2 22:13 seats/
drwxr-xr-x 2 root root 140 Mai 2 22:13 sessions/
drwxr-xr-x 2 root root 40 Mai 4 14:10 shutdown/
drwxr-xr-x 2 root root 80 Mai 2 22:13 users/
-rw-r--r-- 1 root root 72 Mai 4 14:09 was-enabled
I compared this directory with the one in my laptop, a lot missing.
joyce@workstation:~$ sudo systemctl start snapd
Failed to start snapd.service: Unknown unit: snapd.service
See system logs and 'systemctl status snapd.service' for details.
I have tried installing snapd service on my Debian 10 lxd container.
however, I was not able to run snap install core
root@server:~# snap install core
error: cannot communicate with server: Post "http://localhost/v2/snaps/core": dial unix /run/snapd.socket: connect: no such file or directory
since systemd is disabled on this container for other reasons I cannot run systemctl start snapd.service.
Instead, I tried service snapd start but I am getting package error.
root@server:~# service snapd status
snapd: unrecognized service
i fear systemd is currently a hard requirement. not only to make snapd start but also to install and run snaps (snap packaged daemons create system units, instaling a snap creates a system mount unit for the squashfs snap file)