Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind for 0.0.0.0:8080 failed: port is already allocated #2512

Closed
mourareaupro opened this issue Feb 20, 2020 · 16 comments · Fixed by #2634
Closed

Bind for 0.0.0.0:8080 failed: port is already allocated #2512

mourareaupro opened this issue Feb 20, 2020 · 16 comments · Fixed by #2634
Assignees

Comments

@mourareaupro
Copy link

mourareaupro commented Feb 20, 2020

I have a fresh docker install

I tried docker-compose down and
docker-compose up -d nginx mysql phpmyadmin

I didn't change anything in the .env

here my error :

laradock % docker-compose up -d nginx mysql phpmyadmin
Creating network "laradock_frontend" with driver "bridge"
Creating network "laradock_backend" with driver "bridge"
Creating network "laradock_default" with the default driver
Creating laradock_mysql_1            ... done
Creating laradock_docker-in-docker_1 ... done
Creating laradock_workspace_1        ... 
Creating laradock_phpmyadmin_1       ... 
Creating laradock_phpmyadmin_1       ... error

ERROR: for laradock_phpmyadmin_1  Cannot start service phpmyadmin: driver failed programming external connectivity on endpoint laradock_phpmyadmin_1 (98d07d5a92Creating laradock_workspace_1        ... done
ailed: port is already allocated
Creating laradock_php-fpm_1          ... done
Creating laradock_nginx_1            ... done

ERROR: for phpmyadmin  Cannot start service phpmyadmin: driver failed programming external connectivity on endpoint laradock_phpmyadmin_1 (98d07d5a922a933610bdced91e85c0d0ce9c7d84f29d98ca294d9b557284915f): Bind for 0.0.0.0:8080 failed: port is already allocated

So changed the port of phpmyadmin to 8181 now it's work but why i need to make this ? it's not mentionned anywhere

@ihsaneddin
Copy link

ihsaneddin commented Feb 21, 2020

it is not a bug, you can change the phpmyadmin port to another, change the PMA_PORT value to so the port is not conflicted. The example commands on the documentation web should be changed or the default port value for phpmyadmin should be changed to prevent this happen

@metalcamp
Copy link
Contributor

Someone had exactly same issue a few days ago. Check gitter at https://gitter.im/LaraDock/laradock, solution from @ihsaneddin should work.

@lhlong
Copy link

lhlong commented Feb 21, 2020

same issue, and I fixed it.
Just open .env file and find 8080 in this file. Then, change these variables to another port. Example: PMA_PORT=8084

@tnduc
Copy link

tnduc commented Feb 23, 2020

Not a bug, but the default port conflicts,

@mourareaupro
Copy link
Author

yes i changed the port as i mentioned, i just wasn't sure why because it's not in the documentation

@dooleydiligent
Copy link

So technically this is a bug. It is also a known bug. It is also an impediment for new users who probably don't already know how to search git issues to isolate the cause.

Please fix it in the repo, if not on the website.

@roneclay-zz-zz
Copy link

same issue, and I fixed it.
Just open .env file and find 8080 in this file. Then, change these variables to another port. Example: PMA_PORT=8084

Perfect!

@dooleydiligent
Copy link

But you didn't fix it. "FIX" is to put it in the repo and/or instructions so that a new user is not blocked by the known issue.

But good for you for sticking with it. I gave up.

@gustavowiller
Copy link

I upgrade the laradock, and follow the instructions of the documentation. I copy the contents of env-example to file .env. Since then, I lost time to fix the bug. I search the history of version the file .env-example and I guess this bug start occurs with the addition of line:

WORKSPACE_VUE_CLI_SERVE_HOST_PORT=8080

which conflicts with before default port of phpmyadmin

@samdoidge
Copy link

Why is this closed? A fresh install still runs into it. Nothing is mentioned on https://laradock.io/

@aidan-casey
Copy link

Because this is not a bug. The .env file is intended to customized before launching and simply follows the recommended ports from the creators of the image. Simply change the port in the environment file and move on. :)

@samdoidge
Copy link

Because this is not a bug. The .env file is intended to customized before launching and simply follows the recommended ports from the creators of the image. Simply change the port in the environment file and move on. :)

With that logic you could argue against having a example-env file. I'm aware of the solution. To not address it seems bizarre. A user following the exact instructions of the 'Getting Started' section will run into an error.

Enter the laradock folder and rename env-example to .env.

@aidan-casey
Copy link

The file “env-example” is clearly intended to only be an example starting point for your project. The documentation also says:

You can edit the .env file to choose which software’s you want to be installed in your environment. You can always refer to the docker-compose.yml file to see how those variables are being used.

The idea is not usually that you are installing everything.

The beauty of open source is that you are always free to make a pull request and suggest an edit. If your desire is for the potential for conflicting ports be made more clear in the docs, I would recommend you look to submit an update.

@samdoidge
Copy link

samdoidge commented Jun 6, 2020

The idea is not usually that you are installing everything.

This seems a poor assumption, and one the 'Getting Started' section does not share.

@aidan-casey while I appreciate your replies and tautology regarding open source, I'm ideally looking for a project maintainer to respond. Many PR's are made in the open source world and not merged in. I think a port change in the env-example is my preferred at this stage.

@aidan-casey
Copy link

Fair enough. I wish you luck. 👍

@naliferov
Copy link

naliferov commented Jun 17, 2020

It's a fucking mess, and i see this shit in docs which guide me to getting fucken error by default.

docker-compose up -d nginx mysql phpmyadmin redis workspace 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.