When I run docker-compose up
in my Docker project it failes with the following message:
Error starting userland proxy: listen tcp 0.0.0.0:3000:
In your case it was some other process that was using the port and as indicated in the comments, sudo netstat -pna | grep 3000
helped you in solving the problem.
While in other cases (I myself encountered it many times) it mostly is the same container running at some other instance. In that case docker ps
was very helpful as often I left the same containers running in other directories and then tried running again at other places, where same container names were used.
How docker ps
helped me: docker rm -f $(docker ps -aq)
is a short command which I use to remove all containers.
Edit: Added how docker ps
helped me.
Before it was running on :docker run -d --name oracle -p 1521:1521 -p 5500:5500 qa/oracle I just changed the port to docker run -d --name oracle -p 1522:1522 -p 5500:5500 qa/oracle
it worked fine for me !
A variation of @DmitrySandalov's answer: I had tomcat/java running on 8080, which needed to keep going. Looked at the docker-compose.yml file and altered the entry for 8080 to another of my choosing.
nginx:
build: nginx
ports:
#- '8080:80' <-- original entry
- '8880:80'
- '8443:443'
Worked perfectly. (The only wrinkle is the change will be wiped if I ever update the project, since it's coming from an external repo.)
I had same problem,
docker-compose down --rmi all
(in the same directory where you run docker-compose up)
helps
I had the same problem. I fixed this by stopping the Apache2 service on my host.
`$` sudo service redis-server stop
Does the trick.