Search code examples
djangohadoopamazon-ec2hdfshue

Started Hue Server, CLI says 8000, config says 8888, in reality: Nothing


I have started a Hue Server running on an EC2 instance with a pseudo distributed setup of HDFS. When I start the server, the CLI states that the server is running on localhost:8000:

0 errors found                                                                                                                                                
<CURRENT DATE>                                                                                                                                    
Django version 1.6.10, using settings 'desktop.settings'                                                                                                      
Starting development server at http://127.0.0.1:8000/                                                                                                         
Quit the server with CONTROL-C.

However, the config tells it to launch on localhost:8888:

### hue.ini sample

# Webserver listens on this address and port
http_host=0.0.0.0
http_port=8888       

Cool, whatever. But when I try to access the Hue UI using the EC2's public IP (<public IP>:8000 and <public IP>:8888), nothings shows up on neither port 8000 nor port 8888. I've tried to change hue.ini to point to port 8000, which does nothing.

I have created the necessary security groups to allow my machine to access the port.

Here is some of the debugging I have done:

>> sudo netstat -atnp | grep 8000
tcp        0      0 127.0.0.1:8000          0.0.0.0:*              LISTEN      22644/python2.7

>> sudo netstat -atnp | grep 8888
**NOTHING**

>> lsof -i:8000 
**NOTHING**

>> lsof -i:8888
**NOTHING**

>> ps -ef | grep hue
root    22644    1  0 23:08 pts/0    00:00:18 /usr/local/lib/hue/build/env/bin/python2.7 ./build/env/bin/hue run server

So, nothing is listening on port 8000 and port 8888, but Hue's process is running (at least I think). Why is this happening? How can I work around this to access the Hue UI?


Solution

  • You seem to start the dev server, the command should look like

    ./build/env/bin/hue runserver 0.0.0.0:8000

    if you want it to be accessible from another host (and probably need a nohup ... &).

    Note that

    ./build/env/bin/hue runcpserver

    is the correct command for starting the production server.

    You can also check with hue.ini is picked-up later by looking at the /dump_config page when you can access it.