Systemd/uwsgi issue on setup-web2py-nginx-uwsgi-ubuntu.sh install

110 views
Skip to first unread message

wish...@gmail.com

unread,
Dec 8, 2016, 4:46:58 PM12/8/16
to web2py-users
Hello friends,

I started a new web2py project on ubuntu 16.04 from scratch using https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh

When trying to access the website I get 502 bad gateway errors, probably related to an uwsgi issue.
This is the systemctl output:

$ systemctl status emperor.uwsgi.service
● emperor.uwsgi.service - uWSGI Emperor
   Loaded: loaded (/etc/systemd/system/emperor.uwsgi.service; disabled; vendor preset: enabled)
   Active: inactive (dead)

If I start uwsgi manually, everything works fine, i.e.

$ systemctl start emperor.uwsgi.service
● emperor.uwsgi.service - uWSGI Emperor
   Loaded: loaded (/etc/systemd/system/emperor.uwsgi.service; disabled; vendor preset: enabled)
   Active: active (running) since Thu 2016-12-08 22:36:02 CET; 8s ago
 Main PID: 1404 (uwsgi)
   Status: "uWSGI is ready"
    Tasks: 5
   Memory: 32.5M
      CPU: 190ms
   CGroup: /system.slice/emperor.uwsgi.service
           ├─1404 /usr/local/bin/uwsgi --ini /etc/uwsgi/web2py.ini
           ├─1417 /usr/local/bin/uwsgi --ini /etc/uwsgi/web2py.ini
           ├─1418 /usr/local/bin/uwsgi --ini /etc/uwsgi/web2py.ini
           ├─1419 /usr/local/bin/uwsgi --ini /etc/uwsgi/web2py.ini
           └─1420 /usr/local/bin/uwsgi --ini /etc/uwsgi/web2py.ini



$ /usr/local/bin/uwsgi --ini /etc/uwsgi/web2py.ini   works too

Any idea, how I could fix/debug this?

Thanks & cheers
Toby

Richard Vézina

unread,
Dec 8, 2016, 4:52:50 PM12/8/16
to web2py-users
Did you take the last version of the script the one available in trunk (or github master)?

I not, try that version of the script first...


If you still experiment the same problem consider open an issue :


Thanks

Richard

--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups "web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

wish...@gmail.com

unread,
Dec 9, 2016, 3:57:48 AM12/9/16
to web2py-users
Yes, I took master..

I think, I now identified the issue: the installer starts the service on first run (see https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh#L218),
but it fails to activate it permanently. What's missing here is a

systemctl enable emperor.uwsgi.service

which would activate the uwsgi service permanently as in the older upstart versions of this script..

Shall I open an issue or send a PR? What's the preferred version?

Cheers
Toby
To unsubscribe from this group and stop receiving emails from it, send an email to web2py+un...@googlegroups.com.

Richard Vézina

unread,
Dec 9, 2016, 10:55:34 AM12/9/16
to web2py-users
Yes, you should have a look if there is no issue open, open a new issue, and if there is no PR pending correcting this issue submit one...

I fix that in my own environnement restoring script, but I guess I forgot to report this problem, but I remember having notice this issue a couples of months ago when I was working to update my environment script.

Thanks

Richard

To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscribe@googlegroups.com.

Richard Vézina

unread,
Dec 9, 2016, 10:56:44 AM12/9/16
to web2py-users
If you include the id of the issue in your commit message it will close the opened issue when your PR will be accepted.

Richard

wish...@gmail.com

unread,
Dec 9, 2016, 11:06:12 AM12/9/16
to web2py-users
Sorry, I guess I just opened a duplicate issue.. The behaviour was already reported with https://github.com/web2py/web2py/issues/1443
Reply all
Reply to author
Forward
0 new messages