node.js 来自守护进程的错误响应:驱动程序在端点适度_aryabhata 上编程外部连接失败
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/49693353/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Error response from daemon: driver failed programming external connectivity on endpoint modest_aryabhata
提问by gsiradze
I'm going through this tutorial
我正在学习本教程
making docker image with: docker build -t myapp_back .
使用以下命令制作 docker 图像: docker build -t myapp_back .
and then want to run container with: docker run -p 3000:3000 -d myapp_back
然后想要运行容器: docker run -p 3000:3000 -d myapp_back
it's simlpe node/express app
它是简单的节点/快递应用程序
But I'm getting an error:
但我收到一个错误:
C:\Program Files\Docker\Docker\Resources\bin\docker.exe: Error response from daemon: driver failed programming external connectivity on endpoint wizardly_wescoff (a7c53e0d168f915f900e3d67ec72805c2f8e4f5e595f6ae3c7fed8e097886a8b): Error starting userland proxy: mkdir /port/tcp:0.0.0.0:3000:tcp:172.17.0.2:3000: input/output error.
C:\Program Files\Docker\Docker\Resources\bin\docker.exe:来自守护进程的错误响应:驱动程序在端点wiscoff上编程外部连接失败(a7c53e0d168f915f900e3d67ec72805c2f8e4f5e595f6ae3c7fed8e09788tc7fed8e097880.cpa8e097880.06 错误启动/ 09780:000000000000000000000000000000000000000000000. 3000:tcp:172.17.0.2:3000: 输入/输出错误。
What's wrong?
怎么了?
my dockerfile:
我的码头档案:
FROM node:carbon
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
EXPOSE 3000
CMD ['npm', 'start']
and start in package.json:
并从 package.json 开始:
"start": "nodemon src/app.js --exec babel-node"
回答by Troglo
To solve the following error in Windows: just Restart Docker (from tray menu or selecting the 'Restart Docker...' option in Settings/Reset)
要解决 Windows 中的以下错误:只需重新启动 Docker(从托盘菜单或在设置/重置中选择“重新启动 Docker...”选项)
Cannot start service YOUR_SERVICE: driver failed programming external connectivity on endpoint ...
回答by VDR
Looks like it is a known issue from docker: https://github.com/docker/for-win/issues/573
看起来这是 docker 的一个已知问题:https: //github.com/docker/for-win/issues/573
Try:
尝试:
- disabling "Experimental Features" in the Settings/Daemon menu
- restarting docker
- stopping all containers.
- 在设置/守护程序菜单中禁用“实验性功能”
- 重新启动泊坞窗
- 停止所有容器。
To stop all containers, run: docker ps -a -q | ForEach { docker stop $_ }
要停止所有容器,请运行: docker ps -a -q | ForEach { docker stop $_ }
EDIT: Working ShellScript code to Stop All Containers
编辑:使用 ShellScript 代码停止所有容器
for a in `docker ps -a -q`
do
echo "Stopping container - $a"
docker stop $a
done
回答by gsiradze
Just restarted my computer and it works now..
刚刚重新启动了我的电脑,它现在可以工作了..
回答by Rodrigo López
Restarting the computer is not the actual fix, just a workaround, that one would need to be doing on a frequent basis.
重新启动计算机并不是真正的修复,只是一种解决方法,需要经常执行此操作。
The problem is related with the default windows 10 shutdown behaviour.
该问题与默认的 Windows 10 关机行为有关。
The actual fix can be achieved disabling windows fast startup settings:
可以通过禁用 Windows 快速启动设置来实现实际修复:
Control Panel -> Power Options -> Choose what the power button does -> Change settings that are currently unavailable -> Toggle Turn on fast startup
控制面板 -> 电源选项 -> 选择电源按钮的功能 -> 更改当前不可用的设置 -> 切换开启快速启动
回答by Ajit Goel
I am able to get docker working on my windows 10 pc by resetting docker to the factory defaults. Restarting docker, restarting my machine did not work.
通过将 docker 重置为出厂默认设置,我可以让 docker 在我的 Windows 10 pc 上工作。重新启动docker,重新启动我的机器没有用。
回答by Mian Asbat Ahmad
On Mac Mojave, run the following command to find which processes are using the port.
在 Mac Mojave 上,运行以下命令以查找哪些进程正在使用该端口。
sudo lsof -i @localhost:<port_no>
In my case I was checking port 8080 so I run
就我而言,我正在检查端口 8080 所以我运行
sudo lsof -i @localhost:8080
I found that the http-alt is running on port 8080 and after getting the process id using above command you can kill the processes by
我发现 http-alt 在端口 8080 上运行,在使用上述命令获取进程 ID 后,您可以通过以下方式终止进程
sudo kill -9 <process_id>
However, in my case four applications ArtemisSe, Mail, Google and Slackare using http-alt on port 8080. Since they look important applications so I changed my port and run the container on 8888 instead of 8080. i.e.
但是,就我而言,有四个应用程序ArtemisSe, Mail, Google and Slack在端口 8080 上使用 http-alt。由于它们看起来很重要,所以我更改了端口并在 8888 而不是 8080 上运行容器。即
docker run -it --rm -p 8888:8080 <imageid or image name>
回答by user1928764
I am running under linux. If I run docker as root with the sudo command, it works fine.
我在linux下运行。如果我使用 sudo 命令以 root 身份运行 docker,它工作正常。
回答by iDeveloper
Just restart docker, right click on its icon then restart. that solved my problem
只需重新启动 docker,右键单击其图标,然后重新启动。这解决了我的问题
回答by Hernaldo Gonzalez
In my case, the same error in PHP Container. I solve changing the public port and works.
就我而言,PHP Container 中也有同样的错误。我解决了更改公共端口并工作。
This command throw error after restart my Windows 10:
重新启动 Windows 10 后,此命令会引发错误:
docker run -d -p 8080:80 --name php_apache php_app
Solution:
解决方案:
docker run -d -p 8081:80 --name php_apache php_app

