tomwhite/whirr-scm — Issue #3: Hue fails to start up (Everything else works)
Author: misterbeebee
Created: 2011-11-30 01:17:57+00:00
State: open

I'm trying to run whirr-scm with whirr-0.5.0+4.2-1.noarch from Cloudera.

* I am able to start up a cluster using whirr and the whirr-scm plugin .jar file
* using the same AMI and EC2 zone as the whirr-scm sample .properties file.
*I can access the SCM website at http://ec2-MY_IP.compute-1.amazonaws.com:7180

*I got through the first-run config to install my username public/private keys and all that jazz.
* **Everything starts up** nice (HBase, HDFS, MapReduce,Zookeeper)
* **except HUE.**

"Cluster Services startup" page shows:
* Service did not start successfully; not all of the required roles started: The Hue Server is not running well.*

The error log in the HUE section shows this, **repeated 4 times**:

```
Tue Nov 29 19:21:58 EST 2011 Traceback (most recent call last): File
"/tmp/buildroot/usr/share/hue/desktop/core/src/desktop/manage_entry.py", line 41, in entry File
"/tmp/buildroot/usr/share/hue/desktop/core/src/desktop/settings.py", line 168, in ? File
"/tmp/buildroot/usr/share/hue/desktop/core/src/desktop/appmanager.py", line 200, in load_libs File
"/tmp/buildroot/usr/share/hue/desktop/core/src/desktop/appmanager.py", line 112, in __init__ File
"/tmp/buildroot/usr/share/hue/desktop/core/src/desktop/appmanager.py", line 144, in _load_settings_module File
"/tmp/buildroot/usr/share/hue/desktop/core/src/desktop/appmanager.py", line 53, in _import_module_or_none ImportError: No module named settingsager.py", line 53, in _import_module_or_none ImportError: No module named settings
```

The corresponding message in stdout is:

```
HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/20-hue-HUE_SERVER
HADOOP_HOME=/usr/lib/hadoop
HADOOP_CONF_DIR=/var/run/cloudera-scm-agent/process/20-hue-HUE_SERVER/hadoop-conf
HIVE_HOME=/usr/lib/hive
HIVE_DEFAULT_XML=/usr/lib/hive/conf/hive-default.xml
HIVE_CONF_DIR=/var/run/cloudera-scm-agent/process/20-hue-HUE_SERVER/hive-conf
HBASE_CONF_DIR=/var/run/cloudera-scm-agent/process/20-hue-HUE_SERVER/hbase-conf

Executing /usr/share/hue/build/env/bin/hue runcpserver
```

This is before I customized anything (except my username and RSA keys), so I'm at a loss for what could be wrong.

I know a bit of Python, and I took a look at those files in a local copy of HUE (the version that CDH ships in the CDH3 RPM.

It seems that appmanager.py is trying to import something called ```module._name__ + ".settings"`,
and the ```module``` comes from a list provided by

```
for lib in pkg_resources.iter_entry_points("desktop.sdk.lib"):
m = lib.load()
```
...I can't see what the value of ```m``` is supposed to be. I think it's one of (each of?) the hue components (like ``shell``, etc).

But I lose the trail at "desktop.sdk.lib; it's something to do with setuptools....

```
/usr/share/hue/desktop/libs/hadoop/src/hadoop.egg-info/entry_points.txt
[desktop.sdk.lib]
```

```
/usr/share/hue/desktop/libs/hadoop/setup.py:
entry_points = { 'desktop.sdk.lib': 'hadoop=hadoop' },
```

**Does HUE work for anyone else under whirr-scm?**

Is this a problem with my deployment, or a known incompleteness in whirr-scm?

**I'd be happy to provide admin credentials to a whirr-scm dev if you want to poke around in a cluster I spin up.**

Of course, I don't expect anyone to debug my deployment, but I'd be reassured if someone could say:

* **"HUE fails for me too"** or
* **"HUE works for me, here's my whirr .properties file"**