[Solved] OKPG Update Fail! (wget returned 4)

Hi,

I am getting the error below, I able to ping downloads.openwrt.org via ssh from openwrt, but can't update. I am using my router as access point.

root@ap:~# vim /etc/config/network
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1.1'
        option proto 'static'
        option netmask '255.255.255.0'
        option gateway '192.168.40.1'
        option ipaddr '192.168.40.2'
        option broadcast '192.168.40.255'
        option delegate '0'
        option ipv6 '0'
        list dns '192.168.40.1'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '6t 4 3 2 1'
        option vid '1'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 5'
        option vid '2'

config switch_vlan
        option device 'switch0'
        option vlan '3'
        option vid '39'
        option ports '0t 4t'

config interface 'GuestOverVLAN'
        option ifname 'eth0.39'
        option proto 'static'
        option gateway '192.168.39.1'
        option ipaddr '192.168.39.2'
        list dns '192.168.39.1'
        option type 'bridge'
        option delegate '0'
        option broadcast '192.168.39.255'
        option netmask '255.255.255.0'

config switch_vlan
        option device 'switch0'
        option vlan '4'
        option ports '0t 4t'
        option vid '13'

config interface 'IOT'
        option ifname 'eth0.13'
        option proto 'static'
        option broadcast '192.168.13.254'
        option ipaddr '192.168.13.2'
        list dns '192.168.13.1'
        option netmask '255.255.255.0'
        option delegate '0'
        option force_link '0'
        option gateway '192.168.13.1'
        option type 'bridge'

        option device 'switch0'
        option vlan '4'
        option ports '0t 4t'
        option vid '13'

config interface 'IOT'
        option ifname 'eth0.13'
        option proto 'static'
        option broadcast '192.168.13.254'
        option ipaddr '192.168.13.2'
        list dns '192.168.13.1'
        option netmask '255.255.255.0'
        option delegate '0'
        option force_link '0'
        option gateway '192.168.13.1'
        option type 'bridge'
Downloading http://downloads.openwrt.org/releases/19.07.7/targets/ipq806x/generic/packages/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/releases/19.07.7/targets/ipq806x/generic/packages/Packages.gz

Downloading http://downloads.openwrt.org/releases/19.07.7/targets/ipq806x/generic/kmods/4.14.221-1-0894164cab0effc42201a29fec8ce33f/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/releases/19.07.7/targets/ipq806x/generic/kmods/4.14.221-1-0894164cab0effc42201a29fec8ce33f/Packages.gz

Downloading http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/base/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/base/Packages.gz

Downloading http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/freifunk/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/freifunk/Packages.gz

Downloading http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/luci/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/luci/Packages.gz

Downloading http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/packages/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/packages/Packages.gz

Downloading http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/routing/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/routing/Packages.gz

Downloading http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/telephony/Packages.gz
*** Failed to download the package list from http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/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
Failed to send request: Operation not permitted
Failed to send request: Operation not permitted
Collected errors:
 * opkg_download: Failed to download http://downloads.openwrt.org/releases/19.07.7/targets/ipq806x/generic/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/releases/19.07.7/targets/ipq806x/generic/kmods/4.14.221-1-0894164cab0effc42201a29fec8ce33f/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/base/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/freifunk/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/luci/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/packages/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/routing/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

 * opkg_download: Failed to download http://downloads.openwrt.org/releases/19.07.7/packages/arm_cortex-a15_neon-vfpv4/telephony/Packages.gz, wget returned 4.
 * opkg_download: Check your network settings and connectivity.

You do not have proper internet connectivity...

Typical error in a secondary router is that you have set a fixed IP, but you have not set the DNS and gateway options to point to the primary router.

Alternatively, this might suggest some protocol errors, e.g. disable ipv6, but ipv6 addressing is enabled, or something like that:

EDIT:
you edited your message while I was writing, so my guess right now would be the disabled IPv6.

1 Like

I posted my network config above, can you see. If something wrong?
Thanks,

you edited your message while I was writing, so my guess right now would be the disabled IPv6.

You possibly have IPv6 DNS enabled, and the download tools (uclient-fetch, wget, ...) prefer IPv6, but then you have disabled the actual IPv6 connectivity, and the fallback does not work.

I think that uclient-fetch has no proper fallback from IPv6 to IPv4, but the full GNU wget has.
You might install the full wget manually.

EDIT: you might read: Unable to get opkg list update after sysupgrade (ipv6 connectivity)

1 Like

You have defined multiple gateways, i.e. multiple default routes. Your router doesn't know which is the correct route to take.

Pick one.

2 Likes

ReEnabled IPV6, it works now.

1 Like

If your problem is solved, please consider marking this topic as [Solved]. See How to mark a topic as [Solved] for a short how-to.

You edited the title previous, so I cannot make edit to title to mark as solved .

Thanks,

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