Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

How to add port forwarding in HDP Sandbox 2.6.5?

Solved Go to solution
Highlighted

How to add port forwarding in HDP Sandbox 2.6.5?

New Contributor

Hello community!

I have a problem with the last version of the HDP Sandbox (2.6.5), I know about this article explaining the new architecture but I still don't understand how I can add new ports. Could someone please explain in simple steps how to do this?

I would like to add the MySQL port.

Any help would be appreciated!

1 ACCEPTED SOLUTION

Accepted Solutions

Re: How to add port forwarding in HDP Sandbox 2.6.5?

New Contributor

I asked the same question on Github and they answered me, this was what worked for me.

Read the vineshcpaul's answer.

I copy it here:

If you have HDP 2.6.5 VM deployed, there should be a file name generate-proxy-deploy-script.sh under /sandbox/deploy-scripts/assets. Please try editing the script to add a port that you want to forward. There are 2 arrays defined in the script, one is called tcpPortsHDP, add a new entry in the following format considering port 23232 as the one you need to forward.
[23232]=23232.
Once the change is made, rerun the script
cd /sandbox/deploy-scripts
assets/generate-proxy-deploy-script.sh

This generate as new script proxy-deploy.sh under /sandbox/deploy-scripts/sandbox/proxy/proxy-deploy.sh

execute proxy-deploy.sh to get the new reverse proxy deployed.
cd /sandbox/deploy-scripts
sandbox/proxy/proxy-deploy.sh
Also, the port needs to be forwarded on the virtualbox as well .
VirtualBox -> settings -> network -> Advanced -> port forwarding -> add new port forwarding rule

5 REPLIES 5

Re: How to add port forwarding in HDP Sandbox 2.6.5?

Mentor

@Krystle Salazar

There is no better resource than this HW KB document on port forwarding HDP 2.5 VirtualBox Sandbox

If that helped please accept the answer to close the thread Happy HDP'ing

HTH

Re: How to add port forwarding in HDP Sandbox 2.6.5?

New Contributor

Hello @Geoffrey Shelton Okot sorry for my late response, but that tutorial doesn't work anymore for version 2.6.5 of the sandbox.

Just trying to execute the first command already gives error.

92773-captura.png

And the ´start_scripts´ is not found in the ´/root' directory. I know that that tutorial works well until version 2.6.4, however this is not the case why I ask.

So again, is there a way to add ports forwarding in the new version?

Re: How to add port forwarding in HDP Sandbox 2.6.5?

New Contributor

I asked the same question on Github and they answered me, this was what worked for me.

Read the vineshcpaul's answer.

I copy it here:

If you have HDP 2.6.5 VM deployed, there should be a file name generate-proxy-deploy-script.sh under /sandbox/deploy-scripts/assets. Please try editing the script to add a port that you want to forward. There are 2 arrays defined in the script, one is called tcpPortsHDP, add a new entry in the following format considering port 23232 as the one you need to forward.
[23232]=23232.
Once the change is made, rerun the script
cd /sandbox/deploy-scripts
assets/generate-proxy-deploy-script.sh

This generate as new script proxy-deploy.sh under /sandbox/deploy-scripts/sandbox/proxy/proxy-deploy.sh

execute proxy-deploy.sh to get the new reverse proxy deployed.
cd /sandbox/deploy-scripts
sandbox/proxy/proxy-deploy.sh
Also, the port needs to be forwarded on the virtualbox as well .
VirtualBox -> settings -> network -> Advanced -> port forwarding -> add new port forwarding rule

Re: How to add port forwarding in HDP Sandbox 2.6.5?

New Contributor

Dear Krystle,

Please take a look. I tried your approach. The proxy-deploy is generated at a different path.

93516-test.png

,

Dear Krystle,

What did I do wrong? You connect to port 22 ...righT?

I ran this file "/sandbox/deploy-scripts/assets/generate-proxy-deploy-script.sh" from the root directory "/". Like this "bash /sandbox/deploy-scripts/assets/generate-proxy-deploy-script.sh"

This file is genereated at different path "proxy-deploy.sh"

93515-test.png

Re: How to add port forwarding in HDP Sandbox 2.6.5?

New Contributor

I tried this in HDP3.0.1 everything at first seems ok and all services are started but then I found that I cannot start spark-shell, the error prompted that port 4040 cannot be bind. Seems I broke the proxy setting when modifying the file. Really would like to have some hints to go further...