tomwhite / whirr-cm

11 stars 26 forks source link

Hue fails to start up (Everything else works) #3

Open misterbeebee opened 12 years ago

misterbeebee commented 12 years ago

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

*I got through the first-run config to install my username public/private keys and all that jazz.

"Cluster Services startup" page shows:

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:

misterbeebee commented 12 years ago

I realize this issue might be a problem with HUE, not whirr-scm. If so, feel free to close this issue.

I've never successfully installed HUE anywhere else.

I do have a cluster of CentOS 5 machines in-house where I could try to install HUE+SCM without whirr, but I thought it would be easier to get up and running with a preview using Whirr and an AWS AMI that is "certified" for use with CDH.

misterbeebee commented 12 years ago

I just installed SCM (including HUE) on a local cluster in my colo.

So it appears that my problem running whirr-scm HUE is either a misconfiguration in my whirr properties, or an incompatibility between whirr-scm and HUE and EC2.

Since I do have colo hardware at hand for Hadoop, I will proceed on my hardware, but I'd love to know if anyone has insight into this whirr issue. The non-HUE part was very nice.

loren commented 12 years ago

HUE fails for me too. I thought this would be of help: https://groups.google.com/a/cloudera.org/group/cdh-user/browse_thread/thread/771ddd9e4b04d80d/67853adff9905585?lnk=raot

But UCS4 is already enabled in the python that comes on the AMI specified in the properties file.

Anyone else running into this?

philz commented 12 years ago

https://groups.google.com/a/cloudera.org/group/hue-user/browse_thread/thread/e4e7be546070122f# is a thread about this. I believe I've tracked down the RPM package bug that's led to this, but a workaround is to delete all the "*.pyc" files in /usr/share/hue.

loren commented 12 years ago

Phil, thank you for looking into this. I deleted the files and the SCM services finished starting up, including HUE.

misterbeebee commented 12 years ago

I also can now launch HUE after deleteing *.pyc files.

However, when I visit the HUE desktop (http://public-ip.:8088) the HUE desktop loads with an empty desktop. I see

I see the auth_user error that was mentioned on the mailing list:

[06/Dec/2011 01:13:03 +0000] middleware   INFO     Processing exception: no such table: auth_user: Traceback (most recent call last):
  File "/usr/share/hue/build/env/lib/python2.4/site-packages/Django-1.2.3-py2.4.egg/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/share/hue/desktop/core/src/desktop/auth/views.py", line 57, in login_form
    if isinstance(be, AllowFirstUserDjangoBackend) and be.is_first_login_ever():
  File "/usr/share/hue/desktop/core/src/desktop/auth/backend.py", line 165, in is_first_login_ever
    return User.objects.count() == 0
  File "/usr/share/hue/build/env/lib/python2.4/site-packages/Django-1.2.3-py2.4.egg/django/db/models/manager.py", line 120, in count
    return self.get_query_set().count()
  File "/usr/share/hue/build/env/lib/python2.4/site-packages/Django-1.2.3-py2.4.egg/django/db/models/query.py", line 326, in count
    return self.query.get_count(using=self.db)
  File "/usr/share/hue/build/env/lib/python2.4/site-packages/Django-1.2.3-py2.4.egg/django/db/models/sql/query.py", line 394, in get_count
    number = obj.get_aggregation(using=using)[None]
  File "/usr/share/hue/build/env/lib/python2.4/site-packages/Django-1.2.3-py2.4.egg/django/db/models/sql/query.py", line 366, in get_aggregation
    result = query.get_compiler(using).execute_sql(SINGLE)
  File "/usr/share/hue/build/env/lib/python2.4/site-packages/Django-1.2.3-py2.4.egg/django/db/models/sql/compiler.py", line 727, in execute_sql
    cursor.execute(sql, params)
  File "/usr/share/hue/build/env/lib/python2.4/site-packages/Django-1.2.3-py2.4.egg/django/db/backends/sqlite3/base.py", line 200, in execute
    return Database.Cursor.execute(self, query, params)
DatabaseError: no such table: auth_user

This email on hue-users seems has a workaround:

https://groups.google.com/a/cloudera.org/group/hue-user/browse_thread/thread/e271524d8e598ffb#

misterbeebee commented 12 years ago

Workaround worked for me. (Thanks, Loren Siebert!)

I'd like to keep this Issue open until either the root cause is fixed or a link is posted to a more authoritative tracker for this problem.

tazak commented 9 years ago

Hi,

Any idea , I too unable to start hue service in CDH 5.3 see error log

StreamHandler.__init__(self, self._open())

File "/usr/lib64/python2.6/logging/init.py", line 846, in _open stream = open(self.baseFilename, self.mode) IOError: [Errno 13] Permission denied: '/var/log/hue/migrate.log'