无法在网络 nat 上创建端点:hnsCall 在 Win32 中失败:进程无法访问文件 [英] Failed to create endpoint on network nat: hnsCall failed in Win32: The process cannot access the file
问题描述
我正在尝试运行以下 docker 命令(最新的 Win10 Fall 2018 更新,最新的 docker 版本 2.0):
I'm trying to run the following docker command (latest Win10 Fall 2018 update, latest docker version 2.0):
docker run -d -p 1433:1433 -e sa_password=Test_123 -e ACCEPT_EULA=Y microsoft/mssql-server-windows-developer
但它失败并出现以下错误:
But it fails wit the following error:
来自守护进程的错误响应:未能创建端点unruffled_wozniak 网络 nat: hnsCall 在 Win32 中失败: 进程无法访问该文件,因为它正被另一个进程使用.(0x20).
Error response from daemon: failed to create endpoint unruffled_wozniak on network nat: hnsCall failed in Win32: The process cannot access the file because it is being used by another process. (0x20).
我尝试了以下方法:
- 重启守护进程
docker system prune -a
- 重启机器
- 重启 HNS 服务
- 重新安装 docker
- 从 Windows 功能中禁用容器和 Hyper-V
没有任何效果.有什么建议吗?
Nothing worked. Any suggestions?
推荐答案
不确定这样做有多明智,但我检查了该端口未与其他应用程序一起使用,但仍然出现错误.
Not sure how wise this is, but I checked the port wasn't in use with another app and still got the error.
这已经为我解决了几次问题.在管理 PowerShell 控制台中,运行以下命令:
This has fixed the issue a couple of times for me. In an Administrative PowerShell console, run the following:
Stop-Service docker
Stop-service hns
Start-service hns
Start-Service docker
docker network prune
部分来自这篇文章.
这篇关于无法在网络 nat 上创建端点:hnsCall 在 Win32 中失败:进程无法访问文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!