Uclient downloads fail: "opkg_download: Check your network settings and connectivity."

I seem unable to download anything using opkg or owut:

# opkg update
Downloading https://downloads.openwrt.org/releases/24.10.1/targets/mediatek/filogic/packages/Packages.gz
SSL error: NET - Sending information through the socket failed
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.1/targets/mediatek/filogic/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/base/Packages.gz
SSL error: NET - Sending information through the socket failed
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/base/Packages.gz

Downloading https://downloads.openwrt.org/releases/24.10.1/targets/mediatek/filogic/kmods/6.6.86-1-6ace983a14b769f576fe9c4c7961bd89/Packages.gz
SSL error: NET - Sending information through the socket failed
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.1/targets/mediatek/filogic/kmods/6.6.86-1-6ace983a14b769f576fe9c4c7961bd89/Packages.gz

Downloading https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/luci/Packages.gz
SSL error: NET - Sending information through the socket failed
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/luci/Packages.gz

Downloading https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/packages/Packages.gz
SSL error: NET - Sending information through the socket failed
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/routing/Packages.gz
SSL error: NET - Sending information through the socket failed
*** Failed to download the package list from https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/routing/Packages.gz

Downloading https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/telephony/Packages.sig
SSL error: NET - Sending information through the socket failed
Signature file download failed.
Remove wrong Signature file.
Collected errors:
 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.1/targets/mediatek/filogic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/base/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.1/targets/mediatek/filogic/kmods/6.6.86-1-6ace983a14b769f576fe9c4c7961bd89/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/routing/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cortex-a53/telephony/Packages.sig, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

# owut check
ERROR: uclient error code=1
  This could be due to the server being down or inaccessible, check
  https://sysupgrade.openwrt.org/json/v1/overview.json
ERROR: Response status 0 while downloading
  https://sysupgrade.openwrt.org/json/v1/overview.json

Now the odd thing is that the network appears to be fine, ping works. I can even download the offending files from the router using curl:

root@OpenWrt:~# curl https://downloads.openwrt.org/releases/24.10.1/targets/mediatek/filogic/packages/Packages.gz --output tmp
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100  9653  100  9653    0     0   114k      0 --:--:-- --:--:-- --:--:--  116k
root@OpenWrt:~# file tmp
tmp: gzip compressed data, max compression, from Unix, original size modulo 2^32 43147

Router is a GL.Inet MT-6000. I'm on 24.10.1. This is the first time trying to update after the switch from 24.10.0 to 24.10.1.

Update: I tried --no-check-certificate to opkg: Made no difference.

T-56 works, it's using same arch, it would seem the error's on your end ...

root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/releases/24.10.1/targets/mediatek/filo                             gic/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
...
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/24.10.1/packages/aarch64_cort                             ex-a53/telephony/Packages.sig
Signature check passed.

checked time and date on the router ?

@frollic Time and date is fine.

I did a tcpdump and analyzed it with wireshark. It appears to be trying to connect using IPv6. This is odd as I don't have IPv6 (still).

It appears that openwrt now thinks it has a default route via an ULA IP, presumably the ULA of the ISP cable modem (as it is on that interface). Logging into the cable modem I don't have IPv6 though. (Do note that I do use IPv6 ULAs internally still so I can't just turn off ipv6 entirely).

I don't have much control over that cable modem. Is there any way to tell OpenWRT to just ignore that spurious route. I can of course remove it manually for now.

this can happen is some cases, you could try to disable the wan6 interface, it usually solves the issue.

2 Likes

Thank you, didn't think about wan/wan6 split. Very useful!

You likely have IPv6 DNS address resolution working from your ISP (or other upstream) DNS servers, which causes you to get also IPv6 addresses for DNS queries, but you have no actual IPv6 connectivity. And the default uclient-fetch (= mini wget) is sadly dumb and does not offer automatic fallback to IPv4, if IPv6 connection does not work.

Alternative solution (to removing wan6) might be installing full GNU wget-ssl, which seamlessly replaces uclient-fetch with full actual wget and has fallback from IPv6 to IPv4.

2 Likes

Yes, but I know for a fact this has been like that for a long time. So my guess is that before I didn't get a spurious default route for ipv6. It was also a rather strange route: default from ULA_HERE via LINK_LOCAL_HERE. Never seen that from clause before.

I might as well disable wan6 as it currently isn't useful to me.

EDIT: I also have another very odd route that I don't understand:

unreachable fdab:ef42:31bc::/48 dev lo proto static metric 2147483647 pref medium

Now, that is the ULA prefix I use in the global network options. Why would it be marked as unreachable? The subnets for the different VLANs has a lower metric, so that makes sense. But why is the prefix null-routed?