Hi!

At the moment I solved applying a debian daemon script template[1] I found with a simplified run script such like the one here under (saved in some runscript.sh file):

   NAME=web2py
   PIDDIR=/var/run/$NAME
   PIDFILE=$PIDDIR/$NAME.pid
   /path/to/bin/python /path/to/web2py/web2py.py -a "<recycle>"
   --pid_filename=$PIDFILE -i 127.0.0.1 -p 8000

So I have substituted as required in the documentation recurrences of following tokens:

 * |<NAME>| = |web2py|
 * |<DESCRIPTION>| = Web framework
 * |<COMMAND>| = /path/to/runscript.sh
 * |<USER>| = myuser

My suspect is that there is some incompatibility of the official daemon script [2] with my Ubuntu 18.6 LTS environment, I would like to help in debugging the script if possible but I won't be able to find any error log related to the daemon failure... Let me know how can I would be of any help.

[1] https://gist.github.com/naholyr/4275302

[2] https://github.com/web2py/web2py/blob/R-2.18.3/scripts/web2py.ubuntu.sh

Best regards

    Manuele


On 21/01/20 16:29, Manuele Pesenti wrote:

On 21/01/20 15:10, Manuele Pesenti wrote:

So I guess I have to try using the second web2py (R-2.18 under python3 virtualenv) instance through mod_proxy... right?

So I'm trying to run a web2py (R-2.18.3) instance for deploy purposes using apache mod_proxy.

First I want to install the necessary daemon... I'm following the documentation[1] but without success, it seams the daemon is not running after starting it. How can I log errors? I cannot find them, this are the only information I have found:

    # service web2py218 stop
    # service web2py218 start
    # service web2py218 status
    ● web2py218.service - LSB: web2py initscript
       Loaded: loaded (/etc/init.d/web2py218; generated)
       Active: active (exited) since Tue 2020-01-21 16:20:46 CET; 3s ago
         Docs: man:systemd-sysv-generator(8)
      Process: 31480 ExecStop=/etc/init.d/web2py218 stop (code=exited,
    status=1/FAILURE)
      Process: 31514 ExecStart=/etc/init.d/web2py218 start
    (code=exited, status=0/SUCCESS)

    Jan 21 16:20:46 Ubuntu-1804-bionic-64-nextcloud systemd[1]:
    Starting LSB: web2py initscript...
    Jan 21 16:20:46 Ubuntu-1804-bionic-64-nextcloud web2py218[31514]: 
    * Starting Web Framework web2py218
    Jan 21 16:20:46 Ubuntu-1804-bionic-64-nextcloud
    web2py218[31514]:    ...done.
    Jan 21 16:20:46 Ubuntu-1804-bionic-64-nextcloud systemd[1]:
    Started LSB: web2py initscript.

When I try to access the web2py instance through ssh tunneling it says:

    channel 3: open failed: connect failed: Connection refused

Looking in syslog I read:

    # tail /var/log/syslog
    Jan 21 16:20:41 Ubuntu-1804-bionic-64-nextcloud web2py218[31480]: 
    * Stopping Web Framework web2py218
    Jan 21 16:20:41 Ubuntu-1804-bionic-64-nextcloud web2py218[31480]:
    start-stop-daemon: warning: failed to kill 31269: No such process
    Jan 21 16:20:41 Ubuntu-1804-bionic-64-nextcloud
    web2py218[31480]:    ...done.
    Jan 21 16:20:41 Ubuntu-1804-bionic-64-nextcloud systemd[1]:
    web2py218.service: Control process exited, code=exited status=1
    Jan 21 16:20:41 Ubuntu-1804-bionic-64-nextcloud systemd[1]:
    web2py218.service: Failed with result 'exit-code'.
    Jan 21 16:20:41 Ubuntu-1804-bionic-64-nextcloud systemd[1]:
    Stopped LSB: web2py initscript.
    Jan 21 16:20:46 Ubuntu-1804-bionic-64-nextcloud systemd[1]:
    Starting LSB: web2py initscript...
    Jan 21 16:20:46 Ubuntu-1804-bionic-64-nextcloud web2py218[31514]: 
    * Starting Web Framework web2py218
    Jan 21 16:20:46 Ubuntu-1804-bionic-64-nextcloud
    web2py218[31514]:    ...done.
    Jan 21 16:20:46 Ubuntu-1804-bionic-64-nextcloud systemd[1]:
    Started LSB: web2py initscript.

This is my script version: http://paste.debian.net/hidden/e3917c71/

Thank you for any help.

Best regards

    Manuele

[1] http://web2py.com/books/default/chapter/29/13/deployment-recipes#Start-as-Linux-daemon


--
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/web2py/27a986ce-c9b1-9fa0-bb04-aadaccaad187%40gmail.com.

Reply via email to