Accessing Hue on Cloudera Docker QuickStart

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/

  • Resource Manager Has No Nodes
  • Why cloudera likes to make name node and data node dir in /etc/hosts
  • Cloudera Docker image … everthing errors out
  • Cloudera and Docker
  • Docker and Cloudera Quick start: How to run own jar-file?
  • Running impala sql script from Docker file
  • 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

    enter image description here

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

  • What's the difference between Docker and Rocket from CoreOS?
  • Automatically mounting host folders other than c:\Users in Docker images in Windows
  • How to setup multiple docker containers for multiple developers on the same host?
  • Allow more memory when docker build a Dockerfile
  • Bind a directory to a docker container
  • Docker install nginx
  • 5 Solutions collect form web for “Accessing Hue on Cloudera Docker QuickStart”

    Since you’re running the docker machine inside a VM, you need to open the port on VirtualBox.

    You can do this from the Port Forwarding button in the network adapter panel in VirtualBox.

    Settings > Network > Advanced > Port Forwarding

    You should see an SSH port already being forwarded for docker. Just add any additional ports like that one.

    And here are lists of all the ports used by CDH. Of course you don’t need all of them. I would suggest at least Cloudera Manager (7180), namenode and datanode UI (50070 & 50075), and the job servers like mapreduce (8088,8042 & 10020) or spark (18080 & 18081). And I personally don’t use it, but Hue is 8888.

    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.

    I have encountered the same issue here, and resolved now based on the comments and posts above. There are two issues mentioned above:

    1. Failed to start Hue.
      In my case, this is caused by limited resources allocated with default docker VM settings. According to @Ronald Teo’s answer, going to

      VirtualBox -> ‘default’[your docker-machine name] -> Settings ->
      System

      , increase base memory to 8192MB, and processors to at least 3, have fixed my problem.

    2. Can not access Hue from my host machine. Based on the original post, Try docker run --privileged=true --hostname=quickstart.cloudera -p 7180:7180 -p 8888:8888 -t -i 9f3ab06c7554 /usr/bin/docker-quickstart should solve this problem.

    The same issue happened to me. I was able start hue successfully after increasing the number of CPUs in VirtualBox.
    I also increased the amount of RAM earlier. The original CPU I had was 1, changed to 3

    Screenshot of virtual box cpu settings -> Click here

    Restart Hue after container is up

    Increase the memory of docker to 8GB if you can. Otherwise, set it at least 4GB.
    Let hue fail while starting the container.
    After that, attach to the docker container and access its shell to run the following command,

    To stop the Hue Server:

    $ sudo service hue stop

    To start the Hue Server:

    $ sudo service hue start

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.