2

I have a new Pi Zero W.

I'm trying to install a Debian (DietPi) onto it but it always fails. I don't have a keyboard and external monitor, so I choose a headless install with predefined wifi key and SSID.

The problem is absolutely wierd (wlan0 interface works for sure, because that's the only way now to reach it via SSH and it works):

Pinging an IP address works:

root@DietPi:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=53 time=9.95 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=53 time=13.0 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=53 time=12.1 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=53 time=15.0 ms
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 7ms
rtt min/avg/max/mdev = 9.949/12.523/15.039/1.829 ms

Pinging a domain name (using DNS) works too:

root@DietPi:~# ping google.com
PING google.com (172.217.19.174) 56(84) bytes of data.
64 bytes from zrh04s07-in-f14.1e100.net (172.217.19.174): icmp_seq=1 ttl=53 time=10.1 ms
64 bytes from zrh04s07-in-f14.1e100.net (172.217.19.174): icmp_seq=2 ttl=53 time=12.7 ms
64 bytes from zrh04s07-in-f14.1e100.net (172.217.19.174): icmp_seq=3 ttl=53 time=12.9 ms
64 bytes from zrh04s07-in-f14.1e100.net (172.217.19.174): icmp_seq=4 ttl=53 time=13.2 ms
^C
--- google.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 7ms
rtt min/avg/max/mdev = 10.102/12.236/13.163/1.248 ms

Let's download a file from http (works too):

root@DietPi:~# wget http://archive.raspberrypi.org/debian/dists/buster/InRelease
--2020-04-24 07:49:31--  http://archive.raspberrypi.org/debian/dists/buster/InRelease
Resolving archive.raspberrypi.org (archive.raspberrypi.org)... 176.126.240.86, 46.235.231.151, 46.235.230.122, ...
Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|176.126.240.86|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 25112 (25K)
Saving to: ‘InRelease.1’

InRelease.1                                                 100%[========================================================================================================================================>]  24.52K  --.-KB/s    in 0.1s

2020-04-24 07:49:32 (174 KB/s) - ‘InRelease.1’ saved [25112/25112]

Okay, now problem: let's download the same file from https:

root@DietPi:~# wget https://archive.raspberrypi.org/debian/dists/buster/InRelease
--2020-04-24 07:49:37--  https://archive.raspberrypi.org/debian/dists/buster/InRelease
Resolving archive.raspberrypi.org (archive.raspberrypi.org)... 93.93.135.117, 176.126.240.167, 46.235.231.111, ...
Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|93.93.135.117|:443... connected.

This one hangs forever and can not continue. Due to this apt is not able upgrade or install anything.

I did one more step:

root@DietPi:~# wget -d https://archive.raspberrypi.org/debian/dists/buster/InRelease
DEBUG output created by Wget 1.20.1 on linux-gnueabihf.

Reading HSTS entries from /root/.wget-hsts
URI encoding = ‘UTF-8’
Converted file name 'InRelease' (UTF-8) -> 'InRelease' (UTF-8)
--2020-04-24 07:52:26--  https://archive.raspberrypi.org/debian/dists/buster/InRelease
Certificates loaded: 128
Resolving archive.raspberrypi.org (archive.raspberrypi.org)... 176.126.240.86, 93.93.135.117, 176.126.240.167, ...
Caching archive.raspberrypi.org => 176.126.240.86 93.93.135.117 176.126.240.167 46.235.231.111 93.93.135.118 46.235.227.39 176.126.240.84 46.235.231.145 46.235.230.122 46.235.231.151 2a00:1098:88:26::1 2a00:1098:88:26::1:1 2a00:1098:84:1e0::1 2a00:1098:82:47::1:1 2a00:1098:80:56::2:1 2a00:1098:88:26::2:1 2a00:1098:84:1e0::2 2a00:1098:80:56::1:1 2a00:1098:84:1e0::3 2a00:1098:82:47::1
Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|176.126.240.86|:443... connected.
Created socket 3.
Releasing 0x00f0a8d0 (new refcount 1).
GnuTLS: Error in the pull function.
Closed fd 3
Unable to establish SSL connection.
root@DietPi:~#

Two more additions:

  1. Same command works fine on another Pi (other physical location).
  2. From the same location where this PiZero is, I can open this link on my computer.

Update (based on comment)

Date seems okay on the Zero. (Although timezone is not yet setup)

Adding --no-check-certificate does not help:

# wget -d --no-check-certificate  https://archive.raspberrypi.org/debian/dists/buster/InRelease
Setting --check-certificate (checkcertificate) to 0
Setting --check-certificate (checkcertificate) to 0
DEBUG output created by Wget 1.20.1 on linux-gnueabihf.

Reading HSTS entries from /root/.wget-hsts
URI encoding = ‘UTF-8’
Converted file name 'InRelease' (UTF-8) -> 'InRelease' (UTF-8)
--2020-04-24 08:15:12--  https://archive.raspberrypi.org/debian/dists/buster/InRelease
Certificates loaded: 128
Resolving archive.raspberrypi.org (archive.raspberrypi.org)... 46.235.231.151, 93.93.135.118, 176.126.240.86, ...
Caching archive.raspberrypi.org => 46.235.231.151 93.93.135.118 176.126.240.86 46.235.230.122 46.235.227.39 46.235.231.111 46.235.231.145 176.126.240.84 93.93.135.117 176.126.240.167 2a00:1098:84:1e0::3 2a00:1098:88:26::2:1 2a00:1098:84:1e0::1 2a00:1098:82:47::1:1 2a00:1098:88:26::1 2a00:1098:80:56::2:1 2a00:1098:80:56::1:1 2a00:1098:82:47::1 2a00:1098:88:26::1:1 2a00:1098:84:1e0::2
Connecting to archive.raspberrypi.org (archive.raspberrypi.org)|46.235.231.151|:443... connected.
Created socket 3.
Releasing 0x003018e8 (new refcount 1).

Curl seems to work without issues:

# curl https://archive.raspberrypi.org/debian/dists/buster/InRelease > InRelease
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 25112  100 25112    0     0  41032      0 --:--:-- --:--:-- --:--:-- 41099

Update2:

The main issue is that apt fails:

# apt update
Hit:1 http://raspbian.raspberrypi.org/raspbian buster InRelease
Ign:2 https://archive.raspberrypi.org/debian buster InRelease
Err:3 https://archive.raspberrypi.org/debian buster Release
  Could not wait for server fd - select (11: Resource temporarily unavailable) [IP: 93.93.135.117 443]
Reading package lists... Done
E: The repository 'https://archive.raspberrypi.org/debian buster 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.

This is I believe has the same root cause as the wget's one.

10
  • Check the date first by typing date. Commented Apr 24, 2020 at 7:09
  • Fri 24 Apr 08:10:48 BST 2020
    – Daniel
    Commented Apr 24, 2020 at 7:10
  • For once, try adding a following comment when getting a file from https --no-check-certificate. Commented Apr 24, 2020 at 7:12
  • Please update me after using curl instead of wget. Commented Apr 24, 2020 at 7:14
  • Curl works fine even without --no-check-certificate
    – Daniel
    Commented Apr 24, 2020 at 7:18

1 Answer 1

2

If you have trouble with accessing the Raspbian archive then it is strongly recommended to use the original settings from the Raspbian images. On a virgin Raspbian image you will find:

rpi ~$ cat /etc/apt/sources.list.d/raspi.list
deb http://archive.raspberrypi.org/debian/ buster main
# Uncomment line below then 'apt-get update' to enable 'apt-get source'
#deb-src http://archive.raspberrypi.org/debian/ buster main

As you can see there is no https address given so it seems that it isn't supported for the Raspbian repository.

2
  • Indeed this was how I solved it, but it still very strange. Some people had the same issue and they solved this by switching from eth0 to wlan0. Might be some proxy stuff.
    – Daniel
    Commented Apr 26, 2020 at 7:26
  • https is indeed supported by the Raspbian repo. https works for me without issues. Commented Apr 26, 2020 at 10:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.