I have installed OpenWRT 18.06.2 on TP-Link TL-WDR4900v1 several months ago and everything worked well until last week when i decide to update luci packages.
I updated Luci with the latest version (checked with "opkg list-upgradable") and after that luci does not work anymore, I got the following error:
# Bad Gateway
The process did not produce any response
I noticed that in the last few months you released many Luci updates, honestly I don't understand what are you doing, do you check new package releases before putting them in production?
Please help me to have Luci working againg without having to reinstall everything.
Still LuCI package updates shouldn't break it the way the OP has described. There's been very little changes in the LuCI branch for OpenWrt 18.06, none of them severe enough to entirely break the ui.
root@OpenWrt:~# /www/cgi-bin/luci
/usr/bin/lua: error loading module 'lucihttp' from file '/usr/lib/lua/lucihttp.so':
Error loading shared library /usr/lib/lua/lucihttp.so: Exec format error
stack traceback:
[C]: ?
[C]: in function 'require'
/usr/lib/lua/luci/util.lua:13: in main chunk
[C]: in function 'require'
/usr/lib/lua/luci/config.lua:4: in main chunk
[C]: in function 'require'
/usr/lib/lua/luci/cacheloader.lua:5: in main chunk
[C]: in function 'require'
/www/cgi-bin/luci:2: in main chunk
[C]: ?
I removed all luci packages one by one (opkg remove ....)
deleted /usr/lib/lua/ directory
deleted /etc/config/luci file
reinstalled luci with this option: opkg install --force-maintainer luci
then I manually copied from /rom to /overlay the following files:
/usr/lib/lua/lucihttp.so
/usr/lib/lua/iwinfo.so
/usr/lib/lua/nixio.so
/usr/lib/lua/ubus.so
/usr/lib/liblua.so.5.1.5
/usr/lib/liblucihttp.so
now it works
Please pay more attention when you coders upgrade any package, also put a big warning sign "do not upgrade!" in the main openwrt page, not all can daily read the forum to discover that upgrade should not be done. I didn't know it,
just to be sure I checked the usb dongle (new) I'm using as /overlay for defective sectors,
there are no r/w errors.
Also dmesg does not report any error.
So I suppose there is something wrong with the luci upgrade.
just to be clear, I did not upgrade Openwrt from 18.06.x to 18.06.2
I launched "opkg update",
verified the packages upgradable with
"opkg list-upgradable"
and then launched "opkg install luci-xxxxxx",
this is the way I updated the luci packages.
Zero-byte files to me sounds more like a filesystem related issue (missing sync, bad journal recovery) or some other odd things occuring during the opkg unpack stage (OOM?).
There are definitely no valid, installable .ipk archives containing zero-byte files on the download servers. In case of a repo failure the package files would be either missing completely or be zero-length themselves which would render them invalid due to checksum mismatches.
Thanks a lot for your solution !
I have fixed my webpage for "http://192.168.1.1/cgi-bin/luci"
it's have the same problem with your situation # Bad Gateway
The process did not produce any response
I also copy from the worked router directory to overlay the files
Please reference to my picture