UWSGI Legion子系统未能开始芹菜节
当尝试在Ubuntu上使用Legion子系统20.04 / Python 3.8.10 / UWSGI 2.0.20(通过PIP安装)时,Legion似乎没有启动或运行。
在尝试跟随Legion示例下的芹菜跳动时>我撞墙了。据我所知,配置应启动芹菜节拍过程,但没有启动过程,并且在系统日记中没有出现错误。现在,我只是想在集群中的一个节点上开始服务,因此不应有冲突的军团领主。
配置文件:
[uwsgi]
module = wsgi:app
master = true
processes = 4
socket = middleware.sock
chmod-socket = 660
vacuum = true
die-on-term = true
enable-threads = true
need-app = true
legion-mcast = beatlegion 10.4.1.255:9191 90 bf-cbc:supersecretsharedkey
legion-smart-attach-daemon = beatlegion /var/run/celery/beat.pid celery beat --pidfile=/var/run/celery/beat.pid
日记输出:
uwsgi[3540755]: spawned uWSGI worker 4 (pid: 3540783, cores: 1)
uwsgi[3540755]: spawned uWSGI worker 3 (pid: 3540782, cores: 1)
uwsgi[3540755]: spawned uWSGI worker 2 (pid: 3540781, cores: 1)
uwsgi[3540755]: spawned uWSGI worker 1 (pid: 3540780, cores: 1)
uwsgi[3540755]: spawned uWSGI master process (pid: 3540755)
uwsgi[3540755]: *** uWSGI is running in multiple interpreter mode ***
uwsgi[3540755]: WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x55f7177301e0 pid: 3540755 (default app)
uwsgi[3540755]: *** Operational MODE: preforking ***
uwsgi[3540755]: mapped 364520 bytes (355 KB) for 4 cores
uwsgi[3540755]: your mercy for graceful operations on workers is 60 seconds
uwsgi[3540755]: your server socket listen backlog is limited to 100 connections
uwsgi[3540755]: python threads support enabled
uwsgi[3540755]: Python main interpreter initialized at 0x55f7177301e0
uwsgi[3540755]: Python version: 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0]
uwsgi[3540755]: uwsgi socket 0 bound to UNIX address middleware.sock fd 3
uwsgi[3540755]: thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi[3540755]: lock engine: pthread robust mutexes
uwsgi[3540755]: detected max file descriptor number: 1024
uwsgi[3540755]: your memory page size is 4096 bytes
uwsgi[3540755]: your processes number limit is 127119
uwsgi[3540755]: detected binary path: /usr/local/bin/uwsgi
uwsgi[3540755]: current working directory: /data/middleware
uwsgi[3540755]: detected number of CPU cores: 8
uwsgi[3540755]: pcre jit disabled
uwsgi[3540755]: clock source: unix
uwsgi[3540755]: machine: x86_64
uwsgi[3540755]: os: Linux-5.4.0-110-generic #124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022
uwsgi[3540755]: compiled with version: 9.4.0 on 17 June 2022 13:03:36
uwsgi[3540755]: *** Starting uWSGI 2.0.20 (64bit) on [Fri Jun 17 09:04:27 2022] ***
uwsgi[3540755]: [uWSGI] getting INI configuration from wsgi.ini
When attempting to use the Legion subsystem on Ubuntu 20.04 / Python 3.8.10 / uWSGI 2.0.20 (installed via pip), legion does not appear to start or run.
While attempting to follow the Celery Beat under legion example here I've hit a wall. As far as I can tell, the configuration should start a celery beat process but no process is started and no errors appear in the system journal. Right now I'm only trying to start the service on a single node in the cluster so there should be no conflicting Legion lords.
Configuration File:
[uwsgi]
module = wsgi:app
master = true
processes = 4
socket = middleware.sock
chmod-socket = 660
vacuum = true
die-on-term = true
enable-threads = true
need-app = true
legion-mcast = beatlegion 10.4.1.255:9191 90 bf-cbc:supersecretsharedkey
legion-smart-attach-daemon = beatlegion /var/run/celery/beat.pid celery beat --pidfile=/var/run/celery/beat.pid
Journal Output:
uwsgi[3540755]: spawned uWSGI worker 4 (pid: 3540783, cores: 1)
uwsgi[3540755]: spawned uWSGI worker 3 (pid: 3540782, cores: 1)
uwsgi[3540755]: spawned uWSGI worker 2 (pid: 3540781, cores: 1)
uwsgi[3540755]: spawned uWSGI worker 1 (pid: 3540780, cores: 1)
uwsgi[3540755]: spawned uWSGI master process (pid: 3540755)
uwsgi[3540755]: *** uWSGI is running in multiple interpreter mode ***
uwsgi[3540755]: WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x55f7177301e0 pid: 3540755 (default app)
uwsgi[3540755]: *** Operational MODE: preforking ***
uwsgi[3540755]: mapped 364520 bytes (355 KB) for 4 cores
uwsgi[3540755]: your mercy for graceful operations on workers is 60 seconds
uwsgi[3540755]: your server socket listen backlog is limited to 100 connections
uwsgi[3540755]: python threads support enabled
uwsgi[3540755]: Python main interpreter initialized at 0x55f7177301e0
uwsgi[3540755]: Python version: 3.8.10 (default, Mar 15 2022, 12:22:08) [GCC 9.4.0]
uwsgi[3540755]: uwsgi socket 0 bound to UNIX address middleware.sock fd 3
uwsgi[3540755]: thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi[3540755]: lock engine: pthread robust mutexes
uwsgi[3540755]: detected max file descriptor number: 1024
uwsgi[3540755]: your memory page size is 4096 bytes
uwsgi[3540755]: your processes number limit is 127119
uwsgi[3540755]: detected binary path: /usr/local/bin/uwsgi
uwsgi[3540755]: current working directory: /data/middleware
uwsgi[3540755]: detected number of CPU cores: 8
uwsgi[3540755]: pcre jit disabled
uwsgi[3540755]: clock source: unix
uwsgi[3540755]: machine: x86_64
uwsgi[3540755]: os: Linux-5.4.0-110-generic #124-Ubuntu SMP Thu Apr 14 19:46:19 UTC 2022
uwsgi[3540755]: compiled with version: 9.4.0 on 17 June 2022 13:03:36
uwsgi[3540755]: *** Starting uWSGI 2.0.20 (64bit) on [Fri Jun 17 09:04:27 2022] ***
uwsgi[3540755]: [uWSGI] getting INI configuration from wsgi.ini
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
事实证明,Ubuntu 20.04需要
libssl-dev
和uuid-dev
为UWSGI安装以构建Legion子系统。发出此问题解决了问题:sudo apt Update; sudo apt install libssl-dev uuid-dev; pip卸载uwsgi; PIP安装UWSGI -NO-CACHE-DIR
Turns out that Ubuntu 20.04 needs
libssl-dev
anduuid-dev
installed for uWSGI to build the Legion subsystem. Issuing this solved the problem:sudo apt update; sudo apt install libssl-dev uuid-dev; pip uninstall uwsgi; pip install uwsgi --no-cache-dir