However if I leave the device powered up and connected to the internet over night it the automatic overnight update works and in the morning when I try snap refresh, I get the result "All snaps up to-date). Nothing else had changed on the device/network environment in the meantime.
So now if I run :
sudo systemctl restart snapd.servcice
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.
@jenny.murphy 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 when you see a system failing to refresh like this again?
cat /etc/resolv.conf
nmcli d
If any of the devices are shown are connected, please then run:
@awe Thanks for the reply. Unfortunately I don not have access to any “out-of-the-box” units this week. I will check it again next time and get back to you.
I had the exact same issue. Also in my case restarting snapd.service fixed it. I did not investigate it any further. This was with a Dell Edge Gateway 3000 device straight out of the box.
Networking and DNS was functional when the issue occurred, which was tested by pinging a public server using the DNS name.
One available solutions is that Set snap’s proxy with command : “sudo snap set system proxy .http=”<your_hostname>:<your_port>" and " sudo snap set system proxy.https="<your_hostname>:<your_port>"