Openwrt 23.05.4 opkg update fails

Hi,

I keep getting this error when trying to update the package lists for thr web gui. I can download a file from https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/base/Packages.gz in my web browser, so it is not network connectivity.

I have got this installed on a TPLink RE650 running LuCI openwrt-23.05 branch (git-24.086.45142-09d5a38) / OpenWrt 23.05.4 (r24012-d8dd03c46f)

Downloading
https://downloads.openwrt.org/releases/23.05.4/targets/ramips/mt7621/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.4/targets/ramips/mt7621/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/base/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/base/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/luci/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/luci/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/packages/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/packages/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/routing/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/routing/Packages.gz

Downloading https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/telephony/Packages.gz
*** Failed to download the package list from https://downloads.openwrt.org/releases/23.05.4/packages/mipsel_24kc/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.4/targets/ramips/mt7621/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.4/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.4/packages/mipsel_24kc/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.4/packages/mipsel_24kc/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.4/packages/mipsel_24kc/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.4/packages/mipsel_24kc/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.
The opkg update command failed with code 6.

I'm guessing the above statement is based on testing from your computer...

The above states otherwise, but this is specifically for the RE650 -- its configuration and/or connectivity is not correct.

I'm guessing you're using this as a bridged AP? If so, in theory you set the IP address (static IP) such that it is in the correct subnet of your upstream network and not conflicting with any other devices on your network or the DHCP pool, correct?

If the above is correct, you probably don't have the gateway and/or DNS configured properly. Those are necessary for the RE650 to be able to connect to non-local devices (i.e. the internet).

If that doesn't solve the issue, let's review your config.

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
cat /etc/config/wireless
cat /etc/config/dhcp
cat /etc/config/firewall
1 Like

Hi Peter,

It is set up like this connected to an ER-X-SFTP with vlans truncked down to it. er-x does the dhcp and everything else.

# ubus call system board
{
	"kernel": "5.15.162",
	"hostname": "xxxx",
	"system": "MediaTek MT7621 ver:1 eco:3",
	"model": "TP-Link RE650 v2",
	"board_name": "tplink,re650-v2",
	"rootfs_type": "squashfs",
	"release": {
		"distribution": "OpenWrt",
		"version": "23.05.4",
		"revision": "r24012-d8dd03c46f",
		"target": "ramips/mt7621",
		"description": "OpenWrt 23.05.4 r24012-d8dd03c46f"
	}
}
$ cat 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 'fdb5:d374:7d45::/48'
	option packet_steering '1'
config device
	option name 'br-lan'
	option type 'bridge'
	list ports 'lan'
config bridge-vlan
	option device 'br-lan'
	option vlan '100'
	list ports 'lan:u*'
config bridge-vlan
	option device 'br-lan'
	option vlan '200'
	list ports 'lan:t'
config bridge-vlan
	option device 'br-lan'
	option vlan '300'
	list ports 'lan:t'
config bridge-vlan
	option device 'br-lan'
	option vlan '400'
	list ports 'lan:t'
config interface 'lan'
	option device 'br-lan.100'
	option proto 'static'
	option ipaddr '10.210.10.3'
	option netmask '255.255.255.0'
	option ip6assign '60'
config interface 'vlan200'
	option device 'br-lan.200'
	option proto 'none'
config interface 'vlan300'
	option device 'br-lan.300'
	option proto 'none'
config interface 'vlan400'
	option device 'br-lan.400'
	option proto 'none'
$ awk NF firewall |grep -v ^#
config defaults
	option syn_flood	1
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
config zone
	option name		lan
	list   network		'lan'
	option input		ACCEPT
	option output		ACCEPT
	option forward		ACCEPT
config zone
	option name		wan
	list   network		'wan'
	list   network		'wan6'
	option input		REJECT
	option output		ACCEPT
	option forward		REJECT
	option masq		1
	option mtu_fix		1
config forwarding
	option src		lan
	option dest		wan
config rule
	option name		Allow-DHCP-Renew
	option src		wan
	option proto		udp
	option dest_port	68
	option target		ACCEPT
	option family		ipv4
config rule
	option name		Allow-Ping
	option src		wan
	option proto		icmp
	option icmp_type	echo-request
	option family		ipv4
	option target		ACCEPT
config rule
	option name		Allow-IGMP
	option src		wan
	option proto		igmp
	option family		ipv4
	option target		ACCEPT
config rule
	option name		Allow-DHCPv6
	option src		wan
	option proto		udp
	option dest_port	546
	option family		ipv6
	option target		ACCEPT
config rule
	option name		Allow-MLD
	option src		wan
	option proto		icmp
	option src_ip		fe80::/10
	list icmp_type		'130/0'
	list icmp_type		'131/0'
	list icmp_type		'132/0'
	list icmp_type		'143/0'
	option family		ipv6
	option target		ACCEPT
config rule
	option name		Allow-ICMPv6-Input
	option src		wan
	option proto	icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	list icmp_type		router-solicitation
	list icmp_type		neighbour-solicitation
	list icmp_type		router-advertisement
	list icmp_type		neighbour-advertisement
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT
config rule
	option name		Allow-ICMPv6-Forward
	option src		wan
	option dest		*
	option proto		icmp
	list icmp_type		echo-request
	list icmp_type		echo-reply
	list icmp_type		destination-unreachable
	list icmp_type		packet-too-big
	list icmp_type		time-exceeded
	list icmp_type		bad-header
	list icmp_type		unknown-header-type
	option limit		1000/sec
	option family		ipv6
	option target		ACCEPT
config rule
	option name		Allow-IPSec-ESP
	option src		wan
	option dest		lan
	option proto		esp
	option target		ACCEPT
config rule
	option name		Allow-ISAKMP
	option src		wan
	option dest		lan
	option dest_port	500
	option proto		udp
	option target		ACCEPT
$ awk NF wireless |grep -v ^#
config wifi-device 'radio0'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0'
	option channel '140'
	option band '5g'
	option htmode 'VHT80'
	option country 'PA'
	option cell_density '0'
config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid '75g'
	option encryption 'psk2+ccmp'
	option key 'xxxxx'
config wifi-device 'radio1'
	option type 'mac80211'
	option path '1e140000.pcie/pci0000:00/0000:00:01.0/0000:02:00.0'
	option channel '9'
	option band '2g'
	option htmode 'HT40'
	option country 'PA'
	option cell_density '0'
config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid '72g'
	option encryption 'psk2+ccmp'
	option key 'xxxxx'
config wifi-iface 'wifinet200_radio0'
	option device 'radio0'
	option network 'vlan200'
	option mode 'ap'
	option ssid '25g'
	option encryption 'sae-mixed'
	option key 'xxxxxxxxx'
config wifi-iface 'wifinet200_radio1'
	option device 'radio1'
	option network 'vlan200'
	option mode 'ap'
	option ssid '22g'
	option encryption 'sae-mixed'
	option key 'xxxxxxxxx'
config wifi-iface 'wifinet300_radio0'
	option device 'radio0'
	option network 'vlan300'
	option mode 'ap'
	option ssid '35g'
	option encryption 'sae-mixed'
	option key 'XXXXX'
config wifi-iface 'wifinet300_radio1'
	option device 'radio1'
	option network 'vlan300'
	option mode 'ap'
	option ssid '32'
	option encryption 'sae-mixed'
	option key 'XXXXX'
$ awk NF dhcp|grep -v ^#
config dnsmasq
	option domainneeded '1'
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option local '/lan/'
	option domain 'lan'
	option expandhosts '1'
	option cachesize '1000'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
	option localservice '1'
	option ednspacket_max '1232'
	option logfacility 'DAEMON'
	option quietdhcp '1'
config dhcp 'lan'
	option interface 'lan'
	option start '100'
	option limit '150'
	option leasetime '12h'
	option dhcpv4 'server'
	option dhcpv6 'server'
	option ra 'server'
	list ra_flags 'managed-config'
	list ra_flags 'other-config'
	option ignore '1'
config dhcp 'wan'
	option interface 'wan'
	option ignore '1'
config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'
	option loglevel '4'

Add the following:

	option gateway '10.210.10.1'
	list dns '10.210.10.1'

(If the er-x address is not the above, adapt as necessary).

Reboot and try again.

2 Likes

Fantastic. That did the job!

Thank-you Peter.

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