Can't run localstack

Hi,

I try to run localstack and I got the following error:
C:\Python39\Scripts>python β€œC:\Python39\Scripts\localstack” start

 __                     _______ __             __
/ /   ____  _________ _/ / ___// /_____ ______/ /__

/ / / __ / / __ / /\__ \/ __/ __ / / ///
/ /
/ /
/ / /
/ // / // / // // / // ,<
/
/_/___/_
,////_/_,/___//|_|

:computer: LocalStack CLI 2.1.0

[14:49:27] starting LocalStack in Docker mode :whale: localstack.py:142
────────────────────────────────────────────────────────────────────────────────────────────── LocalStack Runtime Log (press CTRL-C to quit) ───────────────────────────────────────────────────────────────────────────────────────────────
ERROR: β€˜[β€˜docker’, β€˜ps’, β€˜β€“format’, β€˜{{json . }}’]’: exit code 1; output: b’error during connect: This error may indicate that the docker daemon is not running.: Get β€œhttp://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?size=1”: open //./pipe/docker_engine: The system cannot find the file specified.\n’
Traceback (most recent call last):
File β€œC:\Python39\lib\site-packages\localstack\utils\container_utils\docker_cmd_client.py”, line 210, in list_containers
cmd_result = run(cmd).strip()
File β€œC:\Python39\lib\site-packages\localstack\utils\run.py”, line 119, in run
raise e
File β€œC:\Python39\lib\site-packages\localstack\utils\run.py”, line 69, in run
output = subprocess.check_output(cmd, shell=shell, stderr=stderr, env=env_dict, cwd=cwd)
File β€œC:\Python39\lib\subprocess.py”, line 420, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File β€œC:\Python39\lib\subprocess.py”, line 524, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command β€˜[β€˜docker’, β€˜ps’, β€˜β€“format’, β€˜{{json . }}’]’ returned non-zero exit status 1.

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

Traceback (most recent call last):
File β€œC:\Python39\Scripts\localstack”, line 23, in
main()
File β€œC:\Python39\Scripts\localstack”, line 19, in main
main.main()
File β€œC:\Python39\lib\site-packages\localstack\cli\main.py”, line 17, in main
cli()
File β€œC:\Python39\lib\site-packages\localstack\cli\plugin.py”, line 15, in call
self.group(*args, **kwargs)
File β€œC:\Python39\lib\site-packages\click\core.py”, line 1130, in call
return self.main(*args, **kwargs)
File β€œC:\Python39\lib\site-packages\click\core.py”, line 1055, in main
rv = self.invoke(ctx)
File β€œC:\Python39\lib\site-packages\click\core.py”, line 1657, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File β€œC:\Python39\lib\site-packages\click\core.py”, line 1404, in invoke
return ctx.invoke(self.callback, **ctx.params)
File β€œC:\Python39\lib\site-packages\click\core.py”, line 760, in invoke
return __callback(*args, **kwargs)
File β€œC:\Python39\lib\site-packages\localstack\utils\analytics\cli.py”, line 66, in publisher_wrapper
return fn(*args, **kwargs)
File β€œC:\Python39\lib\site-packages\localstack\cli\localstack.py”, line 168, in cmd_start
bootstrap.start_infra_in_docker()
File β€œC:\Python39\lib\site-packages\localstack\utils\bootstrap.py”, line 584, in start_infra_in_docker
prepare_docker_start()
File β€œC:\Python39\lib\site-packages\localstack\utils\bootstrap.py”, line 514, in prepare_docker_start
if DOCKER_CLIENT.is_container_running(container_name):
File β€œC:\Python39\lib\site-packages\localstack\utils\container_utils\container_client.py”, line 525, in is_container_running
return container_name in self.get_running_container_names()
File β€œC:\Python39\lib\site-packages\localstack\utils\container_utils\container_client.py”, line 519, in get_running_container_names
result = self.list_containers(all=False)
File β€œC:\Python39\lib\site-packages\localstack\utils\container_utils\docker_cmd_client.py”, line 212, in list_containers
raise ContainerException(
localstack.utils.container_utils.container_client.ContainerException: (β€˜Docker process returned with errorcode 1’, b’error during connect: This error may indicate that the docker daemon is not running.: Get β€œhttp://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?size=1”: open //./pipe/docker_engine: The system cannot find the file specified.\n’, None)

Can anyone assist please?

Hi @yaelm,

It looks like Docker might not be running on your machine, or you might need WSL installed/updated.
You can verify the first option by checking if the Docker Desktop service is running under Services in Windows.
Alternatively, you can run docker run hello-world to check if you encounter the same ContainerException. If that’s the case, you might need to install or update WSL.
Let us know how it goes.

1 Like

Thanks! It’s missing in documentaion.

We do mention it in the essential prerequisites β€” Installation | Docs