question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Docker Compose has Port Conflicts for Port 5000 on macOS Monterey

See original GitHub issue

Unfortunately, the latest version of macOS Monterey uses port 5000 for the internal application Control Center. This causes a port conflict error to be thrown when running the Amundsen Docker instances.

Expected Behavior

Running docker-compose -f docker-amundsen.yml up on macOS Monterey should not product port conflict errors.

Current Behavior

> docker-compose -f docker-amundsen.yml up
Starting neo4j_amundsen ... done
Starting es_amundsen    ... done
Starting amundsensearch   ... done
Starting amundsenmetadata ... done
Recreating 1db7859d4b07_amundsenfrontend ... error

ERROR: for 1db7859d4b07_amundsenfrontend  Cannot start service amundsenfrontend: Ports are not available: listen tcp 0.0.0.0:5000: bind: address already in use

ERROR: for amundsenfrontend  Cannot start service amundsenfrontend: Ports are not available: listen tcp 0.0.0.0:5000: bind: address already in use
ERROR: Encountered errors while bringing up the project.

Possible Solution

We should be able to change services using port 5000 to some other port for local development.

Your Environment

image
> lsof -i :5000
COMMAND   PID          USER   FD   TYPE  NODE NAME
ControlCe     ...   IPv4   0t0  TCP *:commplex-main (LISTEN)
ControlCe     ...  IPv6    0t0  TCP *:commplex-main (LISTEN)

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:8

github_iconTop GitHub Comments

1reaction
cmpaddencommented, Jul 25, 2022

@yoku2010 there is a PR to fix this that was also marked stale.

https://github.com/amundsen-io/amundsen/pull/1814

Since this is impacting so many people, I hope that the change can be made upstream.

0reactions
yoku2010commented, Jul 25, 2022

I was also facing the same issue.

Screenshot of error: Screenshot 2022-07-24 at 9 58 31 PM

This was apparently due to the new AirPlay functionality. Control Center stops listening to those ports when I turned off “AirPlay Receiver” in the “Sharing” System Preference.

Screenshot of solution: Screenshot 2022-07-24 at 10 08 41 PM

Now everything is working fine.

I am wondering, why apple choose such a popular port.

Read more comments on GitHub >

github_iconTop Results From Across the Web

I can't use a specific port with a docker container [duplicate]
So I used netstat (I typed netstat -av | grep 5000 on the MacOS terminal) to see if the 5000 port was used...
Read more >
Port 5000 already in use — MacOS Monterey issue - Medium
As of macOS ControlCe service is listening of the port. OSError: [Errno 48] Address already in use. Issue. Run a Flask server or...
Read more >
Port 5000 is already in use macOS Monterey
After an update on my laptop, I got an issue. I have started the Docker container, but it fails. The port 5000 is...
Read more >
MacOS Ventura and docker projects - Reddit
This happened to me with Monterey - my docker project was using port 5000, and Monterey enabled an AirPlay receiver on port 5000...
Read more >
Dockerizing a Flask-MySQL app with docker-compose
Compose is a tool for defining and running multi-container Docker ... for connections # Since Flask apps listen to port 5000 by default, ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found