snapd.seeded.service 的作业失败,因为控制进程退出并显示错误代码

snapd.seeded.service 的作业失败,因为控制进程退出并显示错误代码

apt-cache 策略 snapd snapd:已安装:2.32.9 候选版本:2.32.9 版本表:*** 2.32.9 500 500http://us.archive.ubuntu.com/ubuntuxenial-updates/main amd64 软件包 100 /var/lib/dpkg/status 2.0.2 500 500http://us.archive.ubuntu.com/ubuntuxenial/main amd64 软件包 chris@localhost:~$ lsb_release -rd 描述:Ubuntu 16.04.4 LTS 发布:16.04

今天早上将 snapd 从 2.32.3.2 更新到 2.32.9 后,我收到以下错误输出:

Job for snapd.seeded.service failed because the control process exited with error code. 
See "systemctl status snapd.seeded.service" and "journalctl -xe"      
for details. snapd.seeded.service couldn't start.
snapd.snap-repair.service is a disabled or a static unit, not starting it.

“systemctl status snapd.seeded.service”的输出:

systemctl snapd.seeded.service
Unknown operation snapd.seeded.service.
chris@localhost:~$ systemctl status snapd.seeded.service
● snapd.seeded.service - Wait until snapd is fully seeded
Loaded: loaded (/lib/systemd/system/snapd.seeded.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Fri 2018-06-01 07:58:40 CDT; 5min ago
Process: 15535 ExecStart=/usr/bin/snap wait system seed.loaded (code=exited, status=1/FAILURE)
Main PID: 15535 (code=exited, status=1/FAILURE)
Jun 01 07:58:35 localhost.localdomain systemd[1]: Starting Wait until snapd is fully seeded...
Jun 01 07:58:40 localhost.localdomain snap[15535]: error: cannot communicate  with server: Get http://local
Jun 01 07:58:40 localhost.localdomain systemd[1]: snapd.seeded.service: Main process exited, code=exited, 
Jun 01 07:58:40 localhost.localdomain systemd[1]: Failed to start Wait until snapd is fully seeded.
Jun 01 07:58:40 localhost.localdomain systemd[1]: snapd.seeded.service: Unit entered failed state.
Jun 01 07:58:40 localhost.localdomain systemd[1]: snapd.seeded.service: Failed with result 'exit-code'.

查看 journalctl -xe 没有显示任何内容,也许我等得太久才运行它?但是这是该时间范围内的 syslog 输出:

Jun  1 07:58:35 localhost systemd[1]: Starting Wait until snapd is fully seeded...
Jun  1 07:58:40 localhost snap[15535]: error: cannot communicate with server: Get http://localhost/v2/snaps/system/conf?keys=seed.loaded: dial unix /run/snapd.socket: connect: connection refused
Jun  1 07:58:40 localhost systemd[1]: snapd.seeded.service: Main process exited, code=exited, status=1/FAILURE
Jun  1 07:58:40 localhost systemd[1]: Failed to start Wait until snapd is fully seeded.
Jun  1 07:58:40 localhost systemd[1]: snapd.seeded.service: Unit entered failed state.
Jun  1 07:58:40 localhost systemd[1]: snapd.seeded.service: Failed with result 'exit-code'.
Jun  1 07:58:40 localhost systemd[1]: Starting Socket activation for snappy daemon.
Jun  1 07:58:40 localhost systemd[1]: Listening on Socket activation for snappy daemon.
Jun  1 07:58:41 localhost systemd[1]: Starting Snappy daemon...
Jun  1 07:58:41 localhost snapd[15552]: AppArmor status: apparmor is enabled and all features are available
Jun  1 07:58:41 localhost snapd[15552]: AppArmor status: apparmor is enabled and all features are available
Jun  1 07:58:42 localhost snapd[15552]: 2018/06/01 07:58:42.104321 daemon.go:343: started snapd/2.33~rc1 (series 16; classic) ubuntu/16.04 (amd64) linux/4.13.0-43-generic.
Jun  1 07:58:42 localhost systemd[1]: Started Snappy daemon.
Jun  1 07:58:42 localhost systemd[1]: Listening on Socket activation for snappy daemon.
Jun  1 07:58:44 localhost kernel: [863229.980726] audit: type=1400 audit(1527857924.259:138): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/snapd/snap-confine" pid=15577 comm="apparmor_parser"
Jun  1 07:58:44 localhost kernel: [863229.994170] audit: type=1400 audit(1527857924.272:139): apparmor="STATUS" operation="profile_replace" profile="unconfined" name="/usr/lib/snapd/snap-confine//mount-namespace-capture-helper" pid=15577 comm="apparmor_parser"
Jun  1 07:58:47 localhost snapd[15552]: 2018/06/01 07:58:47.766008 storehelpers.go:413: cannot refresh:
Jun  1 07:58:47 localhost snapd[15552]: snap "nethack": snap has no updates available
Jun  1 07:58:47 localhost snapd[15552]: snap "speed-test": snap has no updates available
Jun  1 07:58:47 localhost snapd[15552]: snap "snapweb": snap has no updates available
Jun  1 07:58:47 localhost snapd[15552]: snap "core": snap has no updates available
Jun  1 07:58:47 localhost snapd[15552]: snap "snappy-debug": snap has no updates available
Jun  1 07:58:47 localhost snapd[15552]: snap "wallpaperdownloader": snap has no updates available
Jun  1 07:58:47 localhost snapd[15552]: snap "pubip": snap has no updates available
Jun  1 07:58:47 localhost snapd[15552]: snap "dwarf-fortress": snap has no updates available
Jun  1 07:58:47 localhost snapd[15552]: 2018/06/01 07:58:47.770673 autorefresh.go:338: auto-refresh: all snaps are up-to-date

Snapd 正在运行:

systemctl status snapd
● snapd.service - Snappy daemon
Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
Active: active (running) since Fri 2018-06-01 07:58:42 CDT; 53min ago
Main PID: 15552 (snapd)
CGroup: /system.slice/snapd.service
       └─15552 /usr/lib/snapd/snapd

Jun 01 07:58:47 localhost.localdomain snapd[15552]: 2018/06/01 07:58:47.766008 storehelpers.go:413: cannot refresh:
Jun 01 07:58:47 localhost.localdomain snapd[15552]: snap "nethack": snap has no updates available
Jun 01 07:58:47 localhost.localdomain snapd[15552]: snap "speed-test": snap has no updates available
Jun 01 07:58:47 localhost.localdomain snapd[15552]: snap "snapweb": snap has no updates available
Jun 01 07:58:47 localhost.localdomain snapd[15552]: snap "core": snap has no updates available
Jun 01 07:58:47 localhost.localdomain snapd[15552]: snap "snappy-debug": snap has no updates available
Jun 01 07:58:47 localhost.localdomain snapd[15552]: snap "wallpaperdownloader": snap has no updates available
Jun 01 07:58:47 localhost.localdomain snapd[15552]: snap "pubip": snap has no updates available
Jun 01 07:58:47 localhost.localdomain snapd[15552]: snap "dwarf-fortress": snap has no updates available
Jun 01 07:58:47 localhost.localdomain snapd[15552]: 2018/06/01 07:58:47.770673 autorefresh.go:338: auto-refresh: all snaps are up-to-date

问题是“snapd.seeded.service”到底做了什么,为什么会失败?它会影响 snap 的运行吗?

答案1

您可以使用此命令修复此问题:

$ sudo snap install hello-world

重新开始snapd.seeded.service

$ systemctl start snapd.seeded.service

验证是否snapd.seeded.service正在运行:

$ systemctl status snapd.seeded.service

AskUbuntu 上的这个问题可能会有帮助:snapd.seed.service 无法在升级时启动

相关内容