Open HLKwon opened 7 years ago
This is caused by already having something running on port 5432. Most likely a local version of postgres. You'll probably have success if you shut postgres down on your machine before running the command.
Alternatively, you can adjust the mappings of the ports. For example changing:
"5432:5432"
to "5432:5433"
So this happened to two people. I was just swapping out pieces of the docker compose file to try to isolate the problem. With both people, removing the web:
section solved the problem. For @HLKwon, we also had to change the port (we changed the left hand side, which I think is the one for the non-virtual side of the equation i.e. 5435:5432
) - when we ran the postgres image by itself with docker run
we got a more descriptive error. However, we did not try adding the web
section back in after we got it running. We can try that.
I might also suggest making the default Postgres version in the project-management template map to a more obscure port, since 5432 is the default one Postgres uses - we might avoid this issue for future people. It's odd that I didn't run into this problem, though, because I have both 5432 and 5433 occupied by Postgres 9.5 and 9.6 and I'm pretty sure they were running while I tested Docker on my machine.
Meanwhile, on @emkap01's machine, we just removed the web portion and did not change the port. After removing the web portion, we were able to connect to the Docker postgres image through pgAdmin on its default port (5432). So, not sure if the same solution would work for that situation. I don't have @emkap01's error messages though.
@NealHumphrey I assume there was a similar error message as well about the web project? The message in the ticket is definitely related to having something mapped to 5432. My guess is that there was something mapped to port 8081 as well.
I'm hesitant to change the default port since so many tutorials assume that port, but I think its worth adding a troubleshooting section that mentions that docker will use ports on your native machine so the ones mentioned in docker-compose need to be available.
I don't know what error message @emkap01 got - we'll have to re-try it with him. I'll try next time we meet up and will report back whether it's the same thing and if we can fix it or not.
Yes, we should at least add this to troubleshooting - and be sure to clarify which side of the colon is which (local vs. virtual).
Just merged #31. Any issues if I close this one?
Below is the error message we got for Docker.
Resolved the issue by removing web portion
from docker-compose.yml.
system being used is mac 10.12.3