Cannot initiate connection to...when I try to update or install software

Creating a bug report/issue

Required Information

  • DietPi version | 8
  • Distro version | bookworm
  • Kernel version | Linux DietPi 6.1.0-10-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.37-1 (2023-07-03) x86_64 GNU/Linux
  • Architecture | amd64
  • SBC model | `Native PC (x86_64)’

Steps to reproduce

  1. …Whenever I try to install software, do a dietpi update, apt update, etc.

Actual behaviour

  • … I will end up getting "failed to fetch
https://download.docker.com/linux/debian/dists/bookworm/InRelease" or "cannot initiate connection to download.docker.com:443" messages.  I also see the same as it relates to " https://downloads.plex.tv/repo/deb/dists/public/InRelease."

Strangely, I don’t have docker or plex installed via DietPi, but rather installed CasaOS and have Plex installed through that.

Extra details

root@DietPi:~# apt-get update
Ign:1 https://deb.debian.org/debian-security bookworm-security InRelease
Ign:2 https://downloads.plex.tv/repo/deb public InRelease
Ign:3 https://download.docker.com/linux/debian bookworm InRelease
Ign:1 https://deb.debian.org/debian-security bookworm-security InRelease
Ign:2 https://downloads.plex.tv/repo/deb public InRelease
Ign:3 https://download.docker.com/linux/debian bookworm InRelease
Hit:4 http://ftp.us.debian.org/debian bookworm InRelease
Hit:5 http://ftp.us.debian.org/debian bookworm-updates InRelease
Hit:6 http://ftp.us.debian.org/debian bookworm-backports InRelease
Ign:1 https://deb.debian.org/debian-security bookworm-security InRelease
Ign:2 https://downloads.plex.tv/repo/deb public InRelease
Ign:3 https://download.docker.com/linux/debian bookworm InRelease
Err:1 https://deb.debian.org/debian-security bookworm-security InRelease
  Cannot initiate the connection to debian.map.fastly.net:443 (2a04:4e42:77::644). - connect (101: Network is unreachable) Could not connect to debian.map.fastly.net:443 (146.75.38.132), connection timed out Cannot initiate the connection to deb.debian.org:443 (2a04:4e42:79::644). - connect (101: Network is unreachable)
Err:2 https://downloads.plex.tv/repo/deb public InRelease
  Cannot initiate the connection to downloads.plex.tv:443 (2606:4700::6812:1ad3). - connect (101: Network is unreachable) Cannot initiate the connection to downloads.plex.tv:443 (2606:4700::6812:1bd3). - connect (101: Network is unreachable) Could not connect to downloads.plex.tv:443 (104.18.27.211), connection timed out Could not connect to downloads.plex.tv:443 (104.18.26.211), connection timed out
Err:3 https://download.docker.com/linux/debian bookworm InRelease
  Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:c600:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:ec00:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:6400:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:8400:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:4600:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:1800:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:fa00:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:b800:3:db06:4200:93a1). - connect (101: Network is unreachable) Could not connect to download.docker.com:443 (13.225.63.85), connection timed out Could not connect to download.docker.com:443 (13.225.63.62), connection timed out Could not connect to download.docker.com:443 (13.225.63.60), connection timed out Could not connect to download.docker.com:443 (13.225.63.90), connection timed out
Reading package lists... Done
W: Failed to fetch https://deb.debian.org/debian-security/dists/bookworm-security/InRelease  Cannot initiate the connection to debian.map.fastly.net:443 (2a04:4e42:77::644). - connect (101: Network is unreachable) Could not connect to debian.map.fastly.net:443 (146.75.38.132), connection timed out Cannot initiate the connection to deb.debian.org:443 (2a04:4e42:79::644). - connect (101: Network is unreachable)
W: Failed to fetch https://download.docker.com/linux/debian/dists/bookworm/InRelease  Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:c600:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:ec00:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:6400:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:8400:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:4600:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:1800:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:fa00:3:db06:4200:93a1). - connect (101: Network is unreachable) Cannot initiate the connection to download.docker.com:443 (2600:9000:21da:b800:3:db06:4200:93a1). - connect (101: Network is unreachable) Could not connect to download.docker.com:443 (13.225.63.85), connection timed out Could not connect to download.docker.com:443 (13.225.63.62), connection timed out Could not connect to download.docker.com:443 (13.225.63.60), connection timed out Could not connect to download.docker.com:443 (13.225.63.90), connection timed out
W: Failed to fetch https://downloads.plex.tv/repo/deb/dists/public/InRelease  Cannot initiate the connection to downloads.plex.tv:443 (2606:4700::6812:1ad3). - connect (101: Network is unreachable) Cannot initiate the connection to downloads.plex.tv:443 (2606:4700::6812:1bd3). - connect (101: Network is unreachable) Could not connect to downloads.plex.tv:443 (104.18.27.211), connection timed out Could not connect to downloads.plex.tv:443 (104.18.26.211), connection timed out
W: Some index files failed to download. They have been ignored, or old ones used instead.

I don’t think CasaOS will do any magic. They won’t do anything different from us, just set up the appropriate apt package source and install the software title.

BTW: I guess CasaOS is a docker based application. Hence it installed docker themself.

Can you try to disable IPv6 and try again.

I tried, but still seem to have network issues.

When I open the dietpi connection in SSH, it shows the following below my lan IP. Is this anything related?

curl: (28) Connection timed out after 3000 milliseconds

Looks like local network issues. Can you ping any IP or DNS name on the web?

ping google.com
ping 8.8.8.8
root@DietPi:~# ping google.com
PING google.com (142.251.40.238) 56(84) bytes of data.
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=1 ttl=59 time=5.93 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=2 ttl=59 time=7.25 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=3 ttl=59 time=6.30 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=4 ttl=59 time=6.47 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=5 ttl=59 time=6.38 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=6 ttl=59 time=6.62 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=7 ttl=59 time=6.09 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=8 ttl=59 time=6.60 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=9 ttl=59 time=6.07 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=10 ttl=59 time=6.54 ms
64 bytes from lga34s39-in-f14.1e100.net (142.251.40.238): icmp_seq=11 ttl=59 time=5.85 ms
^C
--- google.com ping statistics ---
11 packets transmitted, 11 received, 0% packet loss, time 10016ms
rtt min/avg/max/mdev = 5.849/6.372/7.252/0.378 ms

Might be a problem with HTTPS :thinking: do you use any special network security or firewall that could influence such connections?

Nothing on the Dietpi. All the apps I’m running are Transmission, Plex, SMB, etc. I have a Fios router, and set a static lease on the DietPi, but nothing weird other than that.

So, I just tried to install Tailscale through Dietpi-Software, and got this message:

@MichaIng
any ideas why HTTPS connections are not able to establish?

It’s weird… if this happens I go in and change the DNS in Dietpi-config back and forth between 1.1.1.1 and 8.8.8.8 and it’s sometimes works. I changed it 8.8.8.8 right after I posted this message and it went through this time.

It does not seem to be a DNS problem, as this would lead to a different error message. The hostname has also been resolved. An IP address can be seen next to the host name.

In the past, we have had cases where the ISP has restricted access to the Internet and blocked some services.

It’s very strange that sometimes it works and sometimes it doesn’t.

Dumb question, I’ve uninstalled CasaOS and don’t have Docker installed via Dietpi-Software…so is it normal that I see https://download.docker.com… urls in that list.

Of course, you would need to manually remove docker apt package server configuration. :wink: