简体   繁体   English

在 Windows 10 中使用 Docker - 对于 HDP,我执行了“sh docker-deploy-hdp30.sh”但收到端口 50079 错误

[英]Using Docker in Windows 10 - For HDP I executed 'sh docker-deploy-hdp30.sh' but received a port 50079 error

I am using Docker (using latest version of Docker Desktop - also beginner with Docker) in Windows 10. I downloaded the latest HDP for Docker, unzip the folder and executed the script 'sh docker-deploy-hdp30.sh' in Git Bash I received an error with port 50079 as shown in the screenshot below.我在 Windows 10 中使用 Docker(使用最新版本的 Docker 桌面 - 也是 Docker 的初学者)。我下载了最新的 Docker HDP,解压缩文件夹并在 Git Bash 中执行脚本“sh docker-deploy-hdp30.sh”我收到端口 50079 的错误,如下面的屏幕截图所示。 I have no other containers, just this one.我没有其他容器,只有这个。 There are no active connections for port 50079.端口 50079 没有活动连接。

在此处输入图片说明

Even though this port error outlined above, I can start the HDP container (as shown below), and I can access the shell (even run Apache Pig), but I cannot access port 8080 and 1080 etc via the Google Chrome browser (I checked Edge and Firefox but not worked as well).尽管上面概述了这个端口错误,我可以启动 HDP 容器(如下所示),我可以访问 shell(甚至运行 Apache Pig),但是我无法通过 Google Chrome 浏览器访问端口 8080 和 1080 等(我检查了Edge 和 Firefox,但效果不佳)。 For instance, when I type 127.0.0.1:8080 it says connection refused.例如,当我输入 127.0.0.1:8080 时,它说连接被拒绝。 Additionally, I cannot start sandbox-proxy in Docker.此外,我无法在 Docker 中启动沙箱代理。 Please can you help me resolve the port issues.请你帮我解决端口问题。

在此处输入图片说明

If you have docker error response from daemon ports are not available ... An attempt was made to access a socket in a way forbidden by its access permissions error, you should first execute netsh interface ipv4 show excludedportrange protocol=tcp and check your desire port is in one of them range or not.如果您有docker error response from daemon ports are not available ... An attempt was made to access a socket in a way forbidden by its access permissions错误docker error response from daemon ports are not available ... An attempt was made to access a socket in a way forbidden by its access permissions ,您应该首先执行netsh interface ipv4 show excludedportrange protocol=tcp并检查您想要的端口是否在其中之一范围内。 If is in range, Docker for Windows and Hyper-V are responsible for all of those excluded port ranges above.如果在范围内,Docker for Windows 和 Hyper-V 负责所有上述排除的端口范围。

Base of this maybe below commands solve your problem. 可能是以下命令的基础解决您的问题。 For steps 1 and 3, you need to run this as an administrator in PowerShell.对于第 1 步和第 3 步,您需要在 PowerShell 中以管理员身份运行它。

1-Disable hyper-v with this command(which will required a couple of restarts)
dism.exe /Online /Disable-Feature:Microsoft-Hyper-V

2-When you finish all the required restarts, reserve the port you want so hyper-v doesn't reserve it back
netsh int ipv4 add excludedportrange protocol=tcp startport=50079 numberofports=1

3-Re-Enable hyper-V (which will require a couple of restart)
dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All

after all restarts run your command and probably your containers will be work.在所有重新启动后运行您的命令,您的容器可能会工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法启动 docker-deploy-hdp30.sh 并出现错误:没有这样的容器:sandbox-hdp - Fail launching docker-deploy-hdp30.sh with Error: No such container: sandbox-hdp 运行docker-deploy-hdp30.sh时获取“docker:无效的引用格式。” - Getting “docker: invalid reference format.” when running docker-deploy-hdp30.sh Docker部署HDP错误:参考格式无效 - Docker Deploy HDP error: invalid reference format 在Docker上启动HDP Sandbox Proxy时,端口上的权限被拒绝(Windows 10) - Permission Denied on port when starting HDP Sandbox Proxy on Docker (Windows 10) Windows 10 WSL2 Docker 构建失败,出现 /bin/sh:/usr/bin/create-user.sh:未找到 - Windows 10 WSL2 Docker build fails with /bin/sh: /usr/bin/create-user.sh: not found 使用sh管道时使用“docker-compose”时出错(echo“docker-compose ...”| sh) - Error on “docker-compose” when I use by pipe with sh ( echo “docker-compose… ” | sh ) 使用 .sh 脚本进行 docker 健康检查 - using a .sh script for docker healthchecks docker映像中的sh在Windows 10上看不到可执行文件 - sh in docker image does not see executable on Windows 10 如何使用sh在Docker容器中打开端口? - How to open port in Docker container with sh? Docker / bin / sh需要10秒才能停止 - Docker /bin/sh took 10 second to stop
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM