Update list fails to download packages

2024-01-30T23:38:00Z
I have a Linksys WRT3200ACM router that has as its OS OpenWrt-N3, firmware version 23.05.2. The router is not behind a NAT device and has a WAN static IP address. I cannot update packages list in the System > Software section of the LuCI GUI. It’s apparent from the package manager log that the router cannot connect to the URL for the downloads. I first noticed this when I tried to download a package using an SSH command which failed. A recent change on the router was downloading and installing OpenVPN server as delineated in “[OpenWrt Wiki] OpenVPN server”. OpenVPN is working fine. I also configured the WIFI on the router which also works fine. Disabling the WIFI did not solve the download problem. Previously the update list worked. I can get on and surf the internet through the router without a problem, but the router can’t seem to contact the URL for the downloads. I’ve seen this problem discussed on the forum by others, but they weren’t helpful. The log is as follows:

**Executing package manager**

Downloading https://downloads.openwrt.org/releases/23.05.2/targets/mvebu/cortexa9/packages/Packages.gz

*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.2/targets/mvebu/cortexa9/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/base/Packages.gz

*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/base/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/luci/Packages.gz

*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/luci/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/packages/Packages.gz

*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/routing/Packages.gz

*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/routing/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/telephony/Packages.gz

*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.2/packages/arm_cortex-a9_vfpv3-d16/telephony/Packages.gz

**Errors**

Failed to send request: Operation not permitted

Failed to send request: Operation not permitted

Failed to send request: Operation not permitted

Failed to send request: Operation not permitted

Failed to send request: Operation not permitted

Failed to send request: Operation not permitted

Collected errors:

* opkg_download: Failed to download https://downloads.openwrt.org/releases/23.05.2/targets/mvebu/cortexa9/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.2/packages/arm_cortex-a9_vfpv3-d16/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.2/packages/arm_cortex-a9_vfpv3-d16/luci/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.2/packages/arm_cortex-a9_vfpv3-d16/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.2/packages/arm_cortex-a9_vfpv3-d16/routing/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.2/packages/arm_cortex-a9_vfpv3-d16/telephony/Packages.gz, wget returned 4.

* opkg_download: Check your network settings and connectivity.

The *opkg update* command failed with code 6.

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
cat /etc/config/network

And also, see this:

1 Like

That "failed to send" makes me to think about a routing problem. Opkg (using wget or uclient-fetch as a small wget replacement utility) tries to use an interface that declines the packets.

Might be the VPN that you installed. Something wrong with it's routing?

Or it might be some like "we have IPv6 address resolution (DNS), but no actual IPv6 connectivity." Which makes uclient-fetch to fail. That might be helped by installing the full GNU wget.

In general, check that plain "wget" is able to download something when used from router's SSH console.

Ps.
What the heck is "OpenWrt-N3" ?

2 Likes
root@OpenWrt-N3:~# ubus call system board
{
        "kernel": "5.15.137",
        "hostname": "OpenWrt-N3",
        "system": "ARMv7 Processor rev 1 (v7l)",
        "model": "Linksys WRT3200ACM",
        "board_name": "linksys,wrt3200acm",
        "rootfs_type": "squashfs",
        "release": {
                "distribution": "OpenWrt",
                "version": "23.05.2",
                "revision": "r23630-842932a63d",
                "target": "mvebu/cortexa9",
                "description": "OpenWrt 23.05.2 r23630-842932a63d"
        }

root@OpenWrt-N3:~# cat /etc/config/network

config interface 'loopback'
        option device 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd05:9fdb:7368::/48'

config device
        option name 'br-lan'
        option type 'bridge'
        list ports 'lan1'
        list ports 'lan2'
        list ports 'lan3'
        list ports 'lan4'

config interface 'lan'
        option device 'br-lan'
        option proto 'static'
        option ipaddr '192.168.3.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config device
        option name 'wan'
        option macaddr '-------'

config interface 'wan'
        option device 'wan'
        option proto 'static'
        option gateway '-.-.-.-'
        option ipaddr '-.-.-.-'
        option broadcast '-.-.-.-'
        option netmask '255.255.255.252'

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'
        option reqaddress 'try'
        option reqprefix 'auto'

I followed the directions here: https://openwrt.org/docs/guide-user/services/vpn/openvpn/server. I'm looking in the firewall section and if there is a routing error, I don't see it, but correct me if I'm wrong.

In general, check that plain "wget" is able to download something when used from router's SSH console.

I tried this, but maybe I'm not putting in the correct URL or my formatting is incorrect. Also I use SSH on the Windows' DOS Command Prompt. My LuCI doesn't have an SSH console, unless you connect to one through a serial cable.

root@OpenWrt-N3:~# wget https://downloads.openwrt.org/strongswan-default
Downloading 'https://downloads.openwrt.org/strongswan-default'
Failed to send request: Operation not permitted

Or it might be some like "we have IPv6 address resolution (DNS), but no actual IPv6 connectivity." Which makes uclient-fetch to fail. That might be helped by installing the full GNU wget.

My ISP doesn't support IPv6 and my local network doesn't use it. DHCP and DNS are operated by a server on the network, not the router. I could make the DHCP operational for IPv6 by creating a scope. Installing the full GNU wget - I can't install anything.

Ping 1.1.1.1

If you get a ping change the DNS in LuCI to 1.1.1.1 and try again.

Yeah the command would naturally fail due to that nonexistent URL, but the request does not even leave the router. The same not permitted error.
Pretty much proves that you have a routing problem. Nothing to do with opkg itself.
Your wan netmask is really narrow, only 2 bits allowed. Some point-to-point wan?

Sure you can.
Download the correct .ipk file from download server to your PC, and then transfer it to router using e.g. scp, winscp, whatever... And use opkg to install the .ipk from command line.

The solution is to put a DNS server address in the router. For those who may encounter a similar problem, this is exactly what I did: In LuCI at Network > Interfaces > WAN edit > Advanced Setting > insert 1.1.1.1 in the "Use custom DNS servers" slot. Thank you LilRedDog and everyone else who spent your valuable time helping me with this. Strangely, this problem is just recent, and I don't think there was ever a DNS server address in the router. By the way, pinging 1.1.1.1 worked before and after the address was inserted.

That was just for diagnostics.

It is always a DNS issue.
Sometimes the time gets so far out of sync with real time, the DNSs just drops the request so the time has to be synced by the browser. (Well, occasionally it is a fork of OpenWrt or a person is in a country that does not want specific packages that patch security issues)

Glad to help!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.