Skip to content
Contents
GuidesOpenWrt

uclient-fetch --spider exits with 4. Can OpenWrt still download the file?

If a router update stops at the existence check, compare the probe and a normal download on the router itself. Another computer’s wget may use a different method or proxy.

If a router update stops at the existence check, compare the probe and a normal download on the router itself. Another computer’s wget may use a different method or proxy.

Compare two requests to the same small file

Replace the example URL with a small, known file you control. Record the version with apk list --installed uclient-fetch on 25.12. If a script calls wget, check which program runs. Read each status immediately. The second request transfers the body and discards it.

url='https://example.org/test.txt'
uclient-fetch --spider "$url"
echo "spider_rc=$?"
uclient-fetch -O /dev/null "$url"
echo "get_rc=$?"

uclient-fetch · HTTP 404 · 8

In this isolated OpenWrt 25.12.6 HTTP test the June 2026 build returned 0 for both requests to the existing file. The probe showed zero bytes and GET received six. A missing path produced HTTP 404 and exit 8 twice. This run did not reproduce exit 4.

Decide whether the update can proceed

uclient-fetch a1531e89 · exit 4

  • Connection failed — The connection failed. Check the destination, port and reachability from this network.
  • Connection timed out — The request timed out. Compare elapsed time with the configured timeout and server response.
  • Connection reset prematurely — The connection ended before the client marked the response complete. Compare HEAD and GET, server logs and client versions. This line alone cannot identify which side ended the exchange.

If only the probe fails, compare HEAD and GET handling, redirects and final status. If both fail, record the exact error, version and IP family. Check DNS, connectivity, TLS and HTTP separately. If both succeed but the scheduled job fails, check its executable, permissions, space and destination.

For a small GET-only resource, download to a temporary file and verify contents and checksum before replacing anything. A login page can also return success. Test one good path and one missing path. The previous working file must remain readable after failure. Stable Releases vs SNAPSHOT: How They Affect an OpenWrt Purchase

Explore hardware

Comments