Closed jow- closed 4 years ago
I did opkg install uwsgi-cgi-luci-support --force-reinstall
but it didn't regenerate luci_uwsgi.conf. Is it supposed to?
Also tried
opkg remove uwsgi-cgi-luci-support --force-depends
opkg install uwsgi-cgi-luci-support
FWIW - This is on Ubiquiti ER-X. I started from http://downloads.openwrt.org/releases/19.07.0/targets/ramips/mt7621/openwrt-19.07.0-ramips-mt7621-ubnt-erx-squashfs-sysupgrade.bin
you need to reset nginx luci package not uwsgi....
ah ok. Reinstalled nginx-mod-luci-ssl
. Still getting 405 after restarting nginx and uwsgi.
luci_uwsgi.conf is same as above but first location is back to /cgi-bin/luci
mhhh... let me check something...
ok bad... The fixed config is not part of the 19.07 release...
For a quick fix use this file https://github.com/openwrt/packages/blob/master/net/nginx/files-luci-support/luci_uwsgi.conf
Will make a backport request
Where does uwsgi_params
need come from?
2020/01/31 22:01:19 [emerg] 1956#0: open() "/etc/nginx/uwsgi_params" failed (2: No such file or directory) in /etc/nginx/luci_uwsgi.conf:3
create one and put this
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
uwsgi_param DOCUMENT_ROOT $document_root;
uwsgi_param SERVER_PROTOCOL $server_protocol;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_ADDR $server_addr;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;
Sorry, a bit out of my depth here... now getting this when trying to get to the Luci GUI in general:
==> /var/log/nginx/error.log <==
2020/01/31 22:07:29 [crit] 1174#0: *8 connect() to unix:////var/run/luci-webui.socket failed (2: No such file or directory) while connecting to upstream, client: 192.168.1.144, server: localhost,
request: "GET /cgi-bin/luci/ HTTP/1.1", upstream: "uwsgi://unix:////var/run/luci-webui.socket:", host: "192.168.1.1", referrer: "https://192.168.1.1/"
@nateevans sorry also uwsgi is broken. Is a problem if you wait 1 day so that the updated package can be merged ?
no problem, thanks for the help
@nateevans commits got merged... can you try update the package with --force-maintainer --force-reinstall ?
@Ansuel getting some conflicts, can I safely remove the conflicting packages?
root@OpenWrt:/etc/nginx# opkg upgrade nginx-mod-luci-ssl --force-maintainer --force-reinstall
Upgrading nginx-mod-luci-ssl on root from 1.16.1-1 to 1.17.7-2...
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/mipsel_24kc/packages/nginx-mod-luci-ssl_1.17.7-2_mipsel_24kc.ipk
Installing uwsgi (2.0.18-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.0/packages/mipsel_24kc/packages/uwsgi_2.0.18-1_mipsel_24kc.ipk
Collected errors:
* check_data_file_clashes: Package uwsgi wants to install file /etc/init.d/uwsgi
But that file is already provided by package * uwsgi-cgi-luci-support
* check_data_file_clashes: Package uwsgi wants to install file /usr/sbin/uwsgi
But that file is already provided by package * uwsgi-cgi
remove uwsgi-cgi
Excellent! That does it. 🎉
Ended up doing:
opkg remove uwsgi-cgi --force-removal-of-dependent-packages
then:
opkg install nginx-mod-luci-ssl --force-maintainer --force-reinstall
Luci GUI working properly now, Backup > Generate Archive works
Thank you for your help
thank you for alert me that it was broken in 19.x
Should we make the upgrade more smoother by re-adding the old package as dummy installing the new ones? (I made a draft PR for this)
PS: opkg remove --force-depends uwsgi-cgi uwsgi-cgi-luci-support && opkg install uwsgi-luci-support
should work anytime (with and without that PR)
@peter-stadler i don't know... I think readd the uwsgi-cgi package would give more confusion since we will have uwsgi AND uwsgi-cgi.
This is really a specific case. New user won't have problem and users that have this problem can quickly use google and find this exact issue and how to solve this. Also also if you update to 19.x from 18.x you would never experience this issue since the package will be reset on flash of the new firmware.
I see, that sounds good (closing the PR) :-)
Maintainer: @Ansuel Environment: -
Description: The
uwsgi-cgi-luci-support
package is unable to execute CGI helpers in/www/cgi-bin/
, breaking firmware upload and backup download on LuCI master.Please refer to https://github.com/openwrt/luci/issues/3140 for a reproducer.