Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot update apt-get -Failed to fetch Connection failed [IP: 91.189.88.149 80] #3353

Closed
frankfuu opened this issue Jul 5, 2018 · 25 comments

Comments

@frankfuu
Copy link

frankfuu commented Jul 5, 2018

I'm running Ubuntu on WSL and wish to update my apt-get via sudo apt-get update but came across this error.

Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/binary-amd64/Packages  Connection failed [IP: 91.189.88.149 80]

Running a lsb_release -a shows

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.4 LTS
Release:        16.04
Codename:       xenial

My Windows system

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.17134 N/A Build 17134
Hotfix(s):                     4 Hotfix(s) Installed.
                                       [01]: KB2693643
                                       [02]: KB4103729
                                       [03]: KB4287903
                                       [04]: KB4284835

Here is the complete log

frank@WIN-D7471GB:~$ sudo apt-get update
[sudo] password for frank:
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:2 http://archive.ubuntu.com/ubuntu xenial InRelease [247 kB]
Get:5 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages [1,201 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/main Translation-en [568 kB]
Get:7 http://archive.ubuntu.com/ubuntu xenial/restricted amd64 Packages [8,344 B]
Get:8 http://archive.ubuntu.com/ubuntu xenial/restricted Translation-en [2,908 B]
Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Ign:10 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en
Get:11 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:12 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
32% [Waiting for headers]
Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Ign:10 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en
Ign:9 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
Get:10 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [6,256 kB]
Err:9 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
  Connection failed [IP: 91.189.88.149 80]
Fetched 247 kB in 2min 44s (1,504 B/s)
Reading package lists... Done
E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/universe/binary-amd64/Packages  Connection failed [IP: 91.189.88.149 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

I'm not sure if this is the best place to post my issue if not, please provide suggestions.

Thanks.

@shoffmeister
Copy link

How often did you try to make sure that this is not a transient problem in connecting to 91.189.88.149?

Are you located in an environment - anti-virus tool / proxy / enterprise network / political zone etc - which would tend to introduce interesting behaviour into an otherwise plain and simple TCP/IP connection to an IP address which according to geo-coding to be located in Scotland (at least for me and with all the caveats that apply to geo-coding)?

If you are located in such an environment - have you tried outside of that environment?

@frankfuu
Copy link
Author

frankfuu commented Jul 6, 2018

hi @shoffmeister ,

Strangely enough, I jumped onto a different machine on a different WAN network, with the same windows build and it worked fine. So it could be related to my company network.

OS Name:                   Microsoft Windows 10 Pro
OS Version:                10.0.17134 N/A Build 17134
Hotfix(s):                    3 Hotfix(s) Installed.
                                  [01]: KB2693643
                                  [02]: KB4287903
                                  [03]: KB4284835
frank@WIN-DJB71X:~$ sudo apt-get update
[sudo] password for frank:
Hit:1 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://security.ubuntu.com/ubuntu xenial-security InRelease [107 kB]
Get:3 http://archive.ubuntu.com/ubuntu xenial-updates InRelease [109 kB]
Get:4 http://archive.ubuntu.com/ubuntu xenial-backports InRelease [107 kB]
Get:5 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [518 kB]
Get:6 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages [7,532 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [222 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/restricted amd64 Packages [7,204 B]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/restricted Translation-en [2,152 B]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [356 kB]
Get:11 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [133 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3,456 B]
Get:13 http://security.ubuntu.com/ubuntu xenial-security/multiverse Translation-en [1,744 B]
Get:14 http://archive.ubuntu.com/ubuntu xenial/universe Translation-en [4,354 kB]
Get:15 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages [144 kB]
Get:16 http://archive.ubuntu.com/ubuntu xenial/multiverse Translation-en [106 kB]
Get:17 http://archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [804 kB]
Get:18 http://archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [331 kB]
Get:19 http://archive.ubuntu.com/ubuntu xenial-updates/restricted amd64 Packages [7,560 B]
Get:20 http://archive.ubuntu.com/ubuntu xenial-updates/restricted Translation-en [2,272 B]
Get:21 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [641 kB]
Get:22 http://archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [258 kB]
Get:23 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.4 kB]
Get:24 http://archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,344 B]
Get:25 http://archive.ubuntu.com/ubuntu xenial-backports/main amd64 Packages [6,744 B]
Get:26 http://archive.ubuntu.com/ubuntu xenial-backports/main Translation-en [4,180 B]
Get:27 http://archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7,412 B]
Get:28 http://archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3,996 B]
Fetched 15.8 MB in 52s (302 kB/s)
Reading package lists... Done

@howels
Copy link

howels commented Sep 4, 2018

Same problem here. I can put the URL in a browser on the Windows host and the connection works. I can update my Linux laptop and it works. I cannot run "apt update" or curl that URL from within WSL. Yay Windows! Latest Bionic WSL from Windows store installed today.

@Mizumaky
Copy link

Mizumaky commented Nov 4, 2018

Had a similiar problem of failing all/some connections which prevented me to apt-get install gcc.
Finally solved by looking at forums and trying everything i could:

  • editing /etc/resolv.conf and leaving only line "nameserver 8.8.4.4."
  • looking at the port behind ip adresses of failed connections and trying disabling network protection for the specified port in the antivirus settings (solved only for most connections, not all, even on that port)
  • completely turning off Kaspersky Free anitivirus
  • changing from connection through my dormitory's internet to a wifi connection i shared from my phone
  • (trying apt-get update first)

I dunno if all or only some of this helped, but somehow i got apt-get install gcc to download the rest and work.

@Nerdsie
Copy link

Nerdsie commented Nov 20, 2018

Had a similiar problem of failing all/some connections which prevented me to apt-get install gcc.
Finally solved by looking at forums and trying everything i could:

* editing /etc/resolv.conf and leaving only line "nameserver 8.8.4.4."

* looking at the port behind ip adresses of failed connections and trying disabling network protection for the specified port in the antivirus settings (solved only for most connections, not all, even on that port)

* completely turning off Kaspersky Free anitivirus

* changing from connection through my dormitory's internet to a wifi connection i shared from my phone

* (trying apt-get update first)

I dunno if all or only some of this helped, but somehow i got apt-get install gcc to download the rest and work.

Completely closing Kaspersky fixed everything for me

@chrisls121
Copy link

Same here, "Pause Protection" does not work. Had to stop the Kaspersky service and it started working.

@sofsip
Copy link

sofsip commented Dec 17, 2018

I had the same issue with Zone Alarm Firewall - Snoozing doesn't work. it has to be completely stopped.

@igor-ye
Copy link

igor-ye commented Jan 21, 2019

Completely closing Kaspersky fixed everything for me

Also you can just temporarily switch off Kaspersky Free firewall for both 80 and 443 ports - in Настройки (Settings) -> Дополнительно (Additional?) -> Сеть (Network) -> Контролируемые порты (Protected network ports?) - custom network ports list in option Контролировать только выбранные (Protect only selected?). After successful apt-get update - switch them on again.

P.S. This also helped me with failing Ivy dependencies update in Scala sbt build.
P.P.S And gradle builds too. Seems in both cases they were unable to connect to maven central.

@SonyStone
Copy link

Had a similiar problem of failing all/some connections which prevented me to apt-get install gcc.
Finally solved by looking at forums and trying everything i could:

  • editing /etc/resolv.conf and leaving only line "nameserver 8.8.4.4."
  • looking at the port behind ip adresses of failed connections and trying disabling network protection for the specified port in the antivirus settings (solved only for most connections, not all, even on that port)
  • completely turning off Kaspersky Free anitivirus
  • changing from connection through my dormitory's internet to a wifi connection i shared from my phone
  • (trying apt-get update first)

I dunno if all or only some of this helped, but somehow i got apt-get install gcc to download the rest and work.

only sudo apt-get update was enough for me.

@shutaozh
Copy link

shutaozh commented Aug 2, 2019

change your network, and have a try.

@herlianzhang
Copy link

try to run that command "sudo apt-get update" in tty, press ctrl + alt + f3 or f4, then run the command

@z3nth10n
Copy link

Avast is making troubles... I disabled it and this worked perfectly

@Dwerg01
Copy link

Dwerg01 commented May 21, 2020

Had a similiar problem of failing all/some connections which prevented me to apt-get install gcc.
Finally solved by looking at forums and trying everything i could:

  • editing /etc/resolv.conf and leaving only line "nameserver 8.8.4.4."
  • looking at the port behind ip adresses of failed connections and trying disabling network protection for the specified port in the antivirus settings (solved only for most connections, not all, even on that port)
  • completely turning off Kaspersky Free anitivirus
  • changing from connection through my dormitory's internet to a wifi connection i shared from my phone
  • (trying apt-get update first)

I dunno if all or only some of this helped, but somehow i got apt-get install gcc to download the rest and work.

Champ! I only changed one thing to get it working. Added "nameserver 8.8.8.8" to /etc/resolve.conf

@vncastanheira
Copy link

vncastanheira commented May 23, 2020

Had a similiar problem of failing all/some connections which prevented me to apt-get install gcc.
Finally solved by looking at forums and trying everything i could:

* editing /etc/resolv.conf and leaving only line "nameserver 8.8.4.4."

* looking at the port behind ip adresses of failed connections and trying disabling network protection for the specified port in the antivirus settings (solved only for most connections, not all, even on that port)

* completely turning off Kaspersky Free anitivirus

* changing from connection through my dormitory's internet to a wifi connection i shared from my phone

* (trying apt-get update first)

I dunno if all or only some of this helped, but somehow i got apt-get install gcc to download the rest and work.

For some reason with WSL2 I have to keep redoing this because resolve.conf resets at the default value each time I open a new instance, making apt-get and any other software that uses the internet to fail.

Using WSL2 on Windows 10 version 2004 with Ubuntu 20.04.

@holzkohlengrill
Copy link

do-release-upgrade solved the issue for me.

@khairaf
Copy link

khairaf commented Sep 15, 2020

  • changing from connection through my dormitory's internet to a wifi connection i shared from my phone

why only this way works for me? everything else doesn't work

@verdian123
Copy link

same problem here, solved by using VPN

@PeterFlorian
Copy link

You have to configure the proxy.
Create a file named /etc/apt/apt.conf with this content (use your proxy settings!):
Acquire::http::proxy "http://proxy:8080/";
Acquire::https::proxy "https://proxy:8080/";

@makspundyk
Copy link

You should run the update command:
sudo apt-get update

I faced this issue at the very beginning, after system installation.
It helped.

@lucadonnoh
Copy link

sudo apt-get update solved my issue

@xue-fc
Copy link

xue-fc commented May 23, 2022

You have to configure the proxy. Create a file named /etc/apt/apt.conf with this content (use your proxy settings!): Acquire::http::proxy "http://proxy:8080/"; Acquire::https::proxy "https://proxy:8080/";

This method works! Thank you!

@Echo64
Copy link

Echo64 commented Aug 10, 2022

You have to configure the proxy. Create a file named /etc/apt/apt.conf with this content (use your proxy settings!): Acquire::http::proxy "http://proxy:8080/"; Acquire::https::proxy "https://proxy:8080/";

Wow hours of troubleshooting and somehow I totally missed this, using the export proxy_http for a single use or adding it to the .bashrc file didn't work but this did! thanks!

@nilknow
Copy link

nilknow commented Aug 19, 2022

I changed the ubuntu repository, new repository works.

@LQTam
Copy link

LQTam commented Jan 18, 2023

You have to configure the proxy. Create a file named /etc/apt/apt.conf with this content (use your proxy settings!): Acquire::http::proxy "http://proxy:8080/"; Acquire::https::proxy "https://proxy:8080/";

thanks, This work for me.
For anyone using WSL on a machine that connects to the internet via a Proxy
Note: after a while working with WSL, some command failed using https::proxy
so it need to change to `Acquire::https::proxy "http://proxy:8080/";
http://proxy:8080/ without the 's' character

Add more `Acquire::fpt::proxy "http://proxy:8080/";

@PriyankaAppMath
Copy link

I have facing same kind of problem in ubuntu 23.10

sudo apt-get update
Get:1 https://download.docker.com/linux/ubuntu mantic InRelease [48.8 kB]
Ign:2 http://archive.canonical.com/ubuntu mantic InRelease
Hit:3 http://archive.ubuntu.com/ubuntu mantic InRelease
Err:4 http://archive.canonical.com/ubuntu mantic Release
404 Not Found [IP: **************]
Hit:5 http://archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:6 http://archive.ubuntu.com/ubuntu mantic-security InRelease
Hit:7 http://archive.ubuntu.com/ubuntu mantic-backports InRelease
Reading package lists... Done
E: The repository 'http://archive.canonical.com/ubuntu mantic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

Tried with do-release-upgrade. But no help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests