Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use
Probably you have already a MySQL service running in port 3306. You should close it first.
Then try to end docker-compose down
and restart it with docker-compose up
.
Remember also to change the permissions after you add a file in your project (like dartisan make:auth
) with dpermit
UPDATE:
since you have changed the port to "8084" you should go to localhost:8084
If you see the apache default then you probably are browsing another server since dockervel is build upon nginx
.
You have also probably have some gaps on Docker. Don't mix your local storage with docker storage. /var/www
in a container is different than your local /var/www
. in docker-compose.yml you mount the local ~/dockervel/www
to containers /var/www
.
I would suggest that you start all over again and revert the changes you've made to your apache server. Shut it down, you don't need it. Dockervel will provide you with an NginX server in a container.
Docker Error bind: address already in use
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. Error starting userland proxy: listen tcp4 0.0.0.0:80: bind: address already in use
Or you can use a different port like docker run -d -p 8080:80 docker/getting-started
. This way you do not need to stop the apache2 running on the host.
Error starting userland proxy: listen tcp 0.0.0.0:9042: bind: address already in use'
You've got something else running on port 9042, as you showed:
sudo netstat -pna | grep 9042
tcp 0 0 127.0.0.1:9042 0.0.0.0:* LISTEN 1166/java
This is why you can't start the Docker container which is also wanting to use the same port. The problem is that you've assumed that it must be Docker or Cassandra on that port and tried to kill them
pkill -f CassandraDaemon
docker rm -f $(docker ps -aq)
What you actually need to do is find out what process 1166
is, and kill that - or if it should be running, pick a different port for your Docker container to useps -ef|grep 1166
Error starting userland proxy: listen tcp 0.0.0.0:2049: bind: address already in use
It looks as if you have an NFS server running on your host. When you run netstat -p ...
as root and you don't see a PID for a port, like this...
tcp 0 0 0.0.0.0:2049 0.0.0.0:* LISTEN -
tcp6 0 0 :::2049 :::* LISTEN -
udp 0 0 0.0.0.0:2049 0.0.0.0:* -
udp6 0 0 :::2049 :::* -
...it generally means there is a kernel service bound to that port. Disabling the kernel NFS server (assuming that you're not using it) should allow you to run your container. I got error bind: address already in use with running Laravel app under jwilder/nginx-proxy
Running command
netstat -lpn | grep 3306
under sudo show me that mysql listen to 3306 port,so stopping mysql of my OS helped me to run docker without errors.
Docker Error bind: address already in use
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.
Related Topics
How to Get an Array of Data from $_Post
Converting Float Decimal to Fraction
How Does PHP Max_Execution_Time Work
Check and Return Duplicates Array PHP
Does HTML_Entity_Decode Replaces &Nbsp; Also? If Not How to Replace It
Usort Issue with Decimal Numbers
How to Access Elements in an Array Returned from a Function
PHP Code Inside a Laravel 5 Blade Template
How to Skip Elements in Foreach Loop
Symfony: Form Issue Using Return Type Hinting in Doctrine Entity Methods
Error with .Htaccess and Mod_Rewrite
Setting Up PHPmailer with Office365 Smtp
Pdo_Sqlite Driver Not Present.. What to Do
Selenium2 Firefox: Use the Default Profile
How to Implement Ws-Security 1.1 in PHP5
Ssl Alternative - Encrypt Password with JavaScript Submit to PHP to Decrypt