apt-get update not working
I am getting below error while doing apt-get update
root@BLR03-LTD8B41Z2:/home/hasabd# apt-get update Err:1 http://archive.ubuntu.com/ubuntu bionic InRelease Connection failed [IP: 91.189.88.142 80] Err:2 http://archive.ubuntu.com/ubuntu bionic-updates InRelease Connection failed [IP: 2001:67c:1360:8001::24 80] Err:3 http://archive.ubuntu.com/ubuntu bionic-backports InRelease Connection failed [IP: 2001:67c:1562::15 80] Err:4 http://security.ubuntu.com/ubuntu bionic-security InRelease Connection failed [IP: 91.189.88.152 80] Reading package lists... Done W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic/InRelease Connection failed [IP: 91.189.88.142 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-updates/InRelease Connection failed [IP: 2001:67c:1360:8001::24 80] W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/bionic-backports/InRelease Connection failed [IP: 2001:67c:1562::15 80] W: Failed to fetch http://security.ubuntu.com/ubuntu/dists/bionic-security/InRelease Connection failed [IP: 91.189.88.152 80] W: Some index files failed to download. They have been ignored, or old ones used instead.
Internet works
root@BLR03-LTD8B41Z2:/home/hasabd# ping google.com PING google.com (172.217.9.46) 56(84) bytes of data. 64 bytes from ord38s08-in-f14.1e100.net (172.217.9.46): icmp_seq=1 ttl=55 time=294 ms 64 bytes from ord38s08-in-f14.1e100.net (172.217.9.46): icmp_seq=2 ttl=55 time=293 ms 64 bytes from ord38s08-in-f14.1e100.net (172.217.9.46): icmp_seq=3 ttl=55 time=304 ms 64 bytes from ord38s08-in-f14.1e100.net (172.217.9.46): icmp_seq=4 ttl=55 time=291 ms 64 bytes from ord38s08-in-f14.1e100.net (172.217.9.46): icmp_seq=5 ttl=55 time=291 ms ^V64 bytes from ord38s08-in-f14.1e100.net (172.217.9.46): icmp_seq=6 ttl=55 time=297 ms 64 bytes from ord38s08-in-f14.1e100.net (172.217.9.46): icmp_seq=7 ttl=55 time=309 ms ^C --- google.com ping statistics --- 7 packets transmitted, 7 received, 0% packet loss, time 6008ms rtt min/avg/max/mdev = 291.163/297.612/309.823/6.620 ms
Check this out: https://github.com/microsoft/WSL/issues/3353 Do you have any antivirus installed? Or smth else that configure access to this particular address?
Try to telnet to repo-ip 443 from Host cmd.
root@BLR03-LTD8B41Z2:~# telnet 91.189.88.142 443 Trying 91.189.88.142... Connected to 91.189.88.142. Escape character is '^]'. quit ^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^C^CquitConnection closed by foreign host. root@BLR03-LTD8B41Z2:~# root@BLR03-LTD8B41Z2:~# telnet 91.189.88.152 443 Trying 91.189.88.152... Connected to 91.189.88.152. Escape character is '^]'. quit
Might be the issue with the firewall or network.
Hi, same issue for me
/// GOOGLE from WLS and from Host
$ping www.google.com
PING www.google.com (216.58.209.36) 56(84) bytes of data.
64 bytes from waw02s05-in-f4.1e100.net (216.58.209.36): icmp_seq=1 ttl=53 time=12.7 ms
from WSL
$telnet www.google.com 443
Trying 216.58.198.4...
Connected to www.google.com.
from HOST
PS C:\Users\User> telnet www.google.com
Connecting To www.google.com...Could not open connection to the host, on port 23: Connect failed
//// END GOOGLE
/// ARCHIVE UBUNTU
$ping archive.ubuntu.com
PING archive.ubuntu.com (91.189.88.152) 56(84) bytes of data.
64 bytes from actiontoad.canonical.com (91.189.88.152): icmp_seq=1 ttl=54 time=38.0 m
From WSL2
$telnet archive.ubuntu.com
telnet archive.ubuntu.com 443
Trying 91.189.88.142...
Trying 91.189.88.152...
Trying 192.5.6.30...
...
Trying 2001:67c:1562::18...
telnet: Unable to connect to remote host: Network is unreachable
from host:
PS C:\Users\User>telnet archive.ubuntu.com 443
Connecting To archive.ubuntu.com...Could not open connection to the host, on port 443: Connect failed
from WSL2 using the IP address of archive.ubuntu.com
$telnet 91.189.88.152 443
Trying 91.189.88.152...
telnet: Unable to connect to remote host: Connection refused
from HOST
PS C:\Users\NicolaPedrocchi> telnet 91.189.88.152 443
Connecting To 91.189.88.152...Could not open connection to the host, on port 443: Connect failed
I tried to pause Kaspersky and deactivate Windows Defender Firewall, but the behaviour does not change. The last time I used apt to update the WSL2-Ubuntu was in the middle of April with the same PC configuration (i.e., Kaspersky activated) and it worked without any issue.
Thanks n.
Found like ssl is not connecting, that might be the issue. Any help?
root@BLR03-LTD8B41Z2:/etc/apt# curl -v https://google.com
- Rebuilt URL to: https://google.com/
- Trying 172.217.4.46...
- TCP_NODELAY set
- Connected to google.com (172.217.4.46) port 443 (#0)
- ALPN, offering h2
- ALPN, offering http/1.1
- successfully set certificate verify locations:
- CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs
- TLSv1.2 (OUT), TLS handshake, Client hello (1):
- OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to google.com:443
- stopped the pause stream!
- Closing connection 0 curl: (35) OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to google.com:443 root@BLR03-LTD8B41Z2:/etc/apt# curl -v http://google.com
- Rebuilt URL to: http://google.com/
- Trying 216.58.192.238...
- TCP_NODELAY set
- Connected to google.com (216.58.192.238) port 80 (#0)
GET / HTTP/1.1 Host: google.com User-Agent: curl/7.58.0 Accept: /
- Empty reply from server
- Connection #0 to host google.com left intact curl: (52) Empty reply from server
Hi, I found out that the issue I reported disappears in my PC when the internet connection is a wifi connection >50Mbps
This issue has been automatically closed since it has not had any activity for the past year. If you're still experiencing this issue please re-file this as a new issue or feature request.
Thank you!