1

Since upgrading to Ubuntu 17.10, I've been unable to connect to the snap daemon. So for instance, if I use it from the command line, and type: "sudo snap find hello", it'll fail telling me that I cannot connect to the service on localhost.

Upon trying to start the service, I get the following:

-- Unit snapd.service has begun starting up.
Jan 20 17:58:00 hostname snapd[7848]: AppArmor status: apparmor is enabled but some features are missing: dbus, network
Jan 20 17:58:00 hostname snapd[7848]: AppArmor status: apparmor is enabled but some features are missing: dbus, network
Jan 20 17:58:00 hostname snapd[7848]: error: invalid character 'e' looking for beginning of value
Jan 20 17:58:00 hostname systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Jan 20 17:58:00 hostname systemd[1]: Failed to start Snappy daemon.
-- Subject: Unit snapd.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
-- 
-- Unit snapd.service has failed.
-- 
-- The result is failed.
Jan 20 17:58:00 hostname systemd[1]: snapd.service: Unit entered failed state.
Jan 20 17:58:00 hostname systemd[1]: snapd.service: Failed with result 'exit-code'.
Jan 20 17:58:00 hostname systemd[1]: snapd.service: Service hold-off time over, scheduling restart.

I tried reinstalling snappy, which hasn't worked.

I've had to use a 4.15 rc8 kernel lately (for WiFi drivers), but I also tried using the 4.13-25 kernel thinking that it might be missing security features, but this didn't help either.

I'm having a hard time grasping what the "invalid character 'e' looking for beginning of value" means, as I think that is what will lead me to my solution.

As a side note, snappy apps are working, because I use the Rocket.chat snap and it's definitely been working, but I am uncertain whether it is updating or not.

  • If you're running a non-standard kernel, that will likely be the problem. You need to be running one of the kernels from the archive. – popey Jan 20 '18 at 17:13
  • I've also been trying with 4.13.0-25.29, which afaik is the latest 17.10 kernel from the archive. The 4.15 rc8 that I am using is from: http://kernel.ubuntu.com/~kernel-ppa/mainline/v4.15-rc8/ – Steve Williams Jan 20 '18 at 17:17
  • Did you get it from the archive though, not an upstream kernel from the kernel team ppa? – popey Jan 20 '18 at 18:03
  • Yeah, absolutely. It's exactly what you'd get if you did an "apt-get dist-upgrade". – Steve Williams Jan 20 '18 at 18:34
  • This is the "uname -a" from the 4.13 kernel:

    Linux hostname 4.13.0-25-generic #29-Ubuntu SMP Mon Jan 8 21:14:41 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

    Output of apt-list:

    steve@hostname:~$ sudo apt list --installed | grep linux-image*

    linux-image-4.13.0-25-generic/artful-updates,artful-security,now 4.13.0-25.29 amd64 [installed,automatic]

    linux-image-4.15.0-041500rc8-generic/now 4.15.0-041500rc8.201801142030 amd64 [installed,local]

    – Steve Williams Jan 20 '18 at 18:44

1 Answers1

4

I finally got to the bottom of the problem, thanks to a post on the snapcraft.io site.

My /var/lib/snapd/state.json was corrupted, so I took a backup of the file and restarted snapd with:

systemctl start snapd.service
sotirov
  • 3,169