The Hortonworks Sandbox running on Azure requires opening ports a bit differently than when the sandbox is running locally on Virtualbox or Docker. We’ll walk through how to open a port in Azure so that outside connections make their way into the sandbox, which is a Docker container inside an Azure virtual machine.
Note: There are multiple ways to open ports to a Docker container (i.e. the sandbox). This tutorial will cover the simplest method, which reinitializes the sandbox to its original state. In other words, you will lose all changes made to the sandbox.
Edit this file and add your desired port forward. In this example, we’re going to forward host port 15000 to sandbox port 15000. The file should now look something like the following:
Terminate the existing sandbox container, and then remove it.
Warning: Be aware that this deletes the sandbox, changes are not saved.
sudo docker stop sandbox
sudo docker rm sandbox
Restart the Azure VM
We now restart the Azure VM. Upon restart, the script we modified above will be run in order to start the sandbox container. Since we removed the container in the previous step, the sandbox container is first rebuilt with your newly specified port forwards.
You may restart the Azure VM by stopping and starting via the Azure Portal, or you can execute the following while SSH’d in.