Giter Club home page Giter Club logo

Comments (8)

staugur avatar staugur commented on June 19, 2024

早好。

  • .cfg是用户自己创建的配置文件,一行一个(你的描述没看到换行,注意文本内容保持换行)。

  • logs这个目录启动脚本会自动创建,包括pid,如没有确实有问题,可能是创建logs目录失败

可以提供版本号(或git commit),什么环境下搭建(操作系统及python版本)

from sapic.

Zynismus16 avatar Zynismus16 commented on June 19, 2024

你好,cfg我是有换行的,这个应该是github给我取消了,
另外,logs目录有error.log gunicorn.log sys.log 三个文件 ,sapic.pid文件在我刚开始查看时确实没有,我手动创建过空文件,并命名。
我拉取的是https://github.com/sapicd/sapic/releases/tag/1.13.2版本
另外,系统是Ubuntu18.4 python2

from sapic.

staugur avatar staugur commented on June 19, 2024

用ps查下本机有没有sapic进程(或看看有没有9514端口在监听),或者直接 make restart (即 sh online_gunicorn.sh restart) 关闭重启

from sapic.

Zynismus16 avatar Zynismus16 commented on June 19, 2024

我刚刚看了一下日志,

[2021-09-09 01:31:44 +0000] [10295] [INFO] Worker exiting (pid: 10295)
[2021-09-09 01:31:44 +0000] [10291] [INFO] Shutting down: Master
[2021-09-09 01:31:44 +0000] [10291] [INFO] Reason: Worker failed to boot.
[2021-09-09 02:04:07 +0000] [16177] [INFO] Starting gunicorn 19.10.0
[2021-09-09 02:04:07 +0000] [16177] [INFO] Listening at: http://127.0.0.1:9514 (16177)
[2021-09-09 02:04:07 +0000] [16177] [INFO] Using worker: gevent
[2021-09-09 02:04:07 +0000] [16181] [INFO] Booting worker with pid: 16181
[2021-09-09 02:04:07 +0000] [16181] [ERROR] Exception in worker process
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 586, in spawn_worker
    worker.init_process()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 196, in init_process
    self.patch()
  File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 65, in patch
    monkey.patch_all(subprocess=True)
  File "/usr/local/lib/python2.7/dist-packages/gevent/monkey.py", line 1237, in patch_all
    _notify_patch(events.GeventWillPatchAllEvent(modules_to_patch, kwargs), _warnings)
  File "/usr/local/lib/python2.7/dist-packages/gevent/monkey.py", line 190, in _notify_patch
    notify_and_call_entry_points(event)
  File "/usr/local/lib/python2.7/dist-packages/gevent/events.py", line 104, in notify_and_call_entry_points
    subscriber = plugin.load()
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2323, in load
    self.require(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2346, in require
    items = working_set.resolve(reqs, env, installer, extras=self.extras)
  File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 778, in resolve
    raise DistributionNotFound(req, requirers)
DistributionNotFound: The 'psutil>=5.7.0; sys_platform != "win32" or platform_python_implementation == "CPython" and extra == "recommended"' distribution was not found and is required by the application
[2021-09-09 02:04:07 +0000] [16181] [INFO] Worker exiting (pid: 16181)
[2021-09-09 02:04:07 +0000] [16177] [INFO] Shutting down: Master
[2021-09-09 02:04:07 +0000] [16177] [INFO] Reason: Worker failed to boot.

这个是存在logs文件夹中gunicorn.log文件中的,其余两个为空

from sapic.

staugur avatar staugur commented on June 19, 2024

猜测是依赖模块版本号问题,你执行看看什么版本:
pip show gunicorn gevent psutil

from sapic.

Zynismus16 avatar Zynismus16 commented on June 19, 2024
Name: gunicorn
Version: 19.10.0
Summary: WSGI HTTP Server for UNIX
Home-page: http://gunicorn.org
Author: Benoit Chesneau
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: 
---
Name: gevent
Version: 21.8.0
Summary: Coroutine-based network library
Home-page: http://www.gevent.org/
Author: Denis Bilenko
Author-email: [email protected]
License: MIT
Location: /usr/local/lib/python2.7/dist-packages
Requires: zope.interface, psutil, setuptools, zope.event, psutil, greenlet, psutil

from sapic.

staugur avatar staugur commented on June 19, 2024

from sapic.

staugur avatar staugur commented on June 19, 2024

很遗憾,我用 ubuntu18.04 python2.7 sapic1.13.2 在 virtualenv新建的虚拟环境上没有复现,正常运行。

我注意到psutil,实际上没用到它,gevent基础依赖没有它,是扩展依赖monitor、recommended中有使用(gevent/setup.py

建议使用虚拟环境测试下。

如果仍需帮助,可能需要提供如下信息:

pip list|grep -iE "gunicorn|gevent|greenlet|psutil" ; python -V ; python -c "import platform;print(platform.python_implementation(),platform.machine())"

from sapic.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.