Snap refresh failing on Dell Edge 3001

We are having problems refreshing multiple DELL Edge 3001 devices . The refresh fails on all of them with different error messages.

DEVICE 1

$ snap refresh
error: cannot perform the following tasks:
- Download snap "caracalla-kernel" (100) from channel "stable" (invalid credentials)
- Download snap "modem-manager" (200) from channel "stable" (invalid credentials)

$ snap version
snap    2.36.1
snapd   2.36.1
series  16
kernel  4.4.0-112-generic


$ snap list core caracalla caracalla-kernel
Name              Version          Rev   Tracking  Publisher   Notes
caracalla         16.04-1.35       49    stable    canonicalâś“  gadget
caracalla-kernel  4.4.0-112.135-3  74    stable    canonicalâś“  kernel
core              16-2.36.1        5897  stable    canonicalâś“  core

DEVICE 2

$ snap refresh
error: cannot refresh: cannot refresh snap-declaration for "bluez": Get
       https://api.snapcraft.io/api/v1/snaps/assertions/snap-declaration/16/JmzJi9kQvHUWddZ32PDJpBRXUpGRxvNS?max-format=3:
       http: error connecting to proxy %0A: dial tcp :0: getsockopt: connection refused

$ snap version
snap    2.36.1
snapd   2.36.1
series  16
kernel  4.4.0-135-generic

$ snap list core caracalla caracalla-kernel
Name              Version          Rev   Tracking  Publisher   Notes
caracalla         16.04-1.35       49    stable    canonicalâś“  gadget
caracalla-kernel  4.4.0-135.161-1  96    stable    canonicalâś“  kernel
core              16-2.36.1        5897  stable    canonicalâś“  core


DEVICE 3

$ snap refresh
error: cannot refresh: cannot refresh snap-declaration for "wpa-supplicant": Get
       https://api.snapcraft.io/api/v1/snaps/assertions/snap-declaration/16/e2hgfjRsvBzotgj7uszUv2ayQS3azzdc?max-format=2:
       dial tcp: lookup api.snapcraft.io on [::1]:53: read udp [::1]:41276->[::1]:53: read:
       connection refused

$ snap version
snap    2.35.5
snapd   2.35.5
series  16
kernel  4.4.0-122-generic

$ snap list core caracalla caracalla-kernel
Name              Version          Rev   Tracking  Publisher   Notes
caracalla         16.04-1.35       49    stable    canonicalâś“  gadget
caracalla-kernel  4.4.0-122.146-1  82    stable    canonicalâś“  kernel
core              16-2.35.5        5742  stable    canonicalâś“  core

Any hints on why this is happening or any workaround would be highly appreciated.
Note: The refresh on DELL EDge 5000 seems to be having no issues at all.

1 Like

Hi!

For device one (invalid credentials) - this message is apparently only shown if a user logged into the device’s snapd using snap login. If the account’s Ubuntu SSO password is changed, the authentication is rendered invalid and the message is shown as seen here.

You can check whether that’s the case by doing snap whoami. If it returns an e-mail, then you would have to snap logout, then snap login again with those credentials (use the new, changed password).

For devices two and three, it looks like networking/connectivity problems. Device two seems to have a misconfigured proxy. You can check the proxy configuration with:

snap get core proxy

Make sure both http and https proxies are properly set to what your network requires. I bet one of them is wrong; the error message suggests one of the proxy variables is set to “\n” (line feed).

For device 3, dial tcp: lookup api.snapcraft.io on [::1]:53: read udp [::1]:41276->[::1]:53: read: connection refused' is a failure to connect to the DNS service (udp port 53). There are several reasons why DNS would not be working, but I would still look at network configuration as a possible cause. Can you ping api.snapcraft.io from this device? That’s a good starting point to debug the issue.

  • Daniel

As @roadmr pointed out, the error message dial tcp: lookup api.snapcraft.io on [::1]:53: read udp [::1]:41276->[::1]:53: read: connection refused means that the DNS lookup of api.snapcraft.io failed because the DNS request was sent to a local DNS resolver, and there’s none running on Ubuntu Core 16 (whereas Ubuntu 16.04 Desktop runs dnsmasq as a local DNS cache), hence the “connection refused”. The only condition I’ve found that triggers this is when the device doesn’t have any nameservers configured. Can you please report the output of the following commands:

  • cat /etc/resolv.conf

  • nmcli d

If any of the devices are shown are connected, please then run:

  • nmcli c show <connection name> | grep "IP"

Ex. nmcli c show "Wired connection 2"

1 Like

Thanks for the hints, I do not have access to the devices for this week. I will update on the findings in the coming weeks.

Here is the requested info.

$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
$ nmcli d
DEVICE  TYPE      STATE      CONNECTION
eth0    ethernet  connected  eth0
lo      loopback  unmanaged  --
wlan0   wifi      unmanaged  --
$ nmcli c show eth0 | grep "IP"
IP4.ADDRESS[1]:                         192.168.128.123/24
IP4.GATEWAY:                            192.168.128.1
IP6.ADDRESS[1]:                         fe80::16b3:1fff:fe21:c2ed/64
IP6.GATEWAY:

I edited /etc/resolv.conf and added lines

nameserver 8.8.8.8
nameserver 8.8.4.4

snap refresh --list command now returns upgradable snaps. But snap refresh still failing 404 error message.

$ sudo snap refresh --list
Name              Version               Rev   Publisher   Notes
caracalla         16.04-1.38            52    canonicalâś“  gadget
caracalla-kernel  4.4.0-140.166         101   canonicalâś“  kernel
core              16-2.36.2             6034  canonicalâś“  core
modem-manager     1.8.0-6               210   canonicalâś“  -
network-manager   1.2.2-20              355   canonicalâś“  -
snappy-debug      0.32-snapd2.36.2+git  274   canonicalâś“  -
wifi-ap           21                    250   canonicalâś“  -
$ sudo snap refresh snappy-debug
error: cannot perform the following tasks:
- Download snap "snappy-debug" (274) from channel "stable" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/DVAzG29Avl1Cn5s1nLXGzyQ0vi9v87Jw_274.snap)

You are correct for this particular device proxy.http and proxy.https were set to blank string. How can I reset this back ?

$ snap get core proxy
Key         Value
proxy.http

proxy.https

I ran snap set core proxy.http= and snap set core proxy.https= to fix this.

For this device, this was the case. snap logout to fix this issue.

This problem keeps haunting us once in a while , We can download the snaps with snap download command but snap refresh fails with Unexpected http response (404). Any idea why this is happening and a possible work around for this issue ?

Snap version

$ snap version
snap    2.36.2
snapd   2.36.2
series  16
kernel  4.4.0-122-generic
$ sudo snap refresh
error: cannot perform the following tasks:
- Download snap "caracalla-kernel" (101) from channel "stable" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/TlJNTzTp0kFRfD3XFCoa4fDIVYDjwMXm_101.snap)
- Download snap "caracalla" (52) from channel "stable" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/ttZZbj4ZjaFakobHQghX8Z6C5SOTtK0j_52.snap)
- Download snap "wifi-ap" (250) from channel "stable" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/2rGgvyaY0CCzlWuKAPwFtCWrgwkM8lqS_250.snap)
- Download snap "snappy-debug" (274) from channel "stable" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/DVAzG29Avl1Cn5s1nLXGzyQ0vi9v87Jw_274.snap)
- Download snap "modem-manager" (210) from channel "" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/KtwxgRlwCAVKFw92BUdt1WloH1Va3QPo_210.snap)
- Download snap "network-manager" (355) from channel "" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/RmBXKl6HO6YOC2DE4G2q1JzWImC04EUy_355.snap)

Hello from SB dhoomakethu. :slight_smile:

This looks mighty similar to the resolver regression on ubuntu-core which is about test failures with the same DNS failure.

This workaround works for me: I found a suggestion on another forum which seems to partly solve the problem

So now if I run : sudo systemctl restart snapd.service And then snap refresh

The snap refresh works ok. However it is not a permanent fix as if I wanted to install a new snap I need to run sudo systemctl restart snapd.servcice again before each new install/update.

Again if I leave my unit overnight the automatic update seems to fix the issue.

Here are my results from a DELL-5000 fresh out of the box:

admin@localhost:~$ snap list
Name             Version          Rev   Developer  Notes
bluez            5.44-3           129   canonical  -
ccm-wda          3.01.13.40419    18    dell-inc   -
core             16-2.31.2        4206  canonical  core
modem-manager    1.6.12-1         120   canonical  -
network-manager  1.2.2-14         250   canonical  -
snapweb          0.26-11          319   canonical  -
stlouis          16.04-1.14       13    canonical  gadget
stlouis-kernel   4.4.0-116.140    38    canonical  kernel
tpm2             1.0-5            42    canonical  -
udisks2          2.6.4-2          100   canonical  -
uefi-fw-tools    1.5.2-0.7.2+git  10    canonical  -
wifi-ap          17               204   canonical  -
admin@localhost:~$ snap refresh
error: cannot refresh: cannot refresh snap-declaration for "stlouis": Get
       https://api.snapcraft.io/api/v1/snaps/assertions/snap-declaration/16/Vy4C9zwJOHQRpmGpUNxxwBqdI63Oj6lM?max-format=2:
       dial tcp: lookup api.snapcraft.io on [::1]:53: read udp
       [::1]:38943->[::1]:53: read: connection refused
admin@localhost:~$ sudo systemctl restart snapd
admin@localhost:~$ snap refresh
Setup snap "core" (6405) security profiles                                     O
Broadcast message from root@localhost.localdomain (Fri 2019-02-15 00:29:42 UTC):

reboot scheduled to update the system - temporarily cancel with 'sudo shutdown -c'
The system is going down for reboot at Fri 2019-02-15 00:39:41 UTC!

This is definitely a bug, not a network configuration error. Either in the resolver, snapd or the core image / install on the DELL-(35)000.

1 Like

I have the same issue, with the 404 error.
If i run “snap whoami” i get the following
email: -
(no email address)
If i run snap logout what credentials do I need to “snap login”

I have the same issue with a Dell Edge Gateway 3001.
If I run sudo snap refresh, all caracalla-* snaps fail to download:

error: cannot perform the following tasks:
- Download snap "caracalla-kernel" (102) from channel "stable" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/TlJNTzTp0kFRfD3XFCoa4fDIVYDjwMXm_102.snap)
- Download snap "caracalla" (52) from channel "stable" (received an unexpected http response code (404) when trying to download https://api.snapcraft.io/api/v1/snaps/download/ttZZbj4ZjaFakobHQghX8Z6C5SOTtK0j_52.snap)

What credentials must be used for snap login? If I use a “regular” Ubuntu One account, I can install and refresh standard snaps but all caracalla-* fails to update.

Any ideas? Is it a Dell problem? Is it a snapcraft.io problem?

Does anybody here knows how to share the Internet I receive from a SIM card, via Ethernet?

I’d like having access to Internet from other devices using my Dell Gateway as an access-point. I’ve tried with nmcli, but I couldn’t do it yet.