Support Questions

Find answers, ask questions, and share your expertise

Cannot run hadoop commands in HDP Sandbox

avatar
Contributor

Hi, My questions is somehow similar to this one, but it is still not clear for me. So I ask it again:

I am running HDP Sandbox on VMware in Win 10. I can successfully connect to sandbox using SSH and port 2222 and run hadoop commands. However, on virtual machine itself where sandbox image is loaded, I cannot run and hadoop commands. So everytime I want to run hadoop commands, do I need to use SSH command and putty?

1 ACCEPTED SOLUTION

avatar
Master Mentor

@Sadegh

Sandbox runs on docker container. So some profile configs are loaded only when you do "ssh on port 2222"

This is the way port forwarding works is that it exposes port 22 of the sandbox machine to the outside network of your PC via port 2222.

# ssh root@127.0.0.1  -p 2222

Or using putty on port 2222 ssh port.

.

But alternatively you can also try using the WebTerminal to run the commands like:

http://localhost:4200/

.

View solution in original post

7 REPLIES 7

avatar
Master Mentor

@Sadegh

Sandbox runs on docker container. So some profile configs are loaded only when you do "ssh on port 2222"

This is the way port forwarding works is that it exposes port 22 of the sandbox machine to the outside network of your PC via port 2222.

# ssh root@127.0.0.1  -p 2222

Or using putty on port 2222 ssh port.

.

But alternatively you can also try using the WebTerminal to run the commands like:

http://localhost:4200/

.

avatar
Contributor

Are you able to run hadoop commands in your sandbox?

avatar
Master Mentor

@Sadegh

Yes, After doing ssh on the designed and documented port 2222 i am able to do so.

HW11189:ambari jsensharma$ ssh root@127.0.0.1 -p 2222
Last login: Fri May 26 07:27:30 2017 from 10.0.2.2
[root@sandbox ~]# hdfs
Usage: hdfs [--config confdir] [--loglevel loglevel] COMMAND
       where COMMAND is one of:
  dfs                  run a filesystem command on the file systems supported in Hadoop.
  classpath            prints the classpath
  namenode -format     format the DFS filesystem

.

Port 2222 is must to be used.

https://hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

avatar

FYI ... you can learn more basic tips of working with the HDP Sandbox with this tutorial:

https://hortonworks.com/hadoop-tutorial/learning-the-ropes-of-the-hortonworks-sandbox/

avatar

@Sadegh

You have installed the sandbox on windows 10 machine. Its not like that you have installed Hadoop onto your system. thats why whenever you want execute hadoop commands you will need to SSH from putty itself and then you can execute the hadoop command into that shell.

avatar
Contributor

Yes I know. However it seems logical that hadoop commands should run on virtual machine itself because I am using ssh to connect with it. isn't it?

avatar
Expert Contributor

@Sadegh, even you can try to SSH as localhost Ex: ssh root@localhost -p 2222