Attempting to update (System > Software > Update lists...) results in this error:
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/base/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.sig, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
The opkg update command failed with code 3.
I think my network settings and connectivity are setup and working correctly, as I can successfully ping and open to openwrt.org. So how do I fix this?
root@OpenWrt:/tmp# opkg update
Downloading https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.gz
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/telephony/Packages.sig
Signature file download failed.
Remove wrong Signature file.
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/telephony/Packages.sig, wget returned 4.
* opkg_download: Check your network settings and connectivity.
root@OpenWrt:/tmp#
The timezone was wrong. I fixed it, now it's synced with real time. Attempted to run opkg update again:
root@OpenWrt:/tmp# opkg update
Downloading https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.sig
Signature file download failed.
Remove wrong Signature file.
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/telephony/Packages.sig
Signature check passed.
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.sig, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
root@OpenWrt:/tmp#
Removed option check_signature from /etc/opkg.conf. Attempted to run opkg update again:
root@OpenWrt:/tmp# opkg update
Downloading https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
root@OpenWrt:/tmp#
root@OpenWrt:/tmp# ping downloads.openwrt.org
PING downloads.openwrt.org (151.101.66.132): 56 data bytes
64 bytes from 151.101.66.132: seq=0 ttl=58 time=70.287 ms
64 bytes from 151.101.66.132: seq=1 ttl=58 time=69.724 ms
64 bytes from 151.101.66.132: seq=2 ttl=58 time=69.746 ms
64 bytes from 151.101.66.132: seq=3 ttl=58 time=69.712 ms
64 bytes from 151.101.66.132: seq=4 ttl=58 time=69.829 ms
64 bytes from 151.101.66.132: seq=5 ttl=58 time=70.047 ms
64 bytes from 151.101.66.132: seq=6 ttl=58 time=70.211 ms
64 bytes from 151.101.66.132: seq=7 ttl=58 time=69.786 ms
64 bytes from 151.101.66.132: seq=8 ttl=58 time=69.660 ms
64 bytes from 151.101.66.132: seq=9 ttl=58 time=69.880 ms
64 bytes from 151.101.66.132: seq=10 ttl=58 time=69.689 ms
64 bytes from 151.101.66.132: seq=11 ttl=58 time=69.658 ms
64 bytes from 151.101.66.132: seq=12 ttl=58 time=69.793 ms
64 bytes from 151.101.66.132: seq=13 ttl=58 time=69.787 ms
64 bytes from 151.101.66.132: seq=14 ttl=58 time=69.875 ms
64 bytes from 151.101.66.132: seq=15 ttl=58 time=70.804 ms
64 bytes from 151.101.66.132: seq=16 ttl=58 time=69.768 ms
64 bytes from 151.101.66.132: seq=17 ttl=58 time=69.663 ms
64 bytes from 151.101.66.132: seq=18 ttl=58 time=70.434 ms
64 bytes from 151.101.66.132: seq=19 ttl=58 time=69.612 ms
64 bytes from 151.101.66.132: seq=20 ttl=58 time=69.787 ms
64 bytes from 151.101.66.132: seq=21 ttl=58 time=69.858 ms
64 bytes from 151.101.66.132: seq=22 ttl=58 time=69.839 ms
64 bytes from 151.101.66.132: seq=23 ttl=58 time=70.208 ms
64 bytes from 151.101.66.132: seq=24 ttl=58 time=69.759 ms
64 bytes from 151.101.66.132: seq=25 ttl=58 time=69.727 ms
64 bytes from 151.101.66.132: seq=26 ttl=58 time=69.696 ms
64 bytes from 151.101.66.132: seq=27 ttl=58 time=69.557 ms
64 bytes from 151.101.66.132: seq=28 ttl=58 time=69.708 ms
64 bytes from 151.101.66.132: seq=29 ttl=58 time=70.108 ms
64 bytes from 151.101.66.132: seq=30 ttl=58 time=70.036 ms
64 bytes from 151.101.66.132: seq=31 ttl=58 time=69.822 ms
^C
--- downloads.openwrt.org ping statistics ---
32 packets transmitted, 32 packets received, 0% packet loss
round-trip min/avg/max = 69.557/69.877/70.804 ms
root@OpenWrt:~# ping downloads.openwrt.org
PING downloads.openwrt.org (151.101.130.132): 56 data bytes
64 bytes from 151.101.130.132: seq=0 ttl=58 time=61.722 ms
64 bytes from 151.101.130.132: seq=1 ttl=58 time=61.773 ms
64 bytes from 151.101.130.132: seq=2 ttl=58 time=61.602 ms
64 bytes from 151.101.130.132: seq=3 ttl=58 time=61.590 ms
64 bytes from 151.101.130.132: seq=4 ttl=58 time=61.459 ms
64 bytes from 151.101.130.132: seq=5 ttl=58 time=61.587 ms
64 bytes from 151.101.130.132: seq=6 ttl=58 time=61.431 ms
64 bytes from 151.101.130.132: seq=7 ttl=58 time=61.783 ms
64 bytes from 151.101.130.132: seq=8 ttl=58 time=61.625 ms
64 bytes from 151.101.130.132: seq=9 ttl=58 time=61.554 ms
64 bytes from 151.101.130.132: seq=10 ttl=58 time=61.741 ms
64 bytes from 151.101.130.132: seq=11 ttl=58 time=61.608 ms
64 bytes from 151.101.130.132: seq=12 ttl=58 time=61.459 ms
64 bytes from 151.101.130.132: seq=13 ttl=58 time=61.457 ms
64 bytes from 151.101.130.132: seq=14 ttl=58 time=61.626 ms
64 bytes from 151.101.130.132: seq=15 ttl=58 time=61.506 ms
64 bytes from 151.101.130.132: seq=16 ttl=58 time=61.500 ms
64 bytes from 151.101.130.132: seq=17 ttl=58 time=61.487 ms
64 bytes from 151.101.130.132: seq=18 ttl=58 time=61.536 ms
64 bytes from 151.101.130.132: seq=19 ttl=58 time=61.389 ms
64 bytes from 151.101.130.132: seq=20 ttl=58 time=61.678 ms
64 bytes from 151.101.130.132: seq=21 ttl=58 time=61.596 ms
64 bytes from 151.101.130.132: seq=22 ttl=58 time=72.394 ms
64 bytes from 151.101.130.132: seq=23 ttl=58 time=61.521 ms
64 bytes from 151.101.130.132: seq=24 ttl=58 time=61.465 ms
64 bytes from 151.101.130.132: seq=25 ttl=58 time=61.706 ms
64 bytes from 151.101.130.132: seq=26 ttl=58 time=62.122 ms
64 bytes from 151.101.130.132: seq=27 ttl=58 time=61.357 ms
64 bytes from 151.101.130.132: seq=28 ttl=58 time=61.482 ms
64 bytes from 151.101.130.132: seq=29 ttl=58 time=61.591 ms
64 bytes from 151.101.130.132: seq=30 ttl=58 time=61.902 ms
64 bytes from 151.101.130.132: seq=31 ttl=58 time=61.546 ms
64 bytes from 151.101.130.132: seq=32 ttl=58 time=61.779 ms
64 bytes from 151.101.130.132: seq=33 ttl=58 time=61.619 ms
64 bytes from 151.101.130.132: seq=34 ttl=58 time=61.899 ms
64 bytes from 151.101.130.132: seq=35 ttl=58 time=61.520 ms
^C
--- downloads.openwrt.org ping statistics ---
36 packets transmitted, 36 packets received, 0% packet loss
round-trip min/avg/max = 61.357/61.905/72.394 ms
and attempted to use opkg update again
root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.gz
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.gz
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Collected errors:
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/targets/ramips/mt76x8/packages/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.3/packages/mipsel_24kc/luci/Packages.gz, wget returned 4.
* opkg_download: Check your network settings and connectivity.
wget also returns 4 if the dns server does not reply.
my last advise would be changing the dns server because opkg is calling for name resolution every time whenever the link is hit. may be some dns server is not responding correctly all the time. ( this happens when using 3rd party dns server from isp)
Are you experiencing any other connectivity issues? Considering the fact that some files are fetched and some not, and that the failed files are (mostly) different every time, this looks a lot like Internet connectivity issue. Normally last ~1000 DNS queries should be cached by dnsmasq, so I'm not sure how DNS could be blamed for this (but maybe there is something I don't know here).