I recently had to reinstall my HortonWorks sandbox and stumbled up on an unexpected error. If you are not aware of HDP 2.5 sandbox, it is Docker image for VirtualBox which contains all components of HortonWorks Data Platform (HDP). These sandboxes are used for learning the hadoop eco-system and doing simple POCs. You should never use them in a production like environment or for processing huge amount of data.
I had downloaded HDP 2.5 image from HortonWorks website and also installed the VirtualBox on my laptop. Once I finished the HDP installation I tried to access the Ambari console as mentioned in the documentation.
From the SandBox splash window I tried to open Ambari login page using http://127.0.0.1:8080. An authentication pop up came and I tried multiple combination of user Ids and passwords but nothing worked.
After a few minutes of googling I stumbled up on the below article from HortonWorks community forum and I was able to login to Ambari console by following it.
To fix the issue, go to VirtualBox console and right-click on your VM and then go to settings.
Move to network tab and click on the advanced option.
Then, click on port forwarding button and you can see a list of HDP services along with their port numbers.
Now scroll down and select Ambari, change the host port to 8081.
Save the changes and go back to your browser, type http://localhost:8081
Now you will get Ambari console login window and you can login using raj_ops/raj_ops or with your Ambai admin credentials.