Support Questions

Find answers, ask questions, and share your expertise

Unable to connect to HDP 2.5 using putty when 127.0.0.1 IP is generated

avatar
Contributor

Hi, I did a lot of work on HDP 2.4 sandbox on VMWare Player and it worked like charm. I decided to download the HDP 2.5 (to check out the latest offerings) and that too the Virtualbox image and thats when all my troubles began . All hell breaks loose in acquiring an IP address for guest machine. Attached are screenshots for Network Options

8449-default-settings-hdp2-5.jpg

and the final outcome when VM is up after around 10-15 minutes on my machine (i7 Dual Core, 16 Gb RAM) is that

127.0.0.1:8888 IP generated.

And putty fails to connect to this IP .

My questions -

1) Why is it unable to generate a proper IP like it did for HDP 2.4 on VMware (am i doing something wrong)

2) How to get putty to connect to this IP (if at all possible)

1 ACCEPTED SOLUTION

avatar
Super Guru

@Nitin Saraswat

The HDP 2.4 Sandbox VM was a single Linux VM. The HDP 2.5 Sandbox VM is a LInux VM with a docker container that runs inside it. Therefore it is a little more complicated.

You mention using PuTTY to connect to 127.0.0.1:8888. That address is for the web interface. It does not provide an SSH connection that PuTTY needs. To SSH into the Docker container, you use port 2222.

Using the Virtualbox interface, you can always log directly into the VM console. The default username is root and the default password is hadoop. This is a more direct route to troubleshoot what's going on. Just remember that the VirtualBox console logs you into the Linux VM, not the Docker container.

View solution in original post

9 REPLIES 9

avatar
Super Guru
@Nitin Saraswat

Are both machines running simultaneously ?

Can you try login to Sandbox 2.5 and get IP using ifconfig and access all urls using that ip ?

avatar
Super Guru

@Nitin Saraswat

The HDP 2.4 Sandbox VM was a single Linux VM. The HDP 2.5 Sandbox VM is a LInux VM with a docker container that runs inside it. Therefore it is a little more complicated.

You mention using PuTTY to connect to 127.0.0.1:8888. That address is for the web interface. It does not provide an SSH connection that PuTTY needs. To SSH into the Docker container, you use port 2222.

Using the Virtualbox interface, you can always log directly into the VM console. The default username is root and the default password is hadoop. This is a more direct route to troubleshoot what's going on. Just remember that the VirtualBox console logs you into the Linux VM, not the Docker container.

avatar
Contributor

@Sagar Shimpi - I deleted the HDP 2.4 and downloaded fresh HDP 2.5 and imported into VirtualBox. I worked on HDP 2.4 using VMware. I can login to Sandbox and ifconfig yields 3 IPs - pertaining to broadcast, local loopback and one more. The strange thing is I can access ambari URL at :

127.0.0.1:8080 and login using maria_dev

avatar
Super Guru

@Nitin Saraswat Can you login to the VM and try below command -

$netstat -taupen |grep 8080

avatar
Contributor

@Michael Young - Thanks for sharing the info. I should have read the documentation first 🙂 .

You are correct I need to use Port 2222 to login HDP 2.5 VM using ssh connection and IP should be 127.0.0.1 . I was in a fix as to why 127.0.0.1 IP was generated (I thought a distinct IP should have been generated). Did you also get this IP or did you get a distinct one.

Thanks a ton mate!

avatar
Super Guru

@Nitin Saraswat

My VM instance has 2 network interfaces. The first interface is using NAT, which enables internet access. The second interface should be host-only adapter. This is the interface that provides the IP address you were likely expecting. The reason that 127.0.0.1 works is that VirtualBox is using port forwarding to pass requests on your computer from 2222 to 22 in the VM.

Here is a screenshot of my NAT interface:

8455-screen-shot-2016-10-12-at-85256-am.png

Here is a screenshot of my host-only adapter.

8456-screen-shot-2016-10-12-at-85308-am.png

To get the IP address of the host-only adapter, you need to go to the main VirtualBox Preferences via the main menu. Click on the Network button. You should see something similar to this (you may have more or less host-only networks):

8457-screen-shot-2016-10-12-at-85709-am.png

If your host-only adapter is on vboxnet0, then select that network and click the small screwdriver icon. Then you should see something similar to this:

8458-screen-shot-2016-10-12-at-85719-am.png

You may have a different IP configuration. VirtualBox will typically give your VM the same address every time. However, I've noticed that sometimes it will bounce between 172.28.128.3 and 172.28.128.4.

avatar
Contributor

@Sagar Shimpi - the approach to login using PUTTY is - IP: 127.0.0.1 and port :2222 (since ssh to docker is at this port) and then change the password from 'hadoop' immediately after first login . HTH

avatar

If you are trying to SSH, you could always use the built in SSH Web Client. Go to the splash screen on host:8888 (ie 127.0.0.1:8888) and click on the advance side and then you will see some additional URLs included the web SSH client.

avatar
Contributor

Thanks @Rafael Coss ! I never explored this option. Its handy.