Snapd doesn't start on openSUSE Leap 15.1

I’ve just installed the snapd package according to the instructions here: https://snapcraft.io/docs/installing-snap-on-opensuse (using https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.1 as the repo, obviously). I cannot get snapd.service to start, even after a reboot. journalctl output follows. Thanks for any suggestions.

Oct 15 16:23:23 lonsdale systemd[1]: Starting Snappy daemon...
-- Subject: Unit snapd.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has begun starting up.
Oct 15 16:23:23 lonsdale snapd[8875]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus
Oct 15 16:23:23 lonsdale snapd[8875]: daemon.go:346: started snapd/2.41-lp151.2.1 (series 16; classic; devmode) opensuse-leap/15.1 (amd64) linux/4.12.14-lp151.28.20-defau.
Oct 15 16:23:24 lonsdale snapd[8875]: backend.go:115: snapd enabled NFS support, additional implicit network permissions granted
Oct 15 16:23:24 lonsdale snapd[8875]: cannot run daemon: state startup errors: [cannot reload snap-confine apparmor profile: cannot load apparmor profiles: exit status 2
Oct 15 16:23:24 lonsdale snapd[8875]: apparmor_parser output:
Oct 15 16:23:24 lonsdale snapd[8875]: File /etc/apparmor.d/usr.lib.snapd.snap-confine not found, skipping...
Oct 15 16:23:24 lonsdale snapd[8875]: ]
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 15 16:23:24 lonsdale systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has failed.
-- 
-- The result is failed.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Unit entered failed state.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Triggering OnFailure= dependencies.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 15 16:23:24 lonsdale systemd[1]: Stopped Snappy daemon.
-- Subject: Unit snapd.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has finished shutting down.
Oct 15 16:23:24 lonsdale systemd[1]: Starting Snappy daemon...
-- Subject: Unit snapd.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has begun starting up.
Oct 15 16:23:24 lonsdale snapd[8903]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus
Oct 15 16:23:24 lonsdale snapd[8903]: daemon.go:346: started snapd/2.41-lp151.2.1 (series 16; classic; devmode) opensuse-leap/15.1 (amd64) linux/4.12.14-lp151.28.20-defau.
Oct 15 16:23:24 lonsdale snapd[8903]: backend.go:115: snapd enabled NFS support, additional implicit network permissions granted
Oct 15 16:23:24 lonsdale snapd[8903]: cannot run daemon: state startup errors: [cannot reload snap-confine apparmor profile: cannot load apparmor profiles: exit status 2
Oct 15 16:23:24 lonsdale snapd[8903]: apparmor_parser output:
Oct 15 16:23:24 lonsdale snapd[8903]: File /etc/apparmor.d/usr.lib.snapd.snap-confine not found, skipping...
Oct 15 16:23:24 lonsdale snapd[8903]: ]
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 15 16:23:24 lonsdale systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has failed.
-- 
-- The result is failed.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Unit entered failed state.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Triggering OnFailure= dependencies.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 15 16:23:24 lonsdale systemd[1]: Stopped Snappy daemon.
-- Subject: Unit snapd.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has finished shutting down.
Oct 15 16:23:24 lonsdale systemd[1]: Starting Snappy daemon...
-- Subject: Unit snapd.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has begun starting up.
Oct 15 16:23:24 lonsdale snapd[8931]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus
Oct 15 16:23:24 lonsdale snapd[8931]: daemon.go:346: started snapd/2.41-lp151.2.1 (series 16; classic; devmode) opensuse-leap/15.1 (amd64) linux/4.12.14-lp151.28.20-defau.
Oct 15 16:23:24 lonsdale snapd[8931]: backend.go:115: snapd enabled NFS support, additional implicit network permissions granted
Oct 15 16:23:24 lonsdale snapd[8931]: cannot run daemon: state startup errors: [cannot reload snap-confine apparmor profile: cannot load apparmor profiles: exit status 2
Oct 15 16:23:24 lonsdale snapd[8931]: apparmor_parser output:
Oct 15 16:23:24 lonsdale snapd[8931]: File /etc/apparmor.d/usr.lib.snapd.snap-confine not found, skipping...
Oct 15 16:23:24 lonsdale snapd[8931]: ]
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 15 16:23:24 lonsdale systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has failed.
-- 
-- The result is failed.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Unit entered failed state.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Triggering OnFailure= dependencies.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 15 16:23:24 lonsdale systemd[1]: Stopped Snappy daemon.
-- Subject: Unit snapd.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has finished shutting down.
Oct 15 16:23:24 lonsdale systemd[1]: Starting Snappy daemon...
-- Subject: Unit snapd.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has begun starting up.
Oct 15 16:23:24 lonsdale snapd[8958]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus
Oct 15 16:23:24 lonsdale snapd[8958]: daemon.go:346: started snapd/2.41-lp151.2.1 (series 16; classic; devmode) opensuse-leap/15.1 (amd64) linux/4.12.14-lp151.28.20-defau.
Oct 15 16:23:24 lonsdale snapd[8958]: backend.go:115: snapd enabled NFS support, additional implicit network permissions granted
Oct 15 16:23:24 lonsdale snapd[8958]: cannot run daemon: state startup errors: [cannot reload snap-confine apparmor profile: cannot load apparmor profiles: exit status 2
Oct 15 16:23:24 lonsdale snapd[8958]: apparmor_parser output:
Oct 15 16:23:24 lonsdale snapd[8958]: File /etc/apparmor.d/usr.lib.snapd.snap-confine not found, skipping...
Oct 15 16:23:24 lonsdale snapd[8958]: ]
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 15 16:23:24 lonsdale systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has failed.
-- 
-- The result is failed.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Unit entered failed state.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Triggering OnFailure= dependencies.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 15 16:23:24 lonsdale systemd[1]: snapd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 15 16:23:24 lonsdale systemd[1]: Stopped Snappy daemon.
-- Subject: Unit snapd.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has finished shutting down.
Oct 15 16:23:24 lonsdale systemd[1]: Starting Snappy daemon...
-- Subject: Unit snapd.service has begun start-up
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has begun starting up.
Oct 15 16:23:24 lonsdale snapd[8986]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus
Oct 15 16:23:24 lonsdale snapd[8986]: daemon.go:346: started snapd/2.41-lp151.2.1 (series 16; classic; devmode) opensuse-leap/15.1 (amd64) linux/4.12.14-lp151.28.20-defau.
Oct 15 16:23:25 lonsdale snapd[8986]: backend.go:115: snapd enabled NFS support, additional implicit network permissions granted
Oct 15 16:23:25 lonsdale snapd[8986]: cannot run daemon: state startup errors: [cannot reload snap-confine apparmor profile: cannot load apparmor profiles: exit status 2
Oct 15 16:23:25 lonsdale snapd[8986]: apparmor_parser output:
Oct 15 16:23:25 lonsdale snapd[8986]: File /etc/apparmor.d/usr.lib.snapd.snap-confine not found, skipping...
Oct 15 16:23:25 lonsdale snapd[8986]: ]
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 15 16:23:25 lonsdale systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has failed.
-- 
-- The result is failed.
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Unit entered failed state.
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Triggering OnFailure= dependencies.
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Service RestartSec=100ms expired, scheduling restart.
Oct 15 16:23:25 lonsdale systemd[1]: Stopped Snappy daemon.
-- Subject: Unit snapd.service has finished shutting down
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has finished shutting down.
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Start request repeated too quickly.
Oct 15 16:23:25 lonsdale systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: https://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit snapd.service has failed.
-- 
-- The result is failed.
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Unit entered failed state.
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Triggering OnFailure= dependencies.
Oct 15 16:23:25 lonsdale systemd[1]: snapd.service: Failed with result 'exit-code'.
1 Like

@zyga-snapd something for your probably

1 Like

I won’t be able to get to it this week but I’ll try early next week.

Hi!
I have exactly the same problem. I’ve just installed the snapd package according to the instructions… on opensuse Leap 15.1. Did you find a solution?
Thanks,
vincent

Hi Vincent,

No, I’m afraid not. What I was trying to do wasn’t important enough for me to spend a lot of time on it (IIRC I found another way to run the application I was interested in), and @zyga-snapd’s reply suggested that it would be looked into soon anyway.

Sorry I can’t help more - I’m not a snapcraft expert, and I haven’t used it on any other platforms.
P.

Hi,

I had the same issue. I’m not familiar with snap or apparmor, but this is how I was able to get snapd to start.
I found a profile at https://zigford.org/aa-snap-confine.txt. I saved it at /etc/apparmor.d/usr.lib.snapd.snap-confine and ran sudo systemctl reload apparmor.service. I was then able to sudo systemctl enable --now snapd.
Let me know if you have any suggestions.

Thanks,
Eric

Please do not use random files from the internet as an apparmor profile. If something does not work in your system open a topic in the forum and try to collect relevant logs. At least the output of the following commands is needed:

  • snap version
  • SNAPD_DEBUG=1 SNAP_CONFINE_DEBUG=1 snap run <some-snap-that-fails>

Hi,

I couldn’t run snap version since snapd wouldn’t start.
I had the same error as @pkeller

File /etc/apparmor.d/usr.lib.snapd.snap-confine not found, skipping...

I’m not sure if I can collect any logs now that I have it working.

Thanks,
Eric

Please attach the output of journalctl -u snapd.service.

just FYI snap version does not depend on the snapd service running, it can still show some information even if the snapd service is down for future reference

Hi,

It is basically the same as the initial post.

Dec 02 11:39:59 morrfact18 systemd[1]: Starting Snap Daemon...
Dec 02 11:40:02 morrfact18 snapd[1164]: AppArmor status: apparmor is enabled but some kernel features are missing: dbus, network
Dec 02 11:40:02 morrfact18 snapd[1164]: daemon.go:343: started snapd/2.47.1-lp152.2.1 (series 16; classic; devmode) opensuse-leap/15.2 (amd64) linux/5.3.18-lp152.50-default.
Dec 02 11:40:02 morrfact18 snapd[1164]: daemon.go:436: adjusting startup timeout by 30s (pessimistic estimate of 30s plus 5s per snap)
Dec 02 11:40:02 morrfact18 snapd[1164]: backend.go:121: snapd enabled NFS support, additional implicit network permissions granted
Dec 02 11:40:02 morrfact18 snapd[1164]: cannot run daemon: state startup errors: [cannot reload snap-confine apparmor profile: cannot load apparmor profiles: exit status 2
Dec 02 11:40:02 morrfact18 snapd[1164]: apparmor_parser output:
Dec 02 11:40:02 morrfact18 snapd[1164]: File /etc/apparmor.d/usr.lib.snapd.snap-confine not found, skipping...
Dec 02 11:40:02 morrfact18 snapd[1164]: ]
Dec 02 11:40:02 morrfact18 systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Dec 02 11:40:02 morrfact18 systemd[1]: Failed to start Snap Daemon.
Dec 02 11:40:02 morrfact18 systemd[1]: snapd.service: Unit entered failed state.
Dec 02 11:40:02 morrfact18 systemd[1]: snapd.service: Triggering OnFailure= dependencies.
Dec 02 11:40:02 morrfact18 systemd[1]: snapd.service: Failed with result 'exit-code'.
Dec 02 11:40:03 morrfact18 systemd[1]: snapd.service: Service RestartSec=100ms expired, scheduling restart.
Dec 02 11:40:03 morrfact18 systemd[1]: Stopped Snap Daemon.

Thanks,
Eric

Thanks, this is useful. I looked at the logs and at the code and the state is confusing.

The package in Leap is built without AppArmor support, but it appears that having a home on NFS (or booting from livecd) will trigger a buggy code path that results in a failure you observed.

I need to think about it a little. Maybe we should enable AppArmor on leap, even if the support is limited. I’ll keep posting updates on related fix(-es) in this topic.

Another attempt at fixing this: https://github.com/snapcore/snapd/pull/9773

The situation is a bit weird, and relies on some AppAmor profile naming conventions (which seem to be followed by relevant distros anyway?).