Snap cannot communicate with server

I have flashed ubuntu core on the nitrogen6x running a i.mx6 processor. The image was provided by BoundaryDevices

After setting the profiles on ubuntu core somehow snap fails to connect to the server.

$ snap refresh snapd
error: cannot communicate with server: Post http://localhost/v2/snaps/snapd: EOF

This is strange as the device is connected to the internet and I can ping google.com

Any suggestions to solve the problem would be great

1 Like

The url ā€œhttp://localhostā€ā€¦ refers to the locally running snapd daemon, not to anything on the internet.

Can you confirm that snapd is running?

snapd seems to be running when I run the systemctl status stapd

$ systemctl status snapd
ā— snapd.service - Snappy daemon
   Loaded: loaded (/lib/systemd/system/snapd.service; enabled; vendor preset: enabled)
   Active: active (running) since Tue 2018-03-27 15:18:05 UTC; 6min ago
 Main PID: 1901 (snapd)
   CGroup: /system.slice/snapd.service
           ā””ā”€1901 /usr/lib/snapd/snapd

Could you share the output of snap version and snap list?

Thank you for the swift reply, the outputs are as below

$ snap version
snap    2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1
snapd   2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1
series  16
kernel  4.1.15-boundary-snappy

$ snap list
Name             Version   Rev   Developer  Notes
core             16-2      1617  canonical  -
nitrogen-gadget  16.04-1   x1               -
nitrogen-kernel  4.1.15-1  x1               -
snapweb          0.26.9    265   canonical  -

It takes quite some time after it outputs from snap version and snap list

I have no idea whatā€™s going on there. First off, that image is very old: nearly a year old, in fact. The core snap you have is similarly ancient.

The kernel and gadget you have are sideloaded, not from the store, so theyā€™ll never refresh. The core snap is from the store, published almost exactly a year ago (2017-04-03T04:26z).

There is no reason snap list nor snap version should delay in any way after printing their thing.

There also is no sane reason for snap refresh snapd to print ā€œEOFā€. It should print some variation of ā€˜not foundā€™.

Iā€™d really like to help you figure this one out (so much, that Iā€™m supposed to be on vacation right now, but here I am).

Do this:

  1. add SNAPD_DEBUG=1 to /etc/environment (for example, echo SNAPD_DEBUG=1 | sudo tee -a /etc/environment, or just use vi ā€” nano might also be installed).
  2. restart snapd: sudo systemctl restart snapd
  3. watch the snapd log: sudo journalctl -f -u snapd
  4. in another terminal do snap version, and pastebin what you see in journalctl.
  5. try sudo snap refresh core and report back.

Thank you.

1 Like

Thank you for your help!
I appreciate you giving a hand out even on your vacation.

I am having a hard time wrapping my head aroung this

$ sudo journalctl -f -u snapd
-- Logs begin at Tue 2018-03-27 14:32:20 UTC. --
Mar 27 17:32:46 localhost.localdomain systemd[1]: Stopped Snappy daemon.
Mar 27 17:32:46 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Mar 27 17:32:46 localhost.localdomain systemd[1]: snapd.service: Failed with result 'signal'.
Mar 27 17:32:46 localhost.localdomain systemd[1]: Started Snappy daemon.
Mar 27 17:32:46 localhost.localdomain /usr/lib/snapd/snapd[2707]: snapmgr.go:306: DEBUG: snapmgr refresh randomness 3h59m2.770559101s
Mar 27 17:32:46 localhost.localdomain /usr/lib/snapd/snapd[2707]: daemon.go:250: DEBUG: init done in 4.343383ms
Mar 27 17:32:46 localhost.localdomain /usr/lib/snapd/snapd[2707]: daemon.go:251: started snapd/2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1 (series 16; devmode) ubuntu-core/16 (armhf) linux/4.1.15-boundary-snappy.
Mar 27 17:32:46 localhost.localdomain snapd[2707]: 2018/03/27 17:32:46.616559 daemon.go:251: started snapd/2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1 (series 16; devmode) ubuntu-core/16 (armhf) linux/4.1.15-boundary-snappy.
Mar 27 17:32:46 localhost.localdomain /usr/lib/snapd/snapd[2707]: taskrunner.go:367: DEBUG: Running task 41 on Doing: Run configure hook of "snapweb" snap if present
Mar 27 17:32:46 localhost.localdomain /usr/lib/snapd/snapd[2707]: taskrunner.go:367: DEBUG: Running task 45 on Doing: Request device serial
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime: memory allocated by OS (0x1849d000) not in usable range [0x34b10000,0xb4b10000)
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime: out of memory: cannot allocate 207028224-byte block (571342848 in use)
Mar 27 17:36:38 localhost.localdomain snapd[2707]: fatal error: out of memory
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime stack:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.throw(0x55531bf0, 0xd)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/panic.go:547 +0x80
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.largeAlloc(0xc56a000, 0x0, 0x1)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/malloc.go:768 +0xe8
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.mallocgc.func3()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/malloc.go:664 +0x34
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.systemstack(0x34b22a00)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/asm_arm.s:247 +0x8c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.mstart()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/proc.go:1051
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 3 [running]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.systemstack_switch()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/asm_arm.s:192 +0x4 fp=0x34b3bb58 sp=0x34b3bb54
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.mallocgc(0xc56a000, 0x554e2bb8, 0x0, 0x4)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/malloc.go:665 +0xb04 fp=0x34b3bbc8 sp=0x34b3bb58
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.newarray(0x554e2bb8, 0x315a800, 0x34c8dbc0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/malloc.go:798 +0xec fp=0x34b3bbe8 sp=0x34b3bbc8
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.growslice(0x553d37f0, 0x62180000, 0x277b800, 0x277b800, 0x277b801, 0x0, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/slice.go:100 +0x2c4 fp=0x34b3bc20 sp=0x34b3bbe8
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/state.(*Change).abortTasks(0x34c5e8a0, 0x62180000, 0x277b800, 0x277b800, 0x34b3be74)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/state/change.go:574 +0x304 fp=0x34b3bcb4 sp=0x34b3bc20
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/state.(*Change).abortLanes(0x34c5e8a0, 0x34d40090, 0x1, 0x1, 0x34b3be74)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/state/change.go:547 +0x718 fp=0x34b3be24 sp=0x34b3bcb4
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/state.(*Change).AbortLanes(0x34c5e8a0, 0x34d40090, 0x1, 0x1)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/state/change.go:496 +0xac fp=0x34b3be90 sp=0x34b3be24
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/state.(*TaskRunner).abortLanes(0x34c77590, 0x34c5e8a0, 0x34d40090, 0x1, 0x1)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/state/taskrunner.go:252 +0x34 fp=0x34b3beec sp=0x34b3be90
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/state.(*TaskRunner).run.func1(0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/state/taskrunner.go:208 +0x614 fp=0x34b3bfb4 sp=0x34b3beec
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).run(0x34b1c090, 0x34d140e0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:163 +0x1c fp=0x34b3bfcc sp=0x34b3bfb4
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.goexit()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/asm_arm.s:990 +0x4 fp=0x34b3bfcc sp=0x34b3bfcc
Mar 27 17:36:38 localhost.localdomain snapd[2707]: created by github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).Go
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:159 +0x134
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 1 [select, 3 minutes]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: main.run(0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/cmd/snapd/main.go:69 +0x408
Mar 27 17:36:38 localhost.localdomain snapd[2707]: main.main()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/cmd/snapd/main.go:47 +0x18
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 17 [syscall, 3 minutes, locked to thread]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.goexit()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/asm_arm.s:990 +0x4
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 20 [syscall, 3 minutes]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: os/signal.signal_recv(0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/sigqueue.go:116 +0x1a8
Mar 27 17:36:38 localhost.localdomain snapd[2707]: os/signal.loop()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/os/signal/signal_unix.go:22 +0x14
Mar 27 17:36:38 localhost.localdomain snapd[2707]: created by os/signal.init.1
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/os/signal/signal_unix.go:28 +0x34
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 22 [select, 3 minutes]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord.(*Overlord).Loop.func1(0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/overlord.go:234 +0x1d0
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).run(0x34c76330, 0x34ce6420)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:163 +0x1c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: created by github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).Go
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:159 +0x134
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 23 [IO wait, 3 minutes]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.runtime_pollWait(0x75535238, 0x72, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/netpoll.go:160 +0x60
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*pollDesc).Wait(0x34cb5278, 0x72, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/fd_poll_runtime.go:73 +0x34
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*pollDesc).WaitRead(0x34cb5278, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/fd_poll_runtime.go:78 +0x30
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*netFD).accept(0x34cb5240, 0x0, 0x73b10030, 0x354ce060)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/fd_unix.go:426 +0x228
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*UnixListener).AcceptUnix(0x34cc2ce0, 0x34d38000, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/unixsock_posix.go:305 +0x4c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*UnixListener).Accept(0x34cc2ce0, 0x0, 0x0, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/unixsock_posix.go:315 +0x3c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/daemon.(*ucrednetListener).Accept(0x34c63f78, 0x0, 0x0, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/daemon/ucrednet.go:72 +0x54
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net/http.(*Server).Serve(0x34d36000, 0x75535b10, 0x34c63f78, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/http/server.go:2117 +0x100
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net/http.Serve(0x75535b10, 0x34c63f78, 0x73b10018, 0x34d34000, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/http/server.go:1976 +0x88
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/daemon.(*Daemon).Start.func2(0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/daemon/daemon.go:303 +0x144
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).run(0x34ca460c, 0x34ce6428)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:163 +0x1c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: created by github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).Go
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:159 +0x134
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 24 [select, 3 minutes, locked to thread]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.gopark(0x555c86f0, 0x34b2978c, 0x554f32d0, 0x6, 0x18, 0x2)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/proc.go:262 +0x15c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.selectgoImpl(0x34b2978c, 0x0, 0xc)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/select.go:392 +0x1288
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.selectgo(0x34b2978c)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/select.go:215 +0x10
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.ensureSigM.func1()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/signal1_unix.go:279 +0x448
Mar 27 17:36:38 localhost.localdomain snapd[2707]: runtime.goexit()
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/asm_arm.s:990 +0x4
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 34 [IO wait, 3 minutes]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.runtime_pollWait(0x755351c0, 0x72, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/netpoll.go:160 +0x60
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*pollDesc).Wait(0x34cb52b8, 0x72, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/fd_poll_runtime.go:73 +0x34
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*pollDesc).WaitRead(0x34cb52b8, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/fd_poll_runtime.go:78 +0x30
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*netFD).accept(0x34cb5280, 0x0, 0x73b10030, 0x34d40030)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/fd_unix.go:426 +0x228
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*UnixListener).AcceptUnix(0x34cc2d10, 0x34d42038, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/unixsock_posix.go:305 +0x4c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net.(*UnixListener).Accept(0x34cc2d10, 0x0, 0x0, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/unixsock_posix.go:315 +0x3c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net/http.(*Server).Serve(0x34d42000, 0x75535af0, 0x34cc2d10, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/http/server.go:2117 +0x100
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net/http.Serve(0x75535af0, 0x34cc2d10, 0x73b10018, 0x34d40000, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/http/server.go:1976 +0x88
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/daemon.(*Daemon).Start.func2.1(0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/daemon/daemon.go:295 +0xc8
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).run(0x34ca460c, 0x34d24000)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:163 +0x1c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: created by github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).Go
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:159 +0x134
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 4 [semacquire, 3 minutes]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: sync.runtime_Semacquire(0x34c74684)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/sema.go:47 +0x24
Mar 27 17:36:38 localhost.localdomain snapd[2707]: sync.(*Mutex).Lock(0x34c74680)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/sync/mutex.go:83 +0x204
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/state.(*State).Lock(0x34c74680)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/state/state.go:125 +0x28
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/devicestate.prepareSerialRequest(0x34b91ea0, 0x75535c98, 0x34cf40e0, 0x34df0600, 0x34e97500, 0x34df05d0, 0x34dda800, 0x6af, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/devicestate/handlers.go:200 +0xb9c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/devicestate.getSerial(0x34b91ea0, 0x75535c98, 0x34cf40e0, 0x34df0600, 0x34df05d0, 0x0, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/devicestate/handlers.go:273 +0x4a8
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/devicestate.(*DeviceManager).doRequestSerial(0x34cc4810, 0x34b91ea0, 0x34da1bc0, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/devicestate/handlers.go:435 +0x6b0
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/devicestate.(*DeviceManager).(github.com/snapcore/snapd/overlord/devicestate.doRequestSerial)-fm(0x34b91ea0, 0x34da1bc0, 0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/devicestate/devicemgr.go:68 +0x3c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/state.(*TaskRunner).run.func1(0x0, 0x0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/state/taskrunner.go:146 +0x60
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).run(0x34da1bc0, 0x34d15ca0)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:163 +0x1c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: created by github.com/snapcore/snapd/vendor/gopkg.in/tomb%2ev2.(*Tomb).Go
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/gopkg.in/tomb.v2/tomb.go:159 +0x134
Mar 27 17:36:38 localhost.localdomain snapd[2707]: goroutine 30 [semacquire, 3 minutes]:
Mar 27 17:36:38 localhost.localdomain snapd[2707]: sync.runtime_Semacquire(0x34c74684)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/runtime/sema.go:47 +0x24
Mar 27 17:36:38 localhost.localdomain snapd[2707]: sync.(*Mutex).Lock(0x34c74680)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/sync/mutex.go:83 +0x204
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/overlord/state.(*State).Lock(0x34c74680)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/overlord/state/state.go:125 +0x28
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/daemon.(*Command).ServeHTTP(0x55792350, 0x75539350, 0x354ce0d0, 0x34e88000)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/daemon/daemon.go:119 +0x3c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/vendor/github.com/gorilla/mux.(*Router).ServeHTTP(0x34cc48d0, 0x75539350, 0x354ce0d0, 0x34e88000)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/vendor/github.com/gorilla/mux/mux.go:100 +0x28c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: github.com/snapcore/snapd/daemon.logit.func1(0x75539330, 0x34e80200, 0x34e88000)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /build/snapd-lqCVM9/snapd-2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1/_build/src/github.com/snapcore/snapd/daemon/daemon.go:172 +0x11c
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net/http.HandlerFunc.ServeHTTP(0x34d34000, 0x75539330, 0x34e80200, 0x34e88000)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/http/server.go:1618 +0x34
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net/http.serverHandler.ServeHTTP(0x34d36000, 0x75539330, 0x34e80200, 0x34e88000)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/http/server.go:2081 +0x1b8
Mar 27 17:36:38 localhost.localdomain snapd[2707]: net/http.(*conn).serve(0x34cfe040)
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/http/server.go:1472 +0xfe0
Mar 27 17:36:38 localhost.localdomain snapd[2707]: created by net/http.(*Server).Serve
Mar 27 17:36:38 localhost.localdomain snapd[2707]:         /usr/lib/go-1.6/src/net/http/server.go:2137 +0x3d8
Mar 27 17:36:38 localhost.localdomain systemd[1]: snapd.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Mar 27 17:36:38 localhost.localdomain systemd[1]: snapd.service: Unit entered failed state.
Mar 27 17:36:38 localhost.localdomain systemd[1]: snapd.service: Failed with result 'exit-code'.
Mar 27 17:36:38 localhost.localdomain systemd[1]: snapd.service: Service hold-off time over, scheduling restart.
Mar 27 17:36:38 localhost.localdomain systemd[1]: Stopped Snappy daemon.
Mar 27 17:36:38 localhost.localdomain systemd[1]: Started Snappy daemon.
Mar 27 17:36:38 localhost.localdomain /usr/lib/snapd/snapd[2739]: snapmgr.go:306: DEBUG: snapmgr refresh randomness 3h0m6.87244623s
Mar 27 17:36:38 localhost.localdomain /usr/lib/snapd/snapd[2739]: daemon.go:250: DEBUG: init done in 4.319388ms
Mar 27 17:36:38 localhost.localdomain /usr/lib/snapd/snapd[2739]: daemon.go:251: started snapd/2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1 (series 16; devmode) ubuntu-core/16 (armhf) linux/4.1.15-boundary-snappy.
Mar 27 17:36:38 localhost.localdomain snapd[2739]: 2018/03/27 17:36:38.695492 daemon.go:251: started snapd/2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1 (series 16; devmode) ubuntu-core/16 (armhf) linux/4.1.15-boundary-snappy.
Mar 27 17:36:38 localhost.localdomain /usr/lib/snapd/snapd[2739]: taskrunner.go:367: DEBUG: Running task 41 on Doing: Run configure hook of "snapweb" snap if present
Mar 27 17:36:38 localhost.localdomain /usr/lib/snapd/snapd[2739]: taskrunner.go:367: DEBUG: Running task 45 on Doing: Request device serial

results from snap version

$ snap version
snap    2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1
snapd   unavailable
series  -

and results from refreshing the core

$ sudo snap refresh core
error: cannot communicate with server: Post http://localhost/v2/snaps/core: EOF
jaeyounglim@localhost:~$ snap version
snap    2.23.6+201703311204.git.a5aadfa~ubuntu16.04.1
snapd   unavailable
series  -

Are there comaptibility issues with the snap itself?

Thanks,

1 Like

no, it looks like itā€™s running out of memory when trying to set up the device. This is probably a bad gadget snap on the image you downloaded (although the people on the download page that say the EOF went away when changing SD card makes me wonder if it isnā€™t all on snapdā€™s side), compounded by less-than-helpful behaviour in the face of this from snapd (I believe the latter has been fixed).

If anybody could reach out to the people that created the image and ask them to re-generate it with a newer core snap (so at least the error messages are more helpful before it runs out of memory, or perhaps even it doesnā€™t run out of memory at all, depending), that would be very helpful. Failing that, the image you download seems to have most of the bits you need to create an image yourself, so maybe we need to explore that path.

HTH,

While I donā€™t have any solution, The following lines from your log are showing that snapd is being killed due to memory shortageā€¦

@jalim any news on this? (Iā€™m back from my vacation :slight_smile: )

@chipaca I have sent the system logs to the manufacturere and waiting for a response.

I will give you a follow up as soon as I get a reply.

Thank you for the help.

hola a mi se me soluciono ese problema con esto comandos:

systemctl enable snapd.service

systemctl start snapd.service

espero que te sirva

5 Likes

if anything does not work after all of above steps then just restart snap service using the following command

systemctl restart snapd

2 Likes

I think there was a bug. I fixed it by installing a newer version of snapd.

$ sudo dpkg -i https://launchpad.net/ubuntu/+archive/primary/+files/snapd_2.37.1_amd64.deb
$ sudo apt-get install -f

$snap version
worked correctly after this.

I got the release info from https://launchpad.net/ubuntu/+source/snapd
I am running Ubuntu 16.04 LTS.

Hi;

Just for the record, I had a similar problem and it turned out to be lack of space for the root directory:

$ df -kh
Filesystem      Size  Used Avail Use% Mounted on
udev            1.9G     0  1.9G   0% /dev
tmpfs           378M  8.9M  369M   3% /run
/dev/mmcblk0p3  350M  343M     0 100% /writable
/dev/loop0       92M   92M     0 100% /
/dev/loop1      155M  155M     0 100% /lib/modules
tmpfs           1.9G  4.0K  1.9G   1% /etc/fstab
tmpfs           1.9G     0  1.9G   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           1.9G     0  1.9G   0% /sys/fs/cgroup
tmpfs           1.9G     0  1.9G   0% /media
tmpfs           1.9G     0  1.9G   0% /tmp
tmpfs           1.9G     0  1.9G   0% /mnt
tmpfs           1.9G     0  1.9G   0% /var/lib/sudo
/dev/loop2       92M   92M     0 100% /snap/core/6531
/dev/mmcblk0p2   50M  2.3M   47M   5% /boot/efi
cgmfs           100K     0  100K   0% /run/cgmanager/fs
tmpfs           378M     0  378M   0% /run/user/1000

Donā€™t forget to extend the partition to use all the space on the sd-card/hard-drive.

Bests,
Vahid

11 posts were split to a new topic: Snapd errors when init isnā€™t systemd

A post was merged into an existing topic: Snapd errors when init isnā€™t systemd

A post was split to a new topic: EOF from api.snapcraft.io

I had the exact same error on Ubuntu Core.
I fixed it by flashing the SD card again with sudo dd if=myimage.img of=/dev/mydisk as said in the documentation, but without bs=32M.
I donā€™t know if removing the bs=32M part is useful or if Iā€™m just lucky, but after several installations I think this one is good.

the blocksize option just tells dd to cache 32MB in RAM before flushing it to disk, it does not have any effect on the actual written data (indeed, if you had less than 32MB of RAM that would have some impact, beyond this it is only speeding up the write process, nothing more ā€¦ )