dockerhortonworks-data-platformhortonworks-sandbox

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. I have no other containers, just this one. There are no active connections for port 50079.

enter image description here

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). For instance, when I type 127.0.0.1:8080 it says connection refused. Additionally, I cannot start sandbox-proxy in Docker. Please can you help me resolve the port issues.

enter image description here


Solution

  • 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. If is in range, Docker for Windows and Hyper-V are responsible for all of those excluded port ranges above.

    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-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.