Closed friedger closed 4 years ago
I'm thinking this is due to a port conflict, where 5432
is already in use on your local machine (docker-compose will attempt to open that port locally).
This will be addressed once I start documenting things, but you can edit the .env
file locally:
https://github.com/blockstack/stacks-local-dev/blob/master/.env#L31
In general, any env var named like xxxx_PORT_LOCAL
can be changed to work on your local env.
I added this because I found myself checking the DB quite often for updates directly, but I'm open to removing this postgres local port being open. Thoughts?
lsof -i :5432
returns nothing
docker container ls
returns an empty table
Not sure which app could use the that port.
I very much like the open port, for debugging this should be helpful.
can you share the logs of mocknet_postgres
?
docker logs mocknet_postgres
actually, nm - i was able to reproduce. looking into it
This is really confounding @friedger ....
I was able to reproduce this once - but when it happened, i was also unable to run any new container. I had to kill -9
the hung process.
i.e. docker run -it alpine sh
hung indefinitely until i forced killed the pid.
Only after restarting docker did starting the above container work.
It's the first time I've seen behaviour like this - but I also did an update of docker last night. Can you check what version of docker you're running? It might be relevant to what you noticed.
$ docker --version
Docker version 19.03.13, build 4484c46d9d
I am running
Docker version 19.03.8, build afacb8b7f0
Did restarting docker daemon help here?
I found out that a postgres service is running. Stopping that helped. I am now able to run docker-compose.
It looks like the script tries to start postgres twice.