Why these days "snap refresh" command need to run couple of times in order to sucessfully get expected result?

As u can see in the screenshot below:

What does this happen?
Is this connection issue that is happening to snap only?
Is there something I can do?

Distro: Ubuntu 20.04

Looks like a local network issue. The “no such host” suggests dns or other network connectivity problem.

1 Like

Can you please check if your connection is working as expected by testing these two commands:

dig api.snapcraft.io
→ Look for an ANSWER section there.

ping api.snapcraft.io
Should result in something like:

PING api.snapcraft.io ( 56(84) bytes of data.
64 bytes from api.snapcraft.io ( icmp_seq=1 ttl=52 time=28.5 ms
64 bytes from api.snapcraft.io ( icmp_seq=2 ttl=52 time=30.5 ms

@tobias Is there anything wrong?

(Meanwhile, I updated my distro to Ubuntu 20.10.)

@Pranav Looks fine to me. To be sure: Do you still get the error on snap refresh?

I think my distro network/DHCP setting is messed up. I need type:
sudo dhclient -r
sudo dhclient
in order to use the internet. I wonder why do I need to do this in the first place. Any fix you know? @tobias

Do you still get the error on snap refresh ?

No. (Not when I use the command I mention above.)

for 20.10 (as well as 20.04) network configuration you should take a look at:


1 Like