Cloudera Hadoop distribution: Hue troubles (cont’d)

“Service did not start successfully; not all of the required roles started. The Hue server is not running well.”

If you ever get one of those messages, make sure to check stderr.log and stdout.log in the following location:

/var/run/cloudera-scm-agent/process/51-hue-HUE_SERVER/logs

In your case, the numeric part of the folder name (51) may be higher – as subsequent attempts to install/reinstall/start Hue appear to be creating new folders.

Our error log contained the following information:

File “/usr/local/lib/python2.4/logging/handlers.py”, line 30, in ?
   import sys, logging, socket, types, os, string, cPickle, struct,
time, glob
ImportError: /usr/share/hue/build/env/lib/python2.4/lib-dynload/
cPickle.so: undefined symbol: PyUnicodeUCS4_DecodeRawUnicodeEscape

According to various forums, there are many reasons you may be getting this error.  We decided to look more closely at our Python installation first.  Python can be built with either UCS2-based or UCS4-based Unicode support. Perhaps the Hue scripts are trying to use UCS4-based extensions (as implied by the error string above), while our build is UCS2-based?

[hadoop@hadoop1]# python
Python 2.4.4 (#1, Nov 11 2011, 06:28:24)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-51)] on linux2
Type “help”, “copyright”, “credits” or “license” for more information.
>>>mport sys
>>>sys.maxunicode > 65536 and ‘UCS4’ or ‘UCS2’
>>>’UCS2′

Sure enough, our Python was configured with UCS2 support (default).  We decided to recompile it for UCS4 (–enable-unicode=ucs4).  Python wouldn’t recompile – various errors related to other libraries using UCS2.

What we ended up doing:

1) Hue manual suggests “python-setuptools” is required, but we didn’t have it installed.  So,

sudo yum install python-setuptools
sudo ./configure –enable-unicode=ucs4
sudo make
sudo make install

2) verifying

[hadoop@hadoop1]# python
>>>import sys
>>>sys.maxunicode > 65536 and ‘UCS4’ or ‘UCS2’
>>>’UCS4′

To be continued.


December 19 2011 update: based on our Google Analytics reports, many companies are struggling with similar installation issues.  iTrend will be happy to assist you with your Big Data initiative – we have all necessary engineering resources in-house.  Email your requirements to info@itrend.tv and mention this blog.

Technologist, parallel entrepreneur. Interests: travel, photography, big data, analytics, predictive modeling.

Tagged with: , , , , , ,
Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: