qd-today / qd

QD [v20240210] —— HTTP请求定时任务自动执行框架 base on HAR Editor and Tornado Server
https://qd-today.github.io/qd/
MIT License
4.46k stars 577 forks source link

Docker版本启动报错无法正常启动 #419

Closed Kaooool-Fu closed 1 year ago

Kaooool-Fu commented 1 year ago

Verify steps

QD Version

使用的是latest的image,由于无法启动,QD版本未知

Bug on OS

Linux

Bug on Platform

Docker/Linux 64位

To Reproduce

使用教程中的compose文件启动报错导致无法正常启动。

Describe the Bug

从日志上看像是/usr/src/app/run.py在运行的过程中出现了异常。

QD config

No response

QD log

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/run.py", line 66, in <module>
    http_server.start(num_processes=0)
  File "/usr/lib/python3.11/site-packages/tornado/tcpserver.py", line 304, in start
    self.add_sockets(sockets)
  File "/usr/lib/python3.11/site-packages/tornado/tcpserver.py", line 204, in add_sockets
    self._handlers[sock.fileno()] = add_accept_handler(
                                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/tornado/netutil.py", line 283, in add_accept_handler
    io_loop.add_handler(sock, accept_handler, IOLoop.READ)
  File "/usr/lib/python3.11/site-packages/tornado/platform/asyncio.py", line 153, in add_handler
    self.selector_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 340, in add_reader
    self._add_reader(fd, callback, *args)
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 267, in _add_reader
    self._selector.register(fd, selectors.EVENT_READ,
  File "/usr/lib/python3.11/selectors.py", line 359, in register
    self._selector.register(key.fd, poller_events)
FileExistsError: [Errno 17] File exists
Traceback (most recent call last):
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 265, in _add_reader
    key = self._selector.get_key(fd)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/selectors.py", line 192, in get_key
    raise KeyError("{!r} is not registered".format(fileobj)) from None
KeyError: '9 is not registered'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/app/run.py", line 66, in <module>
    http_server.start(num_processes=0)
  File "/usr/lib/python3.11/site-packages/tornado/tcpserver.py", line 304, in start
    self.add_sockets(sockets)
  File "/usr/lib/python3.11/site-packages/tornado/tcpserver.py", line 204, in add_sockets
    self._handlers[sock.fileno()] = add_accept_handler(
                                    ^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/tornado/netutil.py", line 283, in add_accept_handler
    io_loop.add_handler(sock, accept_handler, IOLoop.READ)
  File "/usr/lib/python3.11/site-packages/tornado/platform/asyncio.py", line 153, in add_handler
    self.selector_loop.add_reader(fd, self._handle_events, fd, IOLoop.READ)
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 340, in add_reader
    self._add_reader(fd, callback, *args)
  File "/usr/lib/python3.11/asyncio/selector_events.py", line 267, in _add_reader
    self._selector.register(fd, selectors.EVENT_READ,
  File "/usr/lib/python3.11/selectors.py", line 359, in register
    self._selector.register(key.fd, poller_events)
FileExistsError: [Errno 17] File exists

Expected behavior

正常启动

Screenshots

No response

a76yyyy commented 1 year ago

请关闭配置中多进程模式 ( MULTI_PROCESS ) , 当前框架暂不能有效支持

Kaol-Fu commented 1 year ago

请关闭配置中多进程模式 ( MULTI_PROCESS ) , 当前框架暂不能有效支持

确实将 MULTI_PROCESS 从 yml 中注释掉就可以正常启动了,谢谢!