Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] <title>启动main_server和insert_files_server报错 #570

Open
2 tasks done
lczass opened this issue Nov 10, 2024 · 0 comments
Open
2 tasks done

[BUG] <title>启动main_server和insert_files_server报错 #570

lczass opened this issue Nov 10, 2024 · 0 comments

Comments

@lczass
Copy link

lczass commented Nov 10, 2024

是否已有关于该错误的issue或讨论? | Is there an existing issue / discussion for this?

  • 我已经搜索过已有的issues和讨论 | I have searched the existing issues / discussions

该问题是否在FAQ中有解答? | Is there an existing answer for this in FAQ?

  • 我已经搜索过FAQ | I have searched FAQ

当前行为 | Current Behavior

启动main_server出现Lost connection to MySQL server at 'reading initial communication packet', system error: 0

[2024-11-08 11:06:27 +0000] [2782] [INFO] > templating [jinja2==3.1.4]
UPLOAD_ROOT_PATH: /workspace/QAnything/QANY_DB/content
IMAGES_ROOT_PATH: /workspace/QAnything/qanything_kernel/qanything_server/dist/qanything/assets/file_images
<Logger debug_logger (INFO)> <Logger qa_logger (INFO)> <Logger rerank_logger (INFO)> <Logger embed_logger (INFO)> <Logger insert_logger (INFO)>
functions:[{'name': 'duckduckgo_search', 'description': 'duckduckgo_search(query: str, top_k: int) - Search infomation on internet. Useful for when the context can not answer the question. Input should be a search query.', 'parameters': {'type': 'object', 'properties': {'query': {'description': 'search query', 'type': 'string'}}, 'required': ['query']}}]
[2024-11-08 11:06:27 +0000] [2786] [INFO] Sanic Extensions:
[2024-11-08 11:06:27 +0000] [2786] [INFO] > injection [0 dependencies; 0 constants]
[2024-11-08 11:06:27 +0000] [2786] [INFO] > openapi [http://0.0.0.0:8777/docs]
[2024-11-08 11:06:27 +0000] [2786] [INFO] > http
[2024-11-08 11:06:27 +0000] [2786] [INFO] > templating [jinja2==3.1.4]
[2024-11-08 11:06:28 +0000] [2775] [ERROR] 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 308, in _open_connection
self._cmysql.connect(**cnx_kwargs)
_mysql_connector.MySQLInterfaceError: Lost connection to MySQL server at 'reading initial communication packet', system error: 0

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/sanic/worker/serve.py", line 117, in worker_serve
return _serve_http_1(
File "/usr/local/lib/python3.10/site-packages/sanic/server/runners.py", line 223, in _serve_http_1
loop.run_until_complete(app._server_event("init", "before"))
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/usr/local/lib/python3.10/site-packages/sanic/app.py", line 1764, in _server_event
await self.dispatch(
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 208, in dispatch
return await dispatch
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 183, in _dispatch
raise e
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 167, in dispatch
retval = await maybe_coroutine
File "/usr/local/lib/python3.10/site-packages/sanic/app.py", line 1315, in listener
await maybe_coro
File "/workspace/QAnything/qanything_kernel/qanything_server/sanic_api.py", line 53, in init_local_doc_qa
local_doc_qa.init_cfg(args)
File "/workspace/QAnything/qanything_kernel/core/local_doc_qa.py", line 72, in init_cfg
self.milvus_summary = KnowledgeBaseManager()
File "/workspace/QAnything/qanything_kernel/connector/database/mysql/mysql_client.py", line 23, in init
self.check_database
(host, port, user, password, database)
File "/workspace/QAnything/qanything_kernel/connector/database/mysql/mysql_client.py", line 39, in check_database

cnx = mysql.connector.connect(
File "/usr/local/lib/python3.10/site-packages/mysql/connector/pooling.py", line 293, in connect
return CMySQLConnection(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 129, in init
self.connect(**kwargs)
File "/usr/local/lib/python3.10/site-packages/mysql/connector/abstracts.py", line 1237, in connect
self._open_connection()
File "/usr/local/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 313, in _open_connection
raise get_mysql_exception(
mysql.connector.errors.OperationalError: 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
[2024-11-08 11:06:28 +0000] [2785] [ERROR] 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 0
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/mysql/connector/connection_cext.py", line 308, in _open_connection
self._cmysql.connect(**cnx_kwargs)
_mysql_connector.MySQLInterfaceError: Lost connection to MySQL server at 'reading initial communication packet', system error: 0

启动insert_files_server出现[ERROR] (2013, 'Lost connection to MySQL server during query')

[2024-11-08 11:06:27 +0000] [1446] [INFO] Sanic Extensions:
[2024-11-08 11:06:27 +0000] [1446] [INFO] > injection [0 dependencies; 0 constants]
[2024-11-08 11:06:27 +0000] [1446] [INFO] > openapi [http://0.0.0.0:8110/docs]
[2024-11-08 11:06:27 +0000] [1446] [INFO] > http
[2024-11-08 11:06:27 +0000] [1446] [INFO] > templating [jinja2==3.1.4]
[2024-11-08 11:06:28 +0000] [1457] [ERROR] (2013, 'Lost connection to MySQL server during query')
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiomysql/connection.py", line 657, in _read_bytes
data = await self._reader.readexactly(num_bytes)
File "/usr/local/lib/python3.10/asyncio/streams.py", line 706, in readexactly
raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 4 expected bytes

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/sanic/worker/serve.py", line 117, in worker_serve
return _serve_http_1(
File "/usr/local/lib/python3.10/site-packages/sanic/server/runners.py", line 223, in _serve_http_1
loop.run_until_complete(app._server_event("init", "before"))
File "uvloop/loop.pyx", line 1517, in uvloop.loop.Loop.run_until_complete
File "/usr/local/lib/python3.10/site-packages/sanic/app.py", line 1764, in _server_event
await self.dispatch(
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 208, in dispatch
return await dispatch
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 183, in _dispatch
raise e
File "/usr/local/lib/python3.10/site-packages/sanic/signals.py", line 167, in _dispatch
retval = await maybe_coroutine
File "/usr/local/lib/python3.10/site-packages/sanic/app.py", line 1315, in _listener
await maybe_coro
File "/workspace/QAnything/qanything_kernel/dependent_server/insert_files_serve/insert_files_server.py", line 236, in setup_workers
app.ctx.pool = await aiomysql.create_pool(**db_config, minsize=1, maxsize=16, loop=loop, autocommit=False,
File "/usr/local/lib/python3.10/site-packages/aiomysql/pool.py", line 29, in _create_pool
await pool._fill_free_pool(False)
File "/usr/local/lib/python3.10/site-packages/aiomysql/pool.py", line 182, in _fill_free_pool
conn = await connect(echo=self._echo, loop=self._loop,
File "/usr/local/lib/python3.10/site-packages/aiomysql/connection.py", line 75, in _connect
await conn._connect()
File "/usr/local/lib/python3.10/site-packages/aiomysql/connection.py", line 539, in _connect
await self._get_server_information()
File "/usr/local/lib/python3.10/site-packages/aiomysql/connection.py", line 1048, in _get_server_information
packet = await self._read_packet()
File "/usr/local/lib/python3.10/site-packages/aiomysql/connection.py", line 609, in _read_packet
packet_header = await self._read_bytes(4)
File "/usr/local/lib/python3.10/site-packages/aiomysql/connection.py", line 661, in _read_bytes
raise OperationalError(CR.CR_SERVER_LOST, msg) from e
pymysql.err.OperationalError: (2013, 'Lost connection to MySQL server during query')
[2024-11-08 11:06:28 +0000] [1454] [ERROR] (2013, 'Lost connection to MySQL server during query')
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/aiomysql/connection.py", line 657, in _read_bytes
data = await self._reader.readexactly(num_bytes)
File "/usr/local/lib/python3.10/asyncio/streams.py", line 706, in readexactly
raise exceptions.IncompleteReadError(incomplete, n)
asyncio.exceptions.IncompleteReadError: 0 bytes read on a total of 4 expected bytes

期望行为 | Expected Behavior

正常运行

运行环境 | Environment

- OS:
- NVIDIA Driver:
- CUDA:
- Docker Compose:
- NVIDIA GPU Memory:

QAnything日志 | QAnything logs

No response

复现方法 | Steps To Reproduce

No response

备注 | Anything else?

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant