I have an Ubuntu 18.04.2 LTS VM running on Azure without a public IP due to security restrictions. I can use curl to download files over HTTP though FTP doesn't work.
These are the errors I'm getting:
sudo apt-get update
Err:1 http://mirror.cs.unm.edu/archive bionic InRelease
Connection failed [IP: 64.106.20.76 80]
Err:2 http://mirror.cs.unm.edu/archive bionic-updates InRelease
Connection failed [IP: 64.106.20.76 80]
Err:3 http://mirror.cs.unm.edu/archive bionic-backports InRelease
Connection failed [IP: 64.106.20.76 80]
Err:4 http://mirror.cs.unm.edu/archive bionic-security InRelease
Connection failed [IP: 64.106.20.76 80]
Reading package lists... Done
W: Failed to fetch http://mirror.cs.unm.edu/archive/dists/bionic/InRelease Connection failed [IP: 64.106.20.76 80]
W: Failed to fetch http://mirror.cs.unm.edu/archive/dists/bionic-updates/InRelease Connection failed [IP: 64.106.20.76 80]
W: Failed to fetch http://mirror.cs.unm.edu/archive/dists/bionic-backports/InRelease Connection failed [IP: 64.106.20.76 80]
W: Failed to fetch http://mirror.cs.unm.edu/archive/dists/bionic-security/InRelease Connection failed [IP: 64.106.20.76 80]
W: Some index files failed to download. They have been ignored, or old ones used instead.
I picked http://mirror.cs.unm.edu since according to here it only supports HTTP which in theory should rule out the FTP problem.
I can however access this mirror with curl fine:
curl -O http://mirror.cs.unm.edu/archive/dists
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 10616 100 10616 0 0 61011 0 --:--:-- --:--:-- --:--:-- 61011
I've tried several mirrors with no luck. AFAIK there's no firewall, proxy or antivirus settings interfering with updating. All outgoing ports are open. Also tried all suggestions from this question
Edit: Regarding DNS setting, as this VM is connected to a intranet with an ExpressRoute there's some kind of magic happening.
First couple of lines of/etc/resolv.conf read:
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# This is a dynamic resolv.conf file for connecting local clients to the
# internal DNS stub resolver of systemd-resolved. This file lists all
# configured search domains.
#
# Run "systemd-resolve --status" to see details about the uplink DNS servers
# currently in use.
#
# Third party programs must not access this file directly, but only through the
# symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
# replace this symlink by a static file or a different symlink.
#
# See man:systemd-resolved.service(8) for details about the supported modes of
# operation for /etc/resolv.conf.
nameserver 127.0.0.53
options edns0
search reddog.microsoft.com
How can I further debug this problem?
aria2c
command instead ofcurl
and please tell me if this works. Ifaria2c
works, you can useapt-fast
which instead ofapt
. The package name isaria2
but the command isaria2c
. – mchid Jul 02 '19 at 06:48deb
ofaria2
. If the dependencies are not installed, please let me know and maybe we can figure something else out. – mchid Jul 02 '19 at 08:02