Issue
Recently, I've started using localstack
. However, after a day of usage, I encountered the following error while running localstack
:
> localstack start -d
__ _______ __ __
/ / ____ _________ _/ / ___// /_____ ______/ /__
/ / / __ \/ ___/ __ `/ /\__ \/ __/ __ `/ ___/ //_/
/ /___/ /_/ / /__/ /_/ / /___/ / /_/ /_/ / /__/ ,<
/_____/\____/\___/\__,_/_//____/\__/\__,_/\___/_/|_|
💻 LocalStack CLI 2.3.1
[22:38:49] starting LocalStack in Docker mode 🐳 localstack.py:495
preparing environment bootstrap.py:1197
configuring container bootstrap.py:1205
2023-10-03T22:38:49.655 WARN --- [ MainThread] l.utils.docker_utils : Unexpected error when attempting to determine container port status: ('Docker process returned with errorcode 125', b'', b'docker: Error response from daemon: driver failed programming external connectivity on endpoint focused_hawking (971564b7717a66fa84babce1ba3988c842735ffbeb1ba88c0a6560892cf75c27): Error starting userland proxy: listen tcp4 0.0.0.0:53: bind: address already in use.\n')
starting container bootstrap.py:1215
[22:38:51] detaching
Apparently, there's a conflict binding port 53
between localstack
and systemd-resolve
.
> sudo lsof -i :53
[sudo] password for benyamin:
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
systemd-r 1226 systemd-resolve 13u IPv4 28249 0t0 UDP 127.0.0.53:domain
systemd-r 1226 systemd-resolve 14u IPv4 28250 0t0 TCP 127.0.0.53:domain (LISTEN)
How can I change the default port of localstack
to solve the issue?
[VERSIONS]:
locakstack
version: 2.3.1
OS: Ubuntu 22.04
Solution
An immediate workaround would be to run LocalStack inside a docker container. In this case all ports are isolated from the host system and you can expose them as you see fit. For more complex setups and port mappings it is probably best to use a docker-compose.yaml
.
Port 53 is used for DNS resolving, and it seems that our internal resolver clashes with a resolver installed on your machine.
Answered By - Simon Wallner Answer Checked By - Dawn Plyler (WPSolving Volunteer)