Question

I have installed the cloudera quickstart using docker based on the instructions given here.

https://blog.cloudera.com/blog/2015/12/docker-is-the-new-quickstart-option-for-apache-hadoop-and-cloudera/

docker run --privileged=true --hostname=quickstart.cloudera -p 7180 -p 8888 -t -i 9f3ab06c7554 /usr/bin/docker-quickstart

You can see that I am doing -p 7180 and -p 8888 for port mapping.

when the container booted successfully. I saw that the hue service startup failed. but i ran it manually using sudo service hue restart and it showed OK.

Now I ran

/home/cloudera/cloudera-manager --express --force

this command was successful I got a message to connect to the CM using http://cloudera.quickstart:7180

Now on my host machine I did docker-machine env default and I could see the output

export DOCKER_TLS_VERIFY="1"
export DOCKER_HOST="tcp://192.168.99.100:2376"
export DOCKER_CERT_PATH="/Users/abhishek.srivastava/.docker/machine/machines/default"
export DOCKER_MACHINE_NAME="default"

Now in my browser on host machine I did

http://192.168.99.100:7180
http://192.168.99.100:8888
http://quickstart.cloudera:7180
http://quickstart.cloudera:8888

but everything fails to connect to any page. So even after doing port forwarding... I am not able to access either cloudera manager or HUE UI from the host machine.

I am using OSX.

I also went into virtualbox manager UI and selected the default VM. I went into settings -> network -> port forwarding. and made the following entries

 

but still I cannot access the cloudera manager and HUE....

Answer:

 

 

When you run docker using -p 7180 and -p 8888, it will allocate a random port on your windows host. However, if you use -p 7180:7180 and -p 8888:8888, assuming those ports are free on the host, it will map them directly.

Otherwise you can execute docker ps and it will show you which ports it mapped the 7180 and 8888 to. Then in your host browser you can enter

http://192.168.99.100:<docker-allocated-port>

instead of

http://192.168.99.100:7180

If its all on your local machine, you shouldn't need the port forwarding.

 

 


Other Popular Courses