Describe the bug
After updating LocalStack extension to 0.5.2 version, the folowing message apears on Docker Desktop notifications:
ERROR --- [-functhread2] localstack.utils.bootstrap : Error while creating container: Error during the communication with the docker daemon ?
Steps to Reproduce
Steps to reproduce the behavior:
- Just update the extension via extension manager on Docker Desktop
##Terminal on localstack container
2024-01-03 18:14:40
2024-01-03 18:14:40 __ _______ __ __
2024-01-03 18:14:40 / / ____ _________ / / // /_ / /
2024-01-03 18:14:40 / / / __ / / __ / /\__ \/ __/ __
/ / ///
2024-01-03 18:14:40 / // // / // // / // / // // / // ,<
2024-01-03 18:14:40 //_/___/_,////_/_,/___//|_|
2024-01-03 18:14:40
2024-01-03 18:14:40 💻 LocalStack CLI 3.0.3.dev
2024-01-03 18:14:40 👤 Profile: default
2024-01-03 18:14:40
2024-01-03 18:14:40 [21:14:40] starting LocalStack in Docker mode 🐳 localstack.py:494
2024-01-03 18:14:40 preparing environment bootstrap.py:1241
2024-01-03 18:14:41 [21:14:41] configuring container bootstrap.py:1249
2024-01-03 18:14:41 starting container bootstrap.py:1259
2024-01-03 18:14:41 2024-01-03T21:14:41.860 WARN --- [-functhread2] l.u.c.container_client : Host part of port mappings are ignored currently in additional flags
2024-01-03 18:14:41 2024-01-03T21:14:41.860 WARN --- [-functhread2] l.u.c.container_client : Host part of port mappings are ignored currently in additional flags
2024-01-03 18:14:41 2024-01-03T21:14:41.865 ERROR --- [-functhread2] localstack.utils.bootstrap : Error while creating container: Error during the communication with the docker daemon
2024-01-03 18:14:41 ?
2024-01-03 18:14:41 2024-01-03T21:14:41.869 INFO --- [-functhread2] localstack.utils.threads : Thread run method <function Server.do_start_thread.._run at 0x7f277a901440>(None) failed: Traceback (most recent call last):
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/client.py", line 268, in _raise_for_status
2024-01-03 18:14:41 response.raise_for_status()
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/requests/models.py", line 1021, in raise_for_status
2024-01-03 18:14:41 raise HTTPError(http_error_msg, response=self)
2024-01-03 18:14:41 requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http+docker://localhost/v1.43/containers/create?name=localstack-main
2024-01-03 18:14:41
2024-01-03 18:14:41 The above exception was the direct cause of the following exception:
2024-01-03 18:14:41
2024-01-03 18:14:41 Traceback (most recent call last):
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 693, in create_container
2024-01-03 18:14:41 container = create_container()
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 674, in create_container
2024-01-03 18:14:41 return self.client().containers.create(
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/models/containers.py", line 917, in create
2024-01-03 18:14:41 resp = self.client.api.create_container(**create_kwargs)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/container.py", line 431, in create_container
2024-01-03 18:14:41 return self.create_container_from_config(config, name, platform)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/container.py", line 448, in create_container_from_config
2024-01-03 18:14:41 return self._result(res, True)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/client.py", line 274, in _result
2024-01-03 18:14:41 self._raise_for_status(response)
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/api/client.py", line 270, in _raise_for_status
2024-01-03 18:14:41 raise create_api_error_from_http_exception(e) from e
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/.venv/lib/python3.11/site-packages/docker/errors.py", line 39, in create_api_error_from_http_exception
2024-01-03 18:14:41 raise cls(e, response=response, explanation=explanation) from e
2024-01-03 18:14:41 docker.errors.APIError: 500 Server Error for http+docker://localhost/v1.43/containers/create?name=localstack-main: Internal Server Error ("b'/opt/code/localstack/\\wsl$\Ubuntu\home\/.cache/localstack-cli/machine.json%!(EXTRA string=is not a valid Windows path)'")
2024-01-03 18:14:41
2024-01-03 18:14:41 The above exception was the direct cause of the following exception:
2024-01-03 18:14:41
2024-01-03 18:14:41 Traceback (most recent call last):
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/threads.py", line 58, in run
2024-01-03 18:14:41 result = self.func(self.params, **kwargs)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/serving.py", line 168, in _run
2024-01-03 18:14:41 return self.do_run()
2024-01-03 18:14:41 ^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/bootstrap.py", line 1058, in do_run
2024-01-03 18:14:41 self.container = self.container.start(attach=False)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/bootstrap.py", line 825, in start
2024-01-03 18:14:41 id = self.container_client.create_container_from_config(cfg)
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/container_utils/container_client.py", line 806, in create_container_from_config
2024-01-03 18:14:41 return self.create_container(
2024-01-03 18:14:41 ^^^^^^^^^^^^^^^^^^^^^^
2024-01-03 18:14:41 File "/opt/code/localstack/localstack/utils/container_utils/docker_sdk_client.py", line 702, in create_container
2024-01-03 18:14:41 raise ContainerException() from e
2024-01-03 18:14:41 localstack.utils.container_utils.container_client.ContainerException
2024-01-03 18:14:41
Additional context
Docker Desktop v4.26.1 (131620) on WSL2 with Ubuntu integration;
Windows 10 Pro v22h2 OS Build 19045.3803
Windows 11 Pro v22H2 OS build 22621.2861
LocalStack Extension on DOcker v0.5.2
Images:
localstack/localstack:latest - cc3241b4ebd5
localstack/localstack-docker-desktop:0.5.2 - 544b4cf660ba
References