snapd fail on boot

Bug #1632363 reported by Morten Frisch
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

`lsb_release -rd`
Description: Ubuntu 16.04 LTS
Release: 16.04

Running the BBB version of snappy ubuntu core.

unable to attain package version.

any snap command is met by

"error: cannot list snaps: cannot communicate with server: Get http://localhost/v2/snaps?sources=local: dial unix /run/snapd.socket: connect: connection refused"

with a few variation in the URL

`systemctl list-units` shows that
snapd.boot-ok.service
snapd. service
snapd.socket
has failed to load.

Tags: ubuntu-core
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Are there messages in the journal too?

Revision history for this message
Oliver Grawert (ogra) wrote :

where exactly did you get this image from and when ?
note that the bbb images are still rather experimental, there were issues in early ones where the clock was set wrong which causes snapd to be unhappy, but this was fixed in a later iteration.

Revision history for this message
Morten Frisch (fmfrisch) wrote :

The image was working fine, and although the sheer amount of experimentation and reinstalls makes my memory foggy, I do believe this particular install had gone through a ubuntu-core update without any issues. What caused the issue in the first place is a real networking issue. I had placed the install within a DMZ that was wrongly configured, so the clients of the subnet was unable to get a lease on an IP-address. It was left on this subnet for quite some time and over several boots. It now has internet access again, but the snap daemon fails continuously. For what reason I'm unsure. I've seen different reports of snap daemon failing because it starts before networking in the boot process, maybe I'm suffering the same problem. This bug then, would have surfaced due to a longer period of no network access for unknown reasons.

@Michael
I'm unfamiliar with journalctl and have yet to manage to get any form of relevant info from a query. Maybe you could help me with some suggestions as to what to search for in the journal?

@Oliver
The image is from https://people.canonical.com/~mvo/all-snaps/obsolete/, it was downloaded on the 19th of September.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in snapd (Ubuntu):
status: New → Confirmed
Revision history for this message
Morten Frisch (fmfrisch) wrote :
Download full text (3.8 KiB)

`journalctl -u snapd.service`
-- Logs begin at Thu 2016-10-27 13:49:19 UTC, end at Thu 2016-10-27 14:00:54 UTC. --
Oct 27 14:00:45 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:47 localhost.localdomain snapd[1823]: error: internal error: could not unmarshal state entr
Oct 27 14:00:47 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, statu
Oct 27 14:00:47 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:47 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:48 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:48 localhost.localdomain snapd[1833]: error: internal error: could not unmarshal state entr
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, statu
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:48 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:48 localhost.localdomain snapd[1840]: error: internal error: could not unmarshal state entr
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, statu
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:49 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:49 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:49 localhost.localdomain snapd[1848]: error: internal error: could not unmarshal state entr
Oct 27 14:00:49 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, statu
Oct 27 14:00:49 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:49 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:49 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:50 localhost.localdomain snapd[1855]: error: internal error: could not unmarshal state entr
Oct 27 14:00:50 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, statu
Oct 27 14:00:50 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:50 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:50 localhost.localdomain systemd[1]: snapd.service: Start request repeated too quickly.
Oct 27 14:00:50 localhost.localdomain systemd[1]: Failed to start Snappy daemon.

`journalctl -u snapd.boot-ok.service`
-- Logs begin at Thu 2016-10-27 13:49:19 UTC, end at Thu 2016-10-27 14:00:54 UTC. --
Oct 27 14:00:53 localhost.localdomain systemd[1]: Starting Notify bootloader that boot was successful...
Oct 27 14:00:54 localhost.localdomain snap[1874]: error: can not SyncBoot, failed to make ubuntu-core active: snap not active
Oct 27 14:00:54 localhost.localdomain systemd[1]: snapd.boot-ok.service: Main process exited, code=exited, status=1/FAILURE
Oct 27 14:00:54 localhost.localdomain systemd[1]: Failed to star...

Read more...

Revision history for this message
Morten Frisch (fmfrisch) wrote :

-- Logs begin at Thu 2016-10-27 13:49:19 UTC, end at Thu 2016-10-27 14:13:13 UTC. --
Oct 27 14:00:45 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:47 localhost.localdomain snapd[1823]: error: internal error: could not unmarshal state entry "snaps": json: cannot unmarshal string into Go value of type int
Oct 27 14:00:47 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 27 14:00:47 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:47 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:48 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:48 localhost.localdomain snapd[1833]: error: internal error: could not unmarshal state entry "snaps": json: cannot unmarshal string into Go value of type int
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:48 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:48 localhost.localdomain snapd[1840]: error: internal error: could not unmarshal state entry "snaps": json: cannot unmarshal string into Go value of type int
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 27 14:00:48 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:49 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:49 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:49 localhost.localdomain snapd[1848]: error: internal error: could not unmarshal state entry "snaps": json: cannot unmarshal string into Go value of type int
Oct 27 14:00:49 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 27 14:00:49 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:49 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:49 localhost.localdomain systemd[1]: Started Snappy daemon.
Oct 27 14:00:50 localhost.localdomain snapd[1855]: error: internal error: could not unmarshal state entry "snaps": json: cannot unmarshal string into Go value of type int
Oct 27 14:00:50 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, status=1/FAILURE
Oct 27 14:00:50 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Oct 27 14:00:50 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Oct 27 14:00:50 localhost.localdomain systemd[1]: snapd.service: Start request repeated too quickly.
Oct 27 14:00:50 localhost.localdomain systemd[1]: Failed to start Snappy daemon.

Revision history for this message
Michael Vogt (mvo) wrote :

Here is the error:

Oct 27 14:00:50 localhost.localdomain snapd[1855]: error: internal error: could not unmarshal state entry "snaps": json: cannot unmarshal string into Go value of type int

It would be great if you could upload your /var/lib/snapd/state.json so that we can inspect it. If you do that and you have used "snap login" before, please make the bug private as the state.json file contains a "macaroon" security token.

Michael Vogt (mvo)
Changed in snapd (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapd (Ubuntu) because there has been no activity for 60 days.]

Changed in snapd (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.