Created 05-19-2017 08:53 PM
Hi,
I have downloaded and did "Import Appliance" in VirtualBox. After that I started the VM. The VM displayed URL http://127.0.0.1:18888. I could access this url. After sometime, I restarted the VM. After restarting the VM, it displays the same URL but I could not access that URL. I am getting "This site can’t be reached" message in my chrome browser.
After a lot of struggle, I deleted the VM completely and did "Import Appliance" again. Now I could access the URL. After restarting the VM, I cannot access the URL.
I first suspected that the Port Forwarding is not working. I checked ports and I saw port 12122 is mapped to port 22 in guest machine. I tried login using Putty. I could login. It means, Port Forwarding is working fine.
Then, why the URL is not working after restarting my VM?
Thanks in advance.
Created 05-19-2017 10:36 PM
I am able to reproduce this, and will be reporting it in. I suspect that it has to do with the fact that Docker is being used within the appliance for the HDF Sandbox. When the Sandbox is being aburptly shutdown, the Docker container inside has doesn't cleanly stop. When you reboot, Docker see's a conflict as a container is already started with the same name:
docker: Error response from daemon: Conflict. The container name "/sandbox-hdf" is already in use by container.
When you are using port -12122, you are not SSH'ing to the HDF Sandbox, but to the OS host that the Docker container runs inside of. Instead, Port 12222 will SSH you into the HDF Sandbox VM. If you try to ssh on port 12222, you may find that it does not work because the HDF Sandbox isn't running (the Docker conflict we noted above).
To resolve the issue from this state, you'll have to rm the Docker container and use the included start scripts to redeploy it:
1) ssh root@127.0.0.1 -p 12122
2) docker rm "/sandbox-hdf"
3) cd start_scripts
4) ./start_sandbox.sh
5) If it started successfully, you should see this message: Successfully Started HDF Sandbox Container
6) try hitting the URL again: http://127.0.0.1:18888/
A better way to go with the Sandbox VMs is to use the "save the machine state" rather than power off from the VirtualBox shutdown options. This acts more like a suspend/resume and will preserve the Docker container.
As always, if you find this post useful, please "accept" the answer.
Created 05-19-2017 10:36 PM
I am able to reproduce this, and will be reporting it in. I suspect that it has to do with the fact that Docker is being used within the appliance for the HDF Sandbox. When the Sandbox is being aburptly shutdown, the Docker container inside has doesn't cleanly stop. When you reboot, Docker see's a conflict as a container is already started with the same name:
docker: Error response from daemon: Conflict. The container name "/sandbox-hdf" is already in use by container.
When you are using port -12122, you are not SSH'ing to the HDF Sandbox, but to the OS host that the Docker container runs inside of. Instead, Port 12222 will SSH you into the HDF Sandbox VM. If you try to ssh on port 12222, you may find that it does not work because the HDF Sandbox isn't running (the Docker conflict we noted above).
To resolve the issue from this state, you'll have to rm the Docker container and use the included start scripts to redeploy it:
1) ssh root@127.0.0.1 -p 12122
2) docker rm "/sandbox-hdf"
3) cd start_scripts
4) ./start_sandbox.sh
5) If it started successfully, you should see this message: Successfully Started HDF Sandbox Container
6) try hitting the URL again: http://127.0.0.1:18888/
A better way to go with the Sandbox VMs is to use the "save the machine state" rather than power off from the VirtualBox shutdown options. This acts more like a suspend/resume and will preserve the Docker container.
As always, if you find this post useful, please "accept" the answer.
Created 05-20-2017 07:34 AM
Thank you Sonu, I will try this and get back to you.
Created 05-21-2017 08:43 AM
Perfect solution. Thanks a lot Sonu..