netease-youdao / QAnything

Question and Answer based on Anything.
https://qanything.ai
GNU Affero General Public License v3.0
11.43k stars 1.1k forks source link

[BUG] 启动不了。一直等待启动后端服务。win和linux都是 #517

Open jacktpy opened 1 week ago

jacktpy commented 1 week ago

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

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

当前行为 | Current Behavior

使用docker-compose -f docker-compose-win.yaml up docker-compose -f docker-compose-linux.yaml up 启动都有问题,首先mysql会报没有远程访问权限,手动连接给权限后又会一直等待启动后端服务。

期望行为 | Expected Behavior

正常启动。

运行环境 | Environment

- OS:Windows 11 WSL2
- NVIDIA Driver:
- CUDA:12.3
- Docker Compose:27.2.0
- NVIDIA GPU Memory: 16G

QAnything日志 | QAnything logs

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-09-11 10:45:03 +0000] [494] [INFO] Sanic Extensions: [2024-09-11 10:45:03 +0000] [494] [INFO] > injection [0 dependencies; 0 constants] [2024-09-11 10:45:03 +0000] [494] [INFO] > openapi [http://0.0.0.0:8777/docs] [2024-09-11 10:45:03 +0000] [494] [INFO] > http [2024-09-11 10:45:03 +0000] [494] [INFO] > templating [jinja2==3.1.4] Failed to create new connection using: fa696811251e45e7862c2521b6664714 [2024-09-11 10:45:20 +0000] [494] [ERROR] <MilvusException: (code=2, message=Fail connecting to server on host.docker.internal:19540. Timeout)> Traceback (most recent call last): File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 143, in _wait_for_channel_ready grpc.channel_ready_future(self._channel).result(timeout=timeout) File "/usr/local/lib/python3.10/site-packages/grpc/_utilities.py", line 162, in result self._block(timeout) File "/usr/local/lib/python3.10/site-packages/grpc/_utilities.py", line 106, in _block raise grpc.FutureTimeoutError() grpc.FutureTimeoutError

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 73, in init_cfg self.milvus_kb = VectorStoreMilvusClient() File "/workspace/QAnything/qanything_kernel/core/retriever/vectorstore.py", line 270, in init self.local_vectorstore: Milvus = SelfMilvus( File "/workspace/QAnything/qanything_kernel/core/retriever/vectorstore.py", line 16, in init super().init(*args, kwargs) File "/usr/local/lib/python3.10/site-packages/langchain_community/vectorstores/milvus.py", line 200, in init self.alias = self._create_connection_alias(connection_args) File "/usr/local/lib/python3.10/site-packages/langchain_community/vectorstores/milvus.py", line 283, in _create_connection_alias raise e File "/usr/local/lib/python3.10/site-packages/langchain_community/vectorstores/milvus.py", line 278, in _create_connection_alias connections.connect(alias=alias, connection_args) File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 414, in connect connect_milvus(**kwargs, user=user, password=password, token=token, db_name=db_name) File "/usr/local/lib/python3.10/site-packages/pymilvus/orm/connections.py", line 365, in connect_milvus gh._wait_for_channel_ready(timeout=timeout) File "/usr/local/lib/python3.10/site-packages/pymilvus/client/grpc_handler.py", line 146, in _wait_for_channel_ready raise MilvusException( pymilvus.exceptions.MilvusException: <MilvusException: (code=2, message=Fail connecting to server on host.docker.internal:19540. Timeout)> [2024-09-11 10:45:36 +0000] [13] [ERROR] Not all workers acknowledged a successful startup. Shutting down.

One of your worker processes terminated before startup was completed. Please solve any errors experienced during startup. If you do not see an exception traceback in your error logs, try running Sanic in in a single process using --single-process or single_process=True. Once you are confident that the server is able to start without errors you can switch back to multiprocess mode. [2024-09-11 10:45:36 +0000] [13] [INFO] Killing Sanic-Server-0-0 [494] [2024-09-11 10:45:36 +0000] [13] [INFO] Server Stopped

复现方法 | Steps To Reproduce

No response

备注 | Anything else?

No response

wind-c commented 1 week ago

使用docker-compose -f docker-compose-win.yaml up遇到同样问题: qanything-container-local | Waiting for the backend service to start... qanything-container-local | 等待启动后端服务 qanything-container-local | Waiting for the backend service to start... qanything-container-local | 等待启动后端服务 qanything-container-local | Waiting for the backend service to start... qanything-container-local | 等待启动后端服务

TomIsFat commented 1 week ago

同样无法启动

cnxiaobingguo commented 2 days ago

+1

sea-007 commented 1 day ago

+1,解决了吗

WoJoinGitHub commented 1 day ago

我的解决了,程序在自动下载东西,等下载完就行了

WoJoinGitHub commented 1 day ago

1726804765978