gpt4 book ai didi

Docker 409 客户端错误。如何获取真实错误并查看容器中的真实日志?

转载 作者:IT王子 更新时间:2023-10-29 06:04:15 31 4
gpt4 key购买 nike

我正在为 docker 和 akka.net 苦苦挣扎

我总是收到这个错误,但我不知道如何检查是什么引发了这个错误?是否可以检查容器的日志输出或以某种方式查看输出?

错误:

Exception in thread Thread-9:
Traceback (most recent call last):
File "site-packages\docker\api\client.py", line 246, in _raise_for_status
File "site-packages\requests\models.py", line 940, in raise_for_status
requests.exceptions.HTTPError: 409 Client Error: Conflict for url: http+docker://localnpipe/v1.30/containers/4d9d4008ccc0abacbee66357ff73e351df9997d7ec0cda8d0e0a696edf489eed/attach?logs=0&stdout=1&stderr=1&stream=1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "threading.py", line 916, in _bootstrap_inner
File "threading.py", line 864, in run
File "compose\cli\log_printer.py", line 233, in watch_events
File "compose\container.py", line 215, in attach_log_stream
File "compose\container.py", line 307, in attach
File "site-packages\docker\utils\decorators.py", line 19, in wrapped
File "site-packages\docker\api\container.py", line 57, in attach
File "site-packages\docker\api\client.py", line 385, in _read_from_socket
File "site-packages\docker\api\client.py", line 296, in _get_raw_response_socket
File "site-packages\docker\api\client.py", line 248, in _raise_for_status
File "site-packages\docker\errors.py", line 19, in create_api_error_from_http_exception
File "site-packages\requests\models.py", line 880, in json
File "site-packages\requests\models.py", line 828, in content
File "site-packages\requests\models.py", line 750, in generate
File "site-packages\urllib3\response.py", line 494, in stream
File "site-packages\urllib3\response.py", line 442, in read
File "http\client.py", line 449, in read
File "http\client.py", line 493, in readinto
File "site-packages\docker\transport\npipesocket.py", line 209, in readinto
File "site-packages\docker\transport\npipesocket.py", line 20, in wrapped
RuntimeError: Can not reuse socket after connection was closed.

最佳答案

如果您想查看来自服务的日志,请使用 docker-compose logs service_name,其中 service_name 是 docker-compose.yaml 中服务中提供的 key 有一些有用的选项,例如 -f--tail,更多信息请参见 docs

关于Docker 409 客户端错误。如何获取真实错误并查看容器中的真实日志?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53593064/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com