Prisma1: Document "Bind for 0.0.0.0:4466 failed: port is already allocated" error + solution

Created on 8 May 2018  Â·  13Comments  Â·  Source: prisma/prisma1

When your port 4466 is occupied, and you run

prisma init test # create new database
cd test
docker-compose up -d

You receive this error:

Creating postgres18_postgres_1 ...
Creating postgres18_prisma_1   ... error

Creating postgres18_postgres_1 ... done
0bca673c801ea252c4f3c0b9fb24301cbb3a8257b75b94af1): Bind for 0.0.0.0:4466 failed: port is already allocated

ERROR: for prisma  Cannot start service prisma: driver failed programming external connectivity on endpoint postgres18_prisma_1 (5b37a6309c74c4a0bca673c801ea
252c4f3c0b9fb24301cbb3a8257b75b94af1): Bind for 0.0.0.0:4466 failed: port is already allocated
ERROR: Encountered errors while bringing up the project.

This is because docker-compose.yml sets up port 4466.

Possible solutions:

  • change the port in docker-compose up -d from 4466 to a port that is free
  • run docker kill (docker ps -aq); and docker rm (docker ps -aq) (fish shell) to _wipe_ your docker containers. Then docker-compose up -d works
aredocs statustale

Most helpful comment

Same here @liamdanielduffy. Just had this issue today.
Running docker stop <container> and docker rm <container> fixed it.

All 13 comments

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@marktani was this ever documented? It looks like this was automatically closed, but I ran into this problem today and found this issue helpful in resolving it.

Can this issue be reopened so the fix can be documented?

Same here @liamdanielduffy. Just had this issue today.
Running docker stop <container> and docker rm <container> fixed it.

@nikolasburk is there a process for community members to contribute to the docs? happy to help get this in there with a PR if possible.

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

docker ps a get:

CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                              NAMES
c76041f39679        tensorflow/serving   "/usr/bin/tf_serving…"   2 hours ago         Up 2 hours          8500/tcp, 0.0.0.0:8501->8501/tcp   gifted_bhabha

docker rm --force c76041f39679

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 10 days if no further activity occurs. Thank you for your contributions.

Faced the same issue and it could not be solved using the two commands to kill and remove the containers.

I even tried docker system prune -f and to no avail.

But configuring prisma to use a different port worked.

Facing the same issue today.

Faced the same issue today.

Ran into this problem on Ubuntu and the following worked:

$ docker-compose down
$ docker system prune
$ service docker restart
$ docker-compose up -d

Hope this helps someone!

Facing the same issue today.

for me I had to run:
$ docker network prune -f
fixed it for me

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jannone picture jannone  Â·  3Comments

schickling picture schickling  Â·  3Comments

marktani picture marktani  Â·  3Comments

marktani picture marktani  Â·  3Comments

Fi1osof picture Fi1osof  Â·  3Comments