-
Notifications
You must be signed in to change notification settings - Fork 116
uWSGI fix for NGINX & Captive Portal (Admin Console too?) #2171
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
What owner:group & permissions do we end up with for Is this OS-dependent? (Are we Ok with that?) |
would be set by logrotate |
Finding out on Raspbian + Ubuntu 19.10 + Debian 10.2...what owner:group and permissions result...is a really good idea in the coming days! |
|
Everybody loves to trash-talk documentation, but as this converges we should verify @georgejhunt's excellent start (https://github.com/iiab/iiab/blob/master/roles/captiveportal/README.md) for new devs & new implementers in coming days... Ref: #1182 |
I pretty sure the distros have a handle on the correct routines for rotating the log files. |
|
I'm hoping @georgejhunt has time to review this in the coming 48h, but if he's travelling and that's not possible I'll try to call him (unfort not possible this morning in the end!) |
|
This PR started dealing with a permissions problem. Then enlarged into a concern for how uwsgi is initiated by captive portal (for a log permissions problem, or not). At this point there are 9 files changed. Perhaps line 52 in roles/awstats tasks/install.yml should be added to the list. I vote to merge and then test the result. It's unfortunate that we need to worry about interactions between awstats, uwsgi, captive-portal, and admin-console -- but that seems to be the nature of our steps forward. At this point, using each distro's logrotate seems like the first thing to try. |
What specifically about https://github.com/iiab/iiab/blob/master/roles/awstats/tasks/install.yml#L52-L56 ? Pasted in here...is there a reason to remove this stanza now? |
|
Is this still compatible with admin-console.ini installed in iiab-admin-console including that it runs as the {{ apache_user }} ? |
|
Both captiveportal.ini and admin-console.ini use {{ apache_user }} in their templates while /usr/share/uwsgi/conf/default.ini contains:
|
|
Just a thought, after our call a few minutes ago: |
cffb6af part of the initial PR |
|
|
an 19 09:56:59 box.lan systemd[1]: Starting Provides the IIAB Command
Server...
Jan 19 09:57:00 box.lan systemd[1]: iiab-cmdsrv.service: Can't open PID
file /run/iiab-cmdsrv.pid (ye
Jan 19 09:57:00 box.lan systemd[1]: iiab-cmdsrv.service: Supervising
process 2950 which is not our ch
Jan 19 09:57:00 box.lan systemd[1]: Started Provides the IIAB Command
Server.
Jan 19 09:57:00 box.lan IIAB-CMDSRV[2950]: IIAB-CMDSRV : Starting Command
Server
Jan 19 09:57:03 box.lan python3[3771]: ansible-setup Invoked with
gather_subset=['all'] gather_timeou
Jan 19 09:57:06 box.lan IIAB-CMDSRV[2950]: IIAB-CMDSRV : Job Minder Thread
Started
On my raspberry pi, I do not get the timeout "Failed to start".
But I'm not able to confirm that all will work. That's the job to testing
that you have been doing.
…On Mon, Jan 20, 2020 at 10:55 AM A Holt ***@***.***> wrote:
1.
@georgejhunt <https://github.com/georgejhunt> @jvonau
<https://github.com/jvonau> can you confirm output of 'systemctl
status uwsgi' looks good below?
10.8.0.70 = 161-u1804-srv-BIG-0120-PR2171 shows...
http://paste.ubuntu.com/p/5c55MgWy4J/
10.8.0.74 = 162-deb102-srv-BIG-0120-PR2171 shows...
http://paste.debian.net/1126851/
i.e. both OS's above show 3 lines of...
/usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini
/etc/uwsgi/apps-enabled/admin-console.ini --daemonize
/var/log/uwsgi/app/admin-console.log
...and both OS's also shows 3 lines of...
/usr/bin/uwsgi --ini /usr/share/uwsgi/conf/default.ini --ini
/etc/uwsgi/apps-enabled/captiveportal.ini --daemonize
/var/log/uwsgi/app/captiveportal.log
2.
Admin Console quick test: http://10.8.0.70/admin or
http://10.8.0.74/admin -> Configure -> Save Configuration works on
both above (after the 2nd reboot anyway...it seems 10.8.0.74 is a slow
enough VM that it needed that 2nd reboot for both services 'nginx' &
'uwsgi' etc to start properly!
***@***.***:~# systemctl status iiab-cmdsrv
● iiab-cmdsrv.service - Provides the IIAB Command Server
Loaded: loaded (/etc/systemd/system/iiab-cmdsrv.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Mon 2020-01-20 12:44:58 EST; 43min ago
Process: 530 ExecStart=/opt/admin/cmdsrv/iiab-cmdsrv3.py --daemon (code=killed, signal=TERM)
Jan 20 12:43:23 box.lan systemd[1]: Starting Provides the IIAB Command Server...
Jan 20 12:44:54 box.lan systemd[1]: iiab-cmdsrv.service: Start operation timed out. Terminating.
Jan 20 12:44:58 box.lan systemd[1]: iiab-cmdsrv.service: Control process exited, code=killed, status=15/TERM
Jan 20 12:44:58 box.lan systemd[1]: iiab-cmdsrv.service: Failed with result 'timeout'.
Jan 20 12:44:58 box.lan systemd[1]: Failed to start Provides the IIAB Command Server.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2171?email_source=notifications&email_token=AAOTQHG2L6WTQ4B3TXGNTBTQ6XXQTA5CNFSM4KIXEERKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJNRM4I#issuecomment-576394865>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOTQHACWCESO6TJJEEUUTTQ6XXQTANCNFSM4KIXEERA>
.
|
|
Captive Portal is not working before & after reboot of fresh install [of this PR] on RPi 4, when testing with Android 8.1 that worked with CP during prior tests over the last week. @jvonau: anything I should check here, on 10.8.0.78 = 181-rpi4-1g-lite-BIG-0120-PR2171 ? |
Last commit moved the log directory outside of uwsgi to avoid having to fiddle with permissions in /var/log/uwsgi/app which would of needed altering uwsgi's logroate file. |
|
@georgejhunt nothing is being logged to Aside/FYI: several things are being logged the |
Fixes Bug
#2168
Description of changes proposed in this pull request.
#2170
Smoke-tested in operating system.
on rpi