webdm failed to start

Bug #1588453 reported by Manik Taneja
14
This bug affects 3 people
Affects Status Importance Assigned to Milestone
snapweb
Fix Released
Critical
Unassigned

Bug Description

hi,

on my xenial machine, i had webdm installed with snapd v2.0.2 and working-

manik@ubuntu:~⟫ snap list
Name Version Rev Developer
ubuntu-core 16.04+20160419.20-55 109 canonical
webdm 0.17 21 canonical

i updated the system and moved from snapd 2.0.2 to 2.0.5-

manik@ubuntu:~/source/canonical-livepatch⟫ apt-cache policy snapd
snapd:
  Installed: 2.0.5
  Candidate: 2.0.5
  Version table:
 *** 2.0.5 500
        500 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.2 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

manik@ubuntu:~⟫ dpkg -l snapd
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==================================-======================-======================-=========================================================================
ii snapd 2.0.5 amd64 Tool to interact with Ubuntu Core Snappy.

at this point, webdm stopped running. snap changes didn't list any errors, but localhost:4200 said "Failed to Connect" and netstat -ntlp did not show port 4200 as open-

manik@ubuntu:~/source/canonical-livepatch⟫ snap changes
3 Done 2016-05-27T16:18:38Z 2016-05-27T16:18:44Z Install "webdm" snap

on further review with zyga, found this-

manik@ubuntu:~⟫ ll /etc/systemd/system/snap*
-rw-r--r-- 1 root root 177 May 4 10:45 /etc/systemd/system/snap-ubuntu\x2dcore-109.mount
-rw-r--r-- 1 root root 157 May 27 09:18 /etc/systemd/system/snap-webdm-21.mount
-rw-r--r-- 1 root root 625 May 27 09:18 /etc/systemd/system/snap.webdm.snappyd.service

manik@ubuntu:~⟫ systemctl status snap.webdm.snappyd
● snap.webdm.snappyd.service - Service for snap application webdm.snappyd
   Loaded: loaded (/etc/systemd/system/snap.webdm.snappyd.service; enabled; vendor preset: enabled)
   Active: inactive (dead) (Result: exit-code) since Thu 2016-06-02 08:49:27 PDT; 50min ago
 Main PID: 3072 (code=exited, status=1/FAILURE)

Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Unit entered failed state.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Failed with result 'exit-code'.
Jun 02 08:49:27 ubuntu systemd[1]: snap.webdm.snappyd.service: Service hold-off time over, scheduling restart.
Jun 02 08:49:27 ubuntu systemd[1]: Stopped Service for snap application webdm.snappyd.
Jun 02 08:49:27 ubuntu systemd[1]: snap.webdm.snappyd.service: Start request repeated too quickly.
Jun 02 08:49:27 ubuntu systemd[1]: Failed to start Service for snap application webdm.snappyd.

manik@ubuntu:~⟫ journalctl -u snap.webdm.snappyd -n 1000
-- Logs begin at Thu 2016-06-02 08:49:23 PDT, end at Thu 2016-06-02 09:39:49 PDT. --
Jun 02 08:49:25 ubuntu systemd[1]: Started Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu ubuntu-core-launcher[2479]: 2016/06/02 08:49:26 Failed to listen 224.0.0.251:5353: listen udp4 0.0.0.0:5353->224.0.0.251: setsockopt: no s
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Main process exited, code=exited, status=1/FAILURE
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Unit entered failed state.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Failed with result 'exit-code'.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Service hold-off time over, scheduling restart.
Jun 02 08:49:26 ubuntu systemd[1]: Stopped Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu systemd[1]: Started Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu ubuntu-core-launcher[2829]: 2016/06/02 08:49:26 Failed to listen 224.0.0.251:5353: listen udp4 0.0.0.0:5353->224.0.0.251: setsockopt: no s
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Main process exited, code=exited, status=1/FAILURE
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Unit entered failed state.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Failed with result 'exit-code'.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Service hold-off time over, scheduling restart.
Jun 02 08:49:26 ubuntu systemd[1]: Stopped Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu systemd[1]: Started Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu ubuntu-core-launcher[2913]: 2016/06/02 08:49:26 Failed to listen 224.0.0.251:5353: listen udp4 0.0.0.0:5353->224.0.0.251: setsockopt: no s
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Main process exited, code=exited, status=1/FAILURE
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Unit entered failed state.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Failed with result 'exit-code'.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Service hold-off time over, scheduling restart.
Jun 02 08:49:26 ubuntu systemd[1]: Stopped Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu systemd[1]: Started Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu ubuntu-core-launcher[3055]: 2016/06/02 08:49:26 Failed to listen 224.0.0.251:5353: listen udp4 0.0.0.0:5353->224.0.0.251: setsockopt: no s
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Main process exited, code=exited, status=1/FAILURE
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Unit entered failed state.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Failed with result 'exit-code'.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Service hold-off time over, scheduling restart.
Jun 02 08:49:26 ubuntu systemd[1]: Stopped Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu systemd[1]: Started Service for snap application webdm.snappyd.
Jun 02 08:49:26 ubuntu ubuntu-core-launcher[3072]: 2016/06/02 08:49:26 Failed to listen 224.0.0.251:5353: listen udp4 0.0.0.0:5353->224.0.0.251: setsockopt: no s
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Main process exited, code=exited, status=1/FAILURE
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Unit entered failed state.
Jun 02 08:49:26 ubuntu systemd[1]: snap.webdm.snappyd.service: Failed with result 'exit-code'.
Jun 02 08:49:27 ubuntu systemd[1]: snap.webdm.snappyd.service: Service hold-off time over, scheduling restart.
Jun 02 08:49:27 ubuntu systemd[1]: Stopped Service for snap application webdm.snappyd.
Jun 02 08:49:27 ubuntu systemd[1]: snap.webdm.snappyd.service: Start request repeated too quickly.
Jun 02 08:49:27 ubuntu systemd[1]: Failed to start Service for snap application webdm.snappyd.

please let me know if there's any other information you need.

/manik

Changed in webdm:
status: New → Confirmed
importance: Undecided → Critical
Revision history for this message
Steven Wilkin (stevenwilkin) wrote :

I believe this is caused by systemd starting WebDM before the network is available.

When the snappyd daemon starts it broadcasts it's network address using Avahi/mDNS and as Chipaca discovered a while back, the Go implementation of mDNS crashes when the network is not there. I thought a workaround had been discovered at the time though?

Revision history for this message
John Lenton (chipaca) wrote :

Manik, if you remove webdm entirely and then install it again, does the problem persist?

Revision history for this message
Manik Taneja (manik) wrote :

steve,
thanks for the analysis.

john,
no, webdm functioned properly after removal and re-installation.

/manik

Revision history for this message
Robert Liu (robertliu) wrote :

Hi,
I tried to install webdm on ubuntu core 16 and specified to use devmode. After installed, the webdm functioned properly. But after I rebooted, the webdm showed the same errors liked Manik reported.
I made a quick test and found that if the network interface does not have an valid connection or IP address, MDNS module (used by webdm) will not bind the 5353 port correctly and cause webdm failed to start.
To solve the issue, currently, I configure the network interface to use a static IP address and adjust starting webdm after the network connection is established.

Revision history for this message
Jamie Bennett (jamiebennett) wrote :

Is this still valid with an up-to-date snapd and snapweb?

Changed in snapweb:
status: Confirmed → Incomplete
Revision history for this message
Manik Taneja (manik) wrote :

No, I have not experienced it since.

Changed in snapweb:
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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