Hello,
i've been using for a while luci on nginx-ssl with no problems at all, since the great @Ansuel work on the topic .
But to be honest i had not updated my system for a long time. so today i jumped from r9945 to r12138 (i build @hnyman builds with some custom packages, but the base is its one)
now, the bad news. nginx works, but luci does not. i get a nginx "bad gateway" error in the browser, where the error file says:
connect() to unix:////var/run/uwsgi.sock failed (2: No such file or directory) while connecting to upstream , client: 192.168.1.182, server: , request: "GET /cgi-bin/luci/ HTTP/1.1", upstream: "uwsgi://unix:////var/run/uwsgi.sock:", host: "xxx", referrer: "http://xxx/"
it seems uwsgi is not running at all.
i'd never seen anything like this. did i miss something?
thanks a lot
Ansuel
January 27, 2020, 4:48pm
2
can you post here your backup file list?
Also can you post here your uwsgi conf ?
i can find these config files for uwsgi, is anything missing?
what do you mean with "backup file list"?
thanks!
luci_uwsgi.conf
location /cgi-bin/luci/ {
index index.html;
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length if_not_empty;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
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;
uwsgi_modifier1 9;
uwsgi_pass unix:////var/run/uwsgi.sock;
}
location /luci-static {
}
location /ubus {
ubus_interpreter;
ubus_socket_path /var/run/ubus.sock;
ubus_parallel_req 2;
}
uwsgi_params
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 REQUEST_SCHEME $scheme;
uwsgi_param HTTPS $https if_not_empty;
uwsgi_param REMOTE_ADDR $remote_addr;
uwsgi_param REMOTE_PORT $remote_port;
uwsgi_param SERVER_PORT $server_port;
uwsgi_param SERVER_NAME $server_name;
emperor.ini
[uwsgi]
strict = true
pidfile = /var/run/uwsgi.pid
emperor = /etc/uwsgi/vassals/*.ini
early-emperor = true
vacuum = true
emperor-on-demand-directory = /var/run/
emperor-required-heartbeat = 99
vassal-set = die-on-idle=true
Ansuel
January 27, 2020, 5:06pm
4
Yes you need to reset the luci_uwsgi.conf file
just
cp /rom/etc/nginx/luci_uwsgi.conf /etc/nginx/luci_uwsgi.conf
and
/etc/init.d/nginx restart
Ansuel
January 27, 2020, 5:21pm
6
post the content of /rom/etc/nginx/luci_uwsgi.conf
also do you have files in /etc/uwsgi/vassals/
thanks a lot, i really can't understand the content
maybe only that cgi = /www/ seems strange..
/rom/etc/nginx/luci_uwsgi.conf
location /cgi-bin/luci {
index index.html;
uwsgi_param QUERY_STRING $query_string;
uwsgi_param REQUEST_METHOD $request_method;
uwsgi_param CONTENT_TYPE $content_type;
uwsgi_param CONTENT_LENGTH $content_length if_not_empty;
uwsgi_param REQUEST_URI $request_uri;
uwsgi_param PATH_INFO $document_uri;
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;
uwsgi_modifier1 9;
uwsgi_pass unix:////var/run/uwsgi.sock;
}
location /luci-static {
}
/etc/uwsgi/vassals/luci-cgi_io.ini
[uwsgi]
strict = true
if-not-env = UWSGI_EMPEROR_FD
socket = /var/run/luci-cgi_io.socket
chmod-socket = 666
cheap = true
end-if =
plugin = cgi
cgi-mode = true
cgi = /www/
chdir = /usr/lib/lua/luci/
buffer-size = 10000
reload-mercy = 8
max-requests = 2000
limit-as = 1000
reload-on-as = 256
reload-on-rss = 192
no-orphans = true
post-buffering = 8192
socket-timeout = 120
thunder-lock = true
plugin = syslog
disable-logging = true
req-logger = syslog:uwsgi-luci-cgi_io
log-format=%(method) %(uri) => return %(status) (%(rsize) bytes in %(msecs) ms)
chmod-socket = 666
cgi-safe = /usr/libexec/cgi-io
cgi-dontresolve = true
cgi-close-stdin-on-eof = true
cheap = true
idle = 360
/etc/uwsgi/vassals/luci-webui.ini
[uwsgi]
strict = true
if-not-env = UWSGI_EMPEROR_FD
socket = /var/run/luci-webui.socket
chmod-socket = 666
cheap = true
end-if =
plugin = cgi
cgi-mode = true
cgi = /www/
chdir = /usr/lib/lua/luci/
buffer-size = 10000
reload-mercy = 8
max-requests = 2000
limit-as = 1000
reload-on-as = 256
reload-on-rss = 192
enable-threads = true
post-buffering = 8192
socket-timeout = 120
thunder-lock = true
plugin = syslog
logger = luci syslog:uwsgi-luci
log-route = luci luci:
disable-logging = true
req-logger = syslog:uwsgi-luci
log-format=%(method) %(uri) => return %(status) (%(rsize) bytes in %(msecs) ms)
threads = 3
processes = 3
cheaper-algo = spare
cheaper = 1
cheaper-initial = 1
cheaper-step = 1
master = true
idle = 360
Ansuel
January 27, 2020, 5:32pm
8
since you are using a custom buildroot... Are you sure you updated the feeds correctly?
You have an old file in /rom...
Pls update your feed in your buildroot and reset them if need
I suggest you to fix the problem with your buildroot
(file should be)
location /cgi-bin/luci {
index index.html;
include uwsgi_params;
uwsgi_param SERVER_ADDR $server_addr;
uwsgi_modifier1 9;
uwsgi_pass unix:////var/run/luci-webui.socket;
}
location ~ /cgi-bin/cgi-(backup|download|upload|exec) {
include uwsgi_params;
uwsgi_param SERVER_ADDR $server_addr;
uwsgi_modifier1 9;
uwsgi_pass unix:////var/run/luci-cgi_io.socket;
}
location /luci-static {
}
location /ubus {
ubus_interpreter;
ubus_socket_path /var/run/ubus.sock;
ubus_parallel_req 2;
}
damn, i started all from scratch today, how could it go wrong?
(with your content it works..)
Ansuel
January 27, 2020, 5:40pm
10
in your buildroot what you have here?
cat feeds/packages/net/nginx/files-luci-support/luci_uwsgi.conf
cat feeds/packages/net/nginx/Makefile
the conf file is correct, so it just did not get overwritten.
taking advantage of the opportunity, i edit the 70- file to avoid the conf file overwriting, is this the correct way for doing so?
thanks a lot, i'll update my image with the new conf file..
(is there also a way to periodically purge nginx access log?)
Ansuel
January 27, 2020, 6:01pm
12
mhh check nginx normal configuration. This should be solved right?
system
Closed
February 6, 2020, 6:36pm
14
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.