The Basics (not really relevant, but sure, here goes)
- Nextcloud Server version (e.g., 29.x.x):
30.0.4
- Operating system and version (e.g., Ubuntu 24.04):
Ubuntu 24.04.1 LTS
- Is this the first time you’ve seen this error? (Yes / No):
no
- When did this problem seem to first start?
on and off since 30.0.3
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
bare metal
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
no
Summary of the issue you are facing:
wget fails to download the latest bz2 file from download.nextcloud.com
Looking in a browser, I get valid content, but from wget, I get the following error:
$ wget https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2
–2025-01-19 00:16:50-- https://download.nextcloud.com/server/releases/nextcloud-30.0.5.tar.bz2
Resolving download.nextcloud.com (download.nextcloud.com)… 146.112.61.106, ::ffff:146.112.61.106
Connecting to download.nextcloud.com (download.nextcloud.com)|146.112.61.106|:443… connected.
ERROR: cannot verify download.nextcloud.com’s certificate, issued by ‘CN=Cisco Umbrella Secondary SubCA nyc-SG,O=Cisco’:
Unable to locally verify the issuer’s authority.
To connect to download.nextcloud.com insecurely, use `–no-check-certificate’.
Steps to replicate it (hint: details matter!):
use OpenDNS, OR set resolv.conf to an ISP that uses OpenDNS upstream.
$ host download.nextcloud.com
download.nextcloud.com has address 146.112.61.106
download.nextcloud.com has IPv6 address ::ffff:146.112.61.106
$ host 146.112.61.106
106.61.112.146.in-addr.arpa domain name pointer hit-adult.opendns.com.
On an unrelated note, resolving download.nextcloud.com’s IP using 8.8.8.8, and attempting to curl using the resolved IP and a host header also fails, due to SNI being broken on download.nextcloud.com when using TLS 1.2:
$ ip=host download.nextcloud.com 8.8.8.8 | grep "has address" | awk '{print $4}'
$ curl -v --header “Host: download.nextcloud.com” https://$ip/server/releases/nextcloud-$version.tar.bz2
- Trying 5.9.202.145:443…
- Connected to 5.9.202.145 (5.9.202.145) port 443
- ALPN: curl offers h2,http/1.1
- TLSv1.3 (OUT), TLS handshake, Client hello (1):
- CAfile: /etc/ssl/certs/ca-certificates.crt
- CApath: /etc/ssl/certs
- TLSv1.3 (IN), TLS handshake, Server hello (2):
- TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
- TLSv1.3 (IN), TLS handshake, Certificate (11):
- TLSv1.3 (IN), TLS handshake, CERT verify (15):
- TLSv1.3 (IN), TLS handshake, Finished (20):
- TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
- TLSv1.3 (OUT), TLS handshake, Finished (20):
- SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 / X25519 / RSASSA-PSS
- ALPN: server accepted http/1.1
- Server certificate:
- subject: CN=docs.nextcloud.com
- start date: Jan 11 02:41:38 2025 GMT
- expire date: Apr 11 02:41:37 2025 GMT
- subjectAltName does not match 5.9.202.145
- SSL: no alternative certificate subject name matches target host name ‘5.9.202.145’
- Closing connection
- TLSv1.3 (OUT), TLS alert, close notify (256):
curl: (60) SSL: no alternative certificate subject name matches target host name ‘5.9.202.145’
More details here: curl - SSL CA Certificates
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
This however works (it bypasses SNI):
$ curl --resolve download.nextcloud.com:443:$ip https://download.nextcloud.com/server/releases/nextcloud-$version.tar.bz2 > nextcloud-$version.tar.bz2