Score:1

Cannot use sudo apt-get update

jp flag

I made a Ubuntu Server 20.04 VM in Hyper-V and whenever I try to run sudo apt-get update I get the following return:

Get:1 https://download.docker.com/linux/ubuntu focal InRelease [57.7 kB]
Err:2 http://be.archive.ubuntu.com/ubuntu focal InRelease
  Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Could not connect to be.archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to be.archive.ubuntu.com:80 (91.189.88.142), connection timed out Could not connect to be.archive.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to be.archive.ubuntu.com:80 (91.189.91.38), connection timed out
Err:3 http://be.archive.ubuntu.com/ubuntu focal-updates InRelease
  Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable)
Err:4 http://be.archive.ubuntu.com/ubuntu focal-backports InRelease
  Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable)
Err:5 http://be.archive.ubuntu.com/ubuntu focal-security InRelease
  Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable)
Fetched 57.7 kB in 32s (1,828 B/s)
Reading package lists... Done
W: Failed to fetch http://be.archive.ubuntu.com/ubuntu/dists/focal/InRelease  Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable) Could not connect to be.archive.ubuntu.com:80 (91.189.88.152), connection timed out Could not connect to be.archive.ubuntu.com:80 (91.189.88.142), connection timed out Could not connect to be.archive.ubuntu.com:80 (91.189.91.39), connection timed out Could not connect to be.archive.ubuntu.com:80 (91.189.91.38), connection timed out
W: Failed to fetch http://be.archive.ubuntu.com/ubuntu/dists/focal-updates/InRelease  Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable)
W: Failed to fetch http://be.archive.ubuntu.com/ubuntu/dists/focal-backports/InRelease  Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable)
W: Failed to fetch http://be.archive.ubuntu.com/ubuntu/dists/focal-security/InRelease  Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::18). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1562::15). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::23). - connect (101: Network is unreachable) Cannot initiate the connection to be.archive.ubuntu.com:80 (2001:67c:1360:8001::24). - connect (101: Network is unreachable)
W: Some index files failed to download. They have been ignored, or old ones used instead.

I'm able to ping and I can also download docker images and use sudo apt-get update inside a docker container. So I assume I do have some sort of network connection?
Does anyone know what I did wrong or how I can fix this?
Thanks!

Edit:
I'm able to ping to 8.8.8.8 and be.archive.ubuntu.com as well!

es flag
your virtual machine has no network connection, check your settings
jp flag
I'm able to ping and I can download docker images so I assume that means I have a network connection? Although I'm not sure, I'm pretty new to this.
ChanganAuto avatar
us flag
Are you behind a proxy? And yes, you must know.
jp flag
I'm sorry, how do I know if I'm behind a proxy?
us flag
Can you `ping 8.8.8.8`?
jp flag
Yes! I just tried and I'm able to ping 8.8.8.8.
nobody avatar
gh flag
`ping -c 4 be.archive.ubuntu.com` Maybe DNS problem?
jp flag
I can also ping to be.archive.ubuntu.com without any issue!
nobody avatar
gh flag
Please try another mirror. I oversaw `Get:1 https://download.docker.com/linux/ubuntu focal InRelease` connection to there is possible.
jp flag
How can I try another mirror? I'm sorry I don't know how to do that
nobody avatar
gh flag
Not familiar with docker. to change to main server `sudo sed -i s,//be.archive,//archive,g /etc/apt/sources.list`
Score:1
cn flag

This is likely a cause of Your firewall conflicting with your network proxy.They way firewall is configured (factory settings in mind) is that it places stricter protocol on network traffic.When combined with a proxy, that takes your Ipv6 and sends it to a server bank, then to the target domain.

When a proxy(s) become overloaded, it causes a massive slowdown in traffic. 8.8.8.8 is Google's standard dock address, and is slow( at least when I use it).The proxy you're using is likely the cause for DNS timeout. I would advise doing the following:

1.Check to see if your firewall is blocking a port

        sudo telnet google.com 80

2.If you recieve an error, simply go to the activities page to launch the firewall gui and unblock port 80.I would personally disable the proxy via wifi settings or ethernet

3.If apt-get update is still not working, it may be due to the software repositories.If you are tuned to recieved pre-releases, then you may have to remove those pre-release packages.

 sudo apt-remove [name of repository]

Then,go to Software and Updates on Activities, uncheck Pre-Release.

I am New to answering and interacting on this site, so I sincerely apologize for any editing mistakes.

I hope this helps, best of luck.

jp flag
Hi! Thank you for your reply. I've tried unblocking port 80 because I got an error from the first command. However, after trying these changes I'm now somehow unable to even use SSH. So I don't really know what I did wrong. Thank you so much for replying though!
GravvyBoiiz  avatar
cn flag
For SSH errors, verify that the host IP Address is correct for the droplet.Verify that your network supports that SSH block.Some internet providers may block port 22 or custom SSH ports.Also check to see that they are not set to a default policy of DROP, and the port is not added to allow connections.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.