Skip to content

在界面上操作出现报错服务就停了问题 || When an error occurs during operation on the interface, the service stops. #179

@zengqinchris

Description

@zengqinchris

用Docker安装启动的,每次在操作界面时,如果界面操作报错了,服务就挂了,不知道是不是我启动服务命令的问题,启动命令如下,
docker run -d
--name graphgen
-p 7860:7860
-v /tmp/graphgen_cache:/app/cache
--user root
-e SYNTHESIZER_BACKEND=openai_api
-e SYNTHESIZER_BASE_URL=http://11.100.41.98:8166/v1
-e SYNTHESIZER_MODEL=Qwen3-235B-A22B-Instruct-2507-AWQ
-e TRAINEE_BACKEND=openai_api
-e TRAINEE_BASE_URL=http://11.100.41.98:8166/v1
-e TRAINEE_MODEL=Qwen3-235B-A22B-Instruct-2507-AWQ
graphgen
python -m webui.app

如果正常操作,不报错的时候就没有问题
部分日志如下
(MapWorker(MapBatches(BuildKGService)) pid=2337) do = await self.iter(retry_state=retry_state)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/tenacity/a
(MapWorker(MapBatches(BuildKGService)) pid=2337) syncio/init.py", line 153, in iter
(MapWorker(MapBatches(BuildKGService)) pid=2337) result = await action(retry_state)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/tenacity/_
(MapWorker(MapBatches(BuildKGService)) pid=2337) utils.py", line 99, in inner
(MapWorker(MapBatches(BuildKGService)) pid=2337) return call(*args, **kwargs)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/tenacity/_
(MapWorker(MapBatches(BuildKGService)) pid=2337) init_.py", line 400, in
(MapWorker(MapBatches(BuildKGService)) pid=2337) self._add_action_func(lambda rs:
(MapWorker(MapBatches(BuildKGService)) pid=2337) rs.outcome.result())
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/concurrent/futures/_base
(MapWorker(MapBatches(BuildKGService)) pid=2337) .py", line 451, in result
(MapWorker(MapBatches(BuildKGService)) pid=2337) return self.__get_result()
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/concurrent/futures/_base
(MapWorker(MapBatches(BuildKGService)) pid=2337) .py", line 403, in __get_result
(MapWorker(MapBatches(BuildKGService)) pid=2337) raise self._exception
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/tenacity/a
(MapWorker(MapBatches(BuildKGService)) pid=2337) syncio/init.py", line 114, in call
(MapWorker(MapBatches(BuildKGService)) pid=2337) result = await fn(*args, **kwargs)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/app/graphgen/models/llm/api/openai_client.py",
(MapWorker(MapBatches(BuildKGService)) pid=2337) line 165, in generate_answer
(MapWorker(MapBatches(BuildKGService)) pid=2337) completion = await
(MapWorker(MapBatches(BuildKGService)) pid=2337) self.client.chat.completions.create( # pylint:
(MapWorker(MapBatches(BuildKGService)) pid=2337) disable=E1125
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/openai/res
(MapWorker(MapBatches(BuildKGService)) pid=2337) ources/chat/completions/completions.py", line 2678,
(MapWorker(MapBatches(BuildKGService)) pid=2337) in create
(MapWorker(MapBatches(BuildKGService)) pid=2337) return await self._post(
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/openai/_ba
(MapWorker(MapBatches(BuildKGService)) pid=2337) se_client.py", line 1797, in post
(MapWorker(MapBatches(BuildKGService)) pid=2337) return await self.request(cast_to, opts,
(MapWorker(MapBatches(BuildKGService)) pid=2337) stream=stream, stream_cls=stream_cls)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/openai/_ba
(MapWorker(MapBatches(BuildKGService)) pid=2337) se_client.py", line 1597, in request
(MapWorker(MapBatches(BuildKGService)) pid=2337) raise
(MapWorker(MapBatches(BuildKGService)) pid=2337) self._make_status_error_from_response(err.response)
(MapWorker(MapBatches(BuildKGService)) pid=2337) from None
(MapWorker(MapBatches(BuildKGService)) pid=2337) openai.AuthenticationError: Error code: 401 -
(MapWorker(MapBatches(BuildKGService)) pid=2337) Invalid token
(MapWorker(MapBatches(BuildKGService)) pid=2337)
(MapWorker(MapBatches(BuildKGService)) pid=2337) [02/06/26 09:07:27] INFO Creating a new event loop in main thread.
(MapWorker(MapBatches(BuildKGService)) pid=2337) INFO Creating a new event loop in main thread.
(MapWorker(MapBatches(BuildKGService)) pid=2337) INFO All multi-modal chunks are already in the storage
(MapWorker(MapBatches(BuildKGService)) pid=2337) INFO Knowledge graph building completed.
[2/4]Extracting entities and relationships from chunks: 100%|██████████| 4/4 [00:00<00:00, 7.36chunk/s]
Inserting entities into storage: 0item [00:00, ?item/s]
Inserting relationships into storage: 0item [00:00, ?item/s]
2026-02-06 09:07:27,102 INFO streaming_executor.py:304 -- ✔️ Dataset dataset_22_0 execution finished in 6.85 seconds
(MapWorker(MapBatches(GenerateService)) pid=2340) Using existing Ray actor: Actor_LLM_synthesizer
[2026-02-06 09:15:04,177 E 1 446] rpc_client.h:203: Failed to connect to GCS within 120 seconds. GCS may have been killed. It's either GCS is terminated by ray stop or is killed unexpectedly. If it is killed unexpectedly, see the log file gcs_server.out. https://docs.ray.io/en/master/ray-observability/user-guides/configure-logging.html#logging-directory-structure. The program will terminate.

  • Running on local URL: http://0.0.0.0:7860
  • To create a public link, set share=True in launch().
    Traceback (most recent call last):
    File "/app/webui/test_api.py", line 7, in test_api_connection
    response = client.chat.completions.create(
    File "/usr/local/lib/python3.10/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
    File "/usr/local/lib/python3.10/site-packages/openai/resources/chat/completions/completions.py", line 1192, in create
    return self._post(
    File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
    File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
    openai.AuthenticationError: Error code: 401 - Invalid token

It is installed and started with Docker. Every time when I go to the operation interface, if the interface operation reports an error, the service hangs up. I don’t know if it is a problem with my startup service command. The startup command is as follows:
docker run -d
--name graphgen
-p 7860:7860
-v /tmp/graphgen_cache:/app/cache
--user root
-e SYNTHESIZER_BACKEND=openai_api
-e SYNTHESIZER_BASE_URL=http://11.100.41.98:8166/v1
-e SYNTHESIZER_MODEL=Qwen3-235B-A22B-Instruct-2507-AWQ
-e TRAINEE_BACKEND=openai_api
-e TRAINEE_BASE_URL=http://11.100.41.98:8166/v1
-e TRAINEE_MODEL=Qwen3-235B-A22B-Instruct-2507-AWQ
graphgen
python -m webui.app

If it operates normally and no errors are reported, there will be no problem.
Part of the log is as follows
(MapWorker(MapBatches(BuildKGService)) pid=2337) do = await self.iter(retry_state=retry_state)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/tenacity/a
(MapWorker(MapBatches(BuildKGService)) pid=2337) syncio/init.py", line 153, in iter
(MapWorker(MapBatches(BuildKGService)) pid=2337) result = await action(retry_state)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/tenacity/_
(MapWorker(MapBatches(BuildKGService)) pid=2337) utils.py", line 99, in inner
(MapWorker(MapBatches(BuildKGService)) pid=2337) return call(*args, **kwargs)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/tenacity/_
(MapWorker(MapBatches(BuildKGService)) pid=2337) init_.py", line 400, in
(MapWorker(MapBatches(BuildKGService)) pid=2337) self._add_action_func(lambda rs:
(MapWorker(MapBatches(BuildKGService)) pid=2337) rs.outcome.result())
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/concurrent/futures/_base
(MapWorker(MapBatches(BuildKGService)) pid=2337) .py", line 451, in result
(MapWorker(MapBatches(BuildKGService)) pid=2337) return self.__get_result()
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/concurrent/futures/_base
(MapWorker(MapBatches(BuildKGService)) pid=2337) .py", line 403, in __get_result
(MapWorker(MapBatches(BuildKGService)) pid=2337) raise self._exception
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/tenacity/a
(MapWorker(MapBatches(BuildKGService)) pid=2337) syncio/init.py", line 114, in call
(MapWorker(MapBatches(BuildKGService)) pid=2337) result = await fn(*args, **kwargs)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/app/graphgen/models/llm/api/openai_client.py",
(MapWorker(MapBatches(BuildKGService)) pid=2337) line 165, in generate_answer
(MapWorker(MapBatches(BuildKGService)) pid=2337) completion = await
(MapWorker(MapBatches(BuildKGService)) pid=2337) self.client.chat.completions.create( # pylint:
(MapWorker(MapBatches(BuildKGService)) pid=2337) disable=E1125
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/openai/res
(MapWorker(MapBatches(BuildKGService)) pid=2337) ources/chat/completions/completions.py", line 2678,
(MapWorker(MapBatches(BuildKGService)) pid=2337) in create
(MapWorker(MapBatches(BuildKGService)) pid=2337) return await self._post(
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/openai/_ba
(MapWorker(MapBatches(BuildKGService)) pid=2337) se_client.py", line 1797, in post
(MapWorker(MapBatches(BuildKGService)) pid=2337) return await self.request(cast_to, opts,
(MapWorker(MapBatches(BuildKGService)) pid=2337) stream=stream, stream_cls=stream_cls)
(MapWorker(MapBatches(BuildKGService)) pid=2337) File
(MapWorker(MapBatches(BuildKGService)) pid=2337) "/usr/local/lib/python3.10/site-packages/openai/_ba
(MapWorker(MapBatches(BuildKGService)) pid=2337) se_client.py", line 1597, in request
(MapWorker(MapBatches(BuildKGService)) pid=2337) raise
(MapWorker(MapBatches(BuildKGService)) pid=2337) self._make_status_error_from_response(err.response)
(MapWorker(MapBatches(BuildKGService)) pid=2337) from None
(MapWorker(MapBatches(BuildKGService)) pid=2337) openai.AuthenticationError: Error code: 401 -
(MapWorker(MapBatches(BuildKGService)) pid=2337) Invalid token
(MapWorker(MapBatches(BuildKGService)) pid=2337)
(MapWorker(MapBatches(BuildKGService)) pid=2337) [02/06/26 09:07:27] INFO Creating a new event loop in main thread.
(MapWorker(MapBatches(BuildKGService)) pid=2337) INFO Creating a new event loop in main thread.
(MapWorker(MapBatches(BuildKGService)) pid=2337) INFO All multi-modal chunks are already in the storage
(MapWorker(MapBatches(BuildKGService)) pid=2337) INFO Knowledge graph building completed.
[2/4]Extracting entities and relationships from chunks: 100%|██████████| 4/4 [00:00<00:00, 7.36chunk/s]
Inserting entities into storage: 0item [00:00, ?item/s]
Inserting relationships into storage: 0item [00:00, ?item/s]
2026-02-06 09:07:27,102 INFO streaming_executor.py:304 -- ✔️ Dataset dataset_22_0 execution finished in 6.85 seconds
(MapWorker(MapBatches(GenerateService)) pid=2340) Using existing Ray actor: Actor_LLM_synthesizer
[2026-02-06 09:15:04,177 E 1 446] rpc_client.h:203: Failed to connect to GCS within 120 seconds. GCS may have been killed. It's either GCS is terminated by ray stop or is killed unexpectedly. If it is killed unexpectedly, see the log file gcs_server.out. https://docs.ray.io/en/master/ray-observability/user-guides/configure-logging.html#logging-directory-structure. The program will terminate.

  • Running on local URL: http://0.0.0.0:7860
  • To create a public link, set share=True in launch().
    Traceback (most recent call last):
    File "/app/webui/test_api.py", line 7, in test_api_connection
    response = client.chat.completions.create(
    File "/usr/local/lib/python3.10/site-packages/openai/_utils/_utils.py", line 286, in wrapper
    return func(*args, **kwargs)
    File "/usr/local/lib/python3.10/site-packages/openai/resources/chat/completions/completions.py", line 1192, in create
    return self._post(
    File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1259, in post
    return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
    File "/usr/local/lib/python3.10/site-packages/openai/_base_client.py", line 1047, in request
    raise self._make_status_error_from_response(err.response) from None
    openai.AuthenticationError: Error code: 401 - Invalid token

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions