启动用户空间代理时出错:listen tcp 0.0.0.0:3306: bind: address already in use [英] Error starting userland proxy: listen tcp 0.0.0.0:3306: bind: address already in use

查看:159
本文介绍了启动用户空间代理时出错:listen tcp 0.0.0.0:3306: bind: address already in use的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须制作 Laravel 应用程序并交付一个 Dockerfile,但我真的坚持这个.在那之前,我在我的机器上安装 laravel 做了一个噩梦.

我正在尝试获取 dockervel 图像并按照此处的步骤操作:http://www.spiralout.eu/2015/12/dockervel-laravel-development.html

但是当我运行 dartisan make:auth 时,它给出了以下错误:

<前> <代码> **错误**的** dockervel_mysql_1无法重新启动容器** c258b418c03cbd6ec02c349c12cf09403f0eaf42fa9248019af7860d037d6474:**驱动程序无法在端点编程外部连接dockervel_mysql_1 **(da3dd576458aa1fe3af7b539c48b9d61d97432cf5e9ee02d78562851f53981ae):电子** RROR开始用户级代理:听tcp0.0.0.0:3306: 绑定:地址已在使用中.**

我尝试在 docker-compose.yml

中更改默认端口

 端口:- 8084:80"

仍然什么都没有,还尝试在我的机器上停止 apache2 (service apache2 stop),还尝试了 docker-compose restart 并删除 docker 容器 dockervel_mysql_1.

我不得不提一下,我已经在 /var/www/laravel 中有一个 Laravel proj..

请帮忙!

解决方案

可能你已经有一个 MySQL 服务在 3306 端口运行.你应该先关闭它.
然后尝试结束 docker-compose down 并用 docker-compose up 重新启动它.
还要记住在使用 dpermit

在项目中添加文件(如 dartisan make:auth)后更改权限

更新:由于您已将端口更改为8084",因此您应该转到 localhost:8084
如果您看到 apache 默认,那么您可能正在浏览另一台服务器,因为 dockervel 是基于 nginx 构建的.
您可能在 Docker 上也有一些差距.不要将本地存储与 docker 存储混合使用.容器中的 /var/www 与您本地的 /var/www 不同.在 docker-compose.yml 中,您将本地 ~/dockervel/www 挂载到容器 /var/www.
我建议您重新开始并恢复您对 apache 服务器所做的更改.关闭它,你不需要它.Dockervel 将在容器中为您提供 NginX 服务器.

I have to make Laravel app and to deliver a Dockerfile, but I'm really stuck with this. Before that I had a nightmare wile installing laravel on my machine.

I'm trying to get dockervel image and following the steps here: http://www.spiralout.eu/2015/12/dockervel-laravel-development.html

But when I run dartisan make:auth it gives this error below:

**ERROR:** for dockervel_mysql_1  **Cannot restart container** c258b418c03cbd6ec02c349c12cf09403f0eaf42fa9248019af7860d037d6474: **driver failed programming external connectivity on endpoint dockervel_mysql_1** (da3dd576458aa1fe3af7b539c48b9d61d97432cf5e9ee02d78562851f53981ae): E**rror starting userland proxy: listen tcp0.0.0.0:3306: bind: address already in use.**

I have tried to Change the default port in the docker-compose.yml

   ports:
     - "8084:80"

Still nothing, also tried to stop apache2 (service apache2 stop) on my machine ,also tried docker-compose restart and removing docker container dockervel_mysql_1.

I have to mention that I have already one Laravel proj. in /var/www/laravel.

Please help!

解决方案

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.

这篇关于启动用户空间代理时出错:listen tcp 0.0.0.0:3306: bind: address already in use的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆