ZhangHuangbin wrote:ok, Ubuntu 20.04 removes uwsgi plugin for Python 2 support. You have to install "uwsgi" with "pip2" command instead:
It installs /usr/local/bin/uwsgi (the "uwsgi-*" deb packages install /usr/bin/uwsgi), so you need to replace "/usr/bin/uwsgi" by "/usr/local/bin/uwsgi" in /etc/systemd/system/multi-user.target.wants/iredadmin.service.
You may need to remove the "plugins =" line in /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini also.
Requirement already satisfied: uwsgi in ./.local/lib/python2.7/site-packages (2.0.18)
So uwsgi was already installed so I changed the /etc/systemd/system/multi-user.target.wants/iredadmin.service to below and rebooted the server afterwards
[Unit]
Description=iRedAdmin daemon service
After=network.target local-fs.target remote-fs.target
[Service]
Type=simple
ExecStartPre=-/bin/mkdir -p /var/run/iredadmin
ExecStartPre=/bin/chown iredadmin:iredadmin /var/run/iredadmin
ExecStartPre=/bin/chmod 0755 /var/run/iredadmin
ExecStart=/usr/local/bin/uwsgi --ini /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini --pidfile /var/run/iredadmin/iredadmin.pid
ExecStop=/usr/local/bin/uwsgi --stop /var/run/iredadmin/iredadmin.pid
ExecStopPost=/bin/rm -rf /var/run/iredadmin
KillSignal=SIGTERM
PrivateTmp=true
[Install]
WantedBy=multi-user.target
I tried with and without the plugins row. This is the result from syslog without the plugins
Jul 14 20:33:45 multibot systemd[1]: Starting iRedAdmin daemon service...
Jul 14 20:33:45 multibot systemd[1]: Started iRedAdmin daemon service.
Jul 14 20:33:45 multibot uwsgi[12416]: [uWSGI] getting INI configuration from /opt/www/iredadmin/rc_scripts/uwsgi/debian.ini
Jul 14 20:33:45 multibot uwsgi: *** Starting uWSGI 2.0.19.1 (64bit) on [Tue Jul 14 20:33:45 2020] ***
Jul 14 20:33:45 multibot uwsgi: compiled with version: 9.3.0 on 30 June 2020 20:31:09
Jul 14 20:33:45 multibot uwsgi: os: Linux-5.4.0-40-generic #44-Ubuntu SMP Tue Jun 23 00:01:04 UTC 2020
Jul 14 20:33:45 multibot uwsgi: nodename: multibot
Jul 14 20:33:45 multibot uwsgi: machine: x86_64
Jul 14 20:33:45 multibot uwsgi: clock source: unix
Jul 14 20:33:45 multibot uwsgi: detected number of CPU cores: 4
Jul 14 20:33:45 multibot uwsgi: current working directory: /
Jul 14 20:33:45 multibot uwsgi: writing pidfile to /var/run/iredadmin/iredadmin.pid
Jul 14 20:33:45 multibot uwsgi: detected binary path: /usr/local/bin/uwsgi
Jul 14 20:33:45 multibot uwsgi: !!! no internal routing support, rebuild with pcre support !!!
Jul 14 20:33:45 multibot uwsgi: setgid() to 2001
Jul 14 20:33:45 multibot uwsgi: setuid() to 2001
Jul 14 20:33:45 multibot uwsgi: chdir() to /opt/www/iredadmin
Jul 14 20:33:45 multibot uwsgi: your processes number limit is 127971
Jul 14 20:33:45 multibot uwsgi: your memory page size is 4096 bytes
Jul 14 20:33:45 multibot uwsgi: detected max file descriptor number: 1024
Jul 14 20:33:45 multibot uwsgi: VirtualHosting mode enabled.
Jul 14 20:33:45 multibot uwsgi: lock engine: pthread robust mutexes
Jul 14 20:33:45 multibot uwsgi: thunder lock: disabled (you can enable it with --thunder-lock)
Jul 14 20:33:45 multibot uwsgi: uwsgi socket 0 bound to TCP address 127.0.0.1:7791 fd 6
Jul 14 20:33:45 multibot uwsgi: Python version: 3.8.2 (default, Apr 27 2020, 15:53:34) [GCC 9.3.0]
Jul 14 20:33:45 multibot uwsgi: Python main interpreter initialized at 0x555c55b4dbb0
Jul 14 20:33:45 multibot uwsgi: python threads support enabled
Jul 14 20:33:45 multibot uwsgi: your server socket listen backlog is limited to 100 connections
Jul 14 20:33:45 multibot uwsgi: your mercy for graceful operations on workers is 60 seconds
Jul 14 20:33:45 multibot uwsgi: mapped 437520 bytes (427 KB) for 5 cores
Jul 14 20:33:45 multibot uwsgi: *** Operational MODE: preforking ***
Jul 14 20:33:45 multibot uwsgi: Traceback (most recent call last):
Jul 14 20:33:45 multibot uwsgi: File "iredadmin.py", line 9, in <module>
Jul 14 20:33:45 multibot uwsgi: from libs import iredbase
Jul 14 20:33:45 multibot uwsgi: File "/opt/www/iRedAdmin-1.0/libs/iredbase.py", line 202
Jul 14 20:33:45 multibot uwsgi: except Exception, e:
Jul 14 20:33:45 multibot uwsgi: ^
Jul 14 20:33:45 multibot uwsgi: SyntaxError: invalid syntax
Jul 14 20:33:45 multibot uwsgi: unable to load app 0 (mountpoint='') (callable not found or import error)
Jul 14 20:33:45 multibot uwsgi: *** no app loaded. going in full dynamic mode ***
Jul 14 20:33:45 multibot uwsgi: *** uWSGI is running in multiple interpreter mode ***
Jul 14 20:33:45 multibot uwsgi: spawned uWSGI master process (pid: 12416)
Jul 14 20:33:45 multibot uwsgi: spawned uWSGI worker 1 (pid: 12424, cores: 1)
Jul 14 20:33:45 multibot uwsgi: spawned uWSGI worker 2 (pid: 12425, cores: 1)
Jul 14 20:33:45 multibot uwsgi: spawned uWSGI worker 3 (pid: 12426, cores: 1)
Jul 14 20:33:45 multibot uwsgi: spawned uWSGI worker 4 (pid: 12427, cores: 1)
Jul 14 20:33:45 multibot uwsgi: spawned uWSGI worker 5 (pid: 12428, cores: 1)