[Mayan EDMS: 1450] Autostart on Ubuntu 16.04?

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 1450] Autostart on Ubuntu 16.04?

Hans Fritz
I have setup Mayan on an Ubuntu 16.04 VM, as per the instructions for deploying on bare metal.

It all works fine, except that I have to manually enter `/etc/init.d/supervisor start` every time the VM boots to have Mayan running. NGINX seems fine, because it returns a 502 bad gateway until I manually start Mayan.

How do I get Mayan to automatically start after the machine is booted and NFS mounts are ready?

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 1451] Re: Autostart on Ubuntu 16.04?

gioboske

If you use Ubuntu 16.04, maybe your problem is related with this bug: https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740 (the Supervisor daemon is not automatically enabled nor started at system boot).
Check the provided link for a workaround (basically a "systemctl enable supervisor && systemctl start supervisor" after supervisor installation).

gioboske


On Sunday, November 13, 2016 at 5:47:05 PM UTC+1, Hans Fritz wrote:
I have setup Mayan on an Ubuntu 16.04 VM, as per the instructions for deploying on bare metal.

It all works fine, except that I have to manually enter `/etc/init.d/supervisor start` every time the VM boots to have Mayan running. NGINX seems fine, because it returns a 502 bad gateway until I manually start Mayan.

How do I get Mayan to automatically start after the machine is booted and NFS mounts are ready?

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 1453] Re: Autostart on Ubuntu 16.04?

Matthias Löblich
In reply to this post by Hans Fritz
Ubuntu 16.04 is using systemd so you can use this doc to start gunicorn:

http://docs.gunicorn.org/en/stable/deploy.html#systemd

This is working for me:

vi /etc/systemd/system/gunicorn.service
[Unit]
Description=gunicorn daemon
Requires=gunicorn.socket nginx.service docker-postgres_server.service docker-redis_server.service
Before=nginx.service
After=postgresql.service docker-redis_server.service


[Service]
PIDFile=/var/run/gunicorn.pid
User=mayanuser
Group=www-data
WorkingDirectory=/home/mayanuser/pythonenvs/mayan
ExecStart=/home/mayanuser/pythonenvs/mayan/bin/gunicorn --workers 5 mayan.wsgi:application
ExecReload=/bin/kill -s HUP $MAINPID
ExecStop=/bin/kill -s TERM $MAINPID
PrivateTmp=true

[Install]
WantedBy=multi-user.target
 
----------------------------------

vi /etc/systemd/system/gunicorn.socket

[Unit]
Description=gunicorn socket

[Socket]
ListenStream=/run/gunicorn/socket
#ListenStream=0.0.0.0:9000
#ListenStream=[::]:8000

[Install]
WantedBy=sockets.target


-------------------------------------------
systemctl start gunicorn
systemctl stop gunicorn

see:

http://www.dynacont.net/documentation/linux/Useful_SystemD_commands/


br
Matthias

-----------------------------------




Am Sonntag, 13. November 2016 17:47:05 UTC+1 schrieb Hans Fritz:
I have setup Mayan on an Ubuntu 16.04 VM, as per the instructions for deploying on bare metal.

It all works fine, except that I have to manually enter `/etc/init.d/supervisor start` every time the VM boots to have Mayan running. NGINX seems fine, because it returns a 502 bad gateway until I manually start Mayan.

How do I get Mayan to automatically start after the machine is booted and NFS mounts are ready?

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

[Mayan EDMS: 1465] Re: Autostart on Ubuntu 16.04?

Hans Fritz
In reply to this post by gioboske
Thank you, that worked

On Monday, 14 November 2016 04:54:33 UTC-5, gioboske wrote:

If you use Ubuntu 16.04, maybe your problem is related with this bug: <a href="https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fbugs.launchpad.net%2Fubuntu%2F%2Bsource%2Fsupervisor%2F%2Bbug%2F1594740\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH1VNN6IkFB1qpv4eIb5KvsKH_QGA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fbugs.launchpad.net%2Fubuntu%2F%2Bsource%2Fsupervisor%2F%2Bbug%2F1594740\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNH1VNN6IkFB1qpv4eIb5KvsKH_QGA&#39;;return true;">https://bugs.launchpad.net/ubuntu/+source/supervisor/+bug/1594740 (the Supervisor daemon is not automatically enabled nor started at system boot).
Check the provided link for a workaround (basically a "systemctl enable supervisor && systemctl start supervisor" after supervisor installation).

gioboske


On Sunday, November 13, 2016 at 5:47:05 PM UTC+1, Hans Fritz wrote:
I have setup Mayan on an Ubuntu 16.04 VM, as per the instructions for deploying on bare metal.

It all works fine, except that I have to manually enter `/etc/init.d/supervisor start` every time the VM boots to have Mayan running. NGINX seems fine, because it returns a 502 bad gateway until I manually start Mayan.

How do I get Mayan to automatically start after the machine is booted and NFS mounts are ready?

--

---
You received this message because you are subscribed to the Google Groups "Mayan EDMS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
For more options, visit https://groups.google.com/d/optout.