Bind for 0.0.0.0:3000 failed: port is already allocated. By WHAT?

Solvedcomposedockerports14 replies · 420 views · started
Accepted solution by Lea — ahh classic docker ps only shows running containers of the current context 😭 Try docker ps a filter publish=5000 and check other compose…
  1. This worked fine last week. Today, on a fresh Ubuntu box, the reverse proxy dies right away:

    This app can't run on your PC

    This app can't run on your PC
    
    To find a version for your PC, check with the
    software publisher.
    

    i didn't change the compose file. Port 3000. i've checked Task Manager and htop and i can't find anythnig obvious. Is Docker keeping a ghost reservation??

    ive already run docker compose down in the project folder, restarted Docker Desktop and checked that no other terminal is running the stack. The error comes back instantly every time. Is there a command that just tells me who owns a port?

    25
  2. wait is there a native install of the same software outside Docker? ?

    0 2 helpful
  3. hmmm any udpate on this?, honestly just reset teh BIOS and save yourself the pain ??

    6 0 helpful
  4. im literally losing my mind here i swear compose is cursed pls help 🙏

    13 1 helpful
  5. if docker-proxy itself holds teh port after a crash, restarting the daemon (sudo systemctl restart docker) releases it. check ps aux | grep docker-proxy first. hope that helps :)

    4 2 helpful
  6. hmmm in CI, add a cleanup step that always runs: docker compose down -v --remove-orphans, and give each job a unique project name with -p so parallel jobs don't fight over the same names. Better yet, don't publish fixed host ports in CI at all; let containres talk over the compose newtork. fingers crossed 🤞

    0 4 helpful
  7. On Windows, Hyper-V/WSL reserves dynamic port ranges. Check with netsh interface ipv4 show excludedportrange protocol=tcp... if 5000 falls in an excluded range youll get this error even with nothing listening.

    1 0 helpful
  8. ok so a natively installed service is a common culprit: local Postgres on 5432, Redis on 6379, Apache or IIS on 80. systemctl status postgresql or Get-Service on Windows will tell u, stop it or map the container to another host port ("5433:5432").

    lol

    10 0 helpful
  9. yeahhh same issue here on my gaming rig. no idea whats going on hope that helps :)

    9 1 helpful
  10. which version are you on?. ok this thread just saved my weekend

    thinking

    0 2 helpful
  11. Accepted solution

    ahh classic docker ps only shows running containers of the current context 😭 Try docker ps -a --filter publish=5000 and check other compose projects: docker compose ls. A container from a different foledr can hold teh same port. worked for me anyway 🤷

    0 4 helpful
  12. @loose_pusher docker compose -p oldbranch down freed teh port. added --remove-orphans and unique project names to CI too. green again. seriously made my day 😭🙏

    0 1 helpful

Reply to this topic

Sign in or create an account to reply.