Created on 03-04-2016 11:25 AM - edited 09-16-2022 03:07 AM
Hello guys, I am trying to setup livy_server for the spark notebooks to work with Hue 3.9.0 with CDH 5.6.0. I am facing the following error:
livy server is failing to start with hue database password error:
[root@xxxxxx hue]# ./build/env/bin/hue livy_server
Traceback (most recent call last):
File "./build/env/bin/hue", line 12, in <module>
load_entry_point('desktop==3.9.0', 'console_scripts', 'hue')()
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/manage_entry.py", line 57, in entry
execute_from_command_line(sys.argv)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/management/__init__.py", line 399, in e xecute_from_command_line
utility.execute()
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/management/__init__.py", line 392, in e xecute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/management/__init__.py", line 261, in f etch_command
commands = get_commands()
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/core/management/__init__.py", line 107, in g et_commands
apps = settings.INSTALLED_APPS
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/conf/__init__.py", line 128, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/utils/importlib.py", line 40, in import_modu le
__import__(name)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/settings.py", line 309, in <module>
"PASSWORD" : desktop.conf.get_database_password(),
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/conf.py", line 1219, in get_database_password
password = DATABASE.PASSWORD_SCRIPT.get()
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/lib/conf.py", line 140, in get
return self.config.get_value(data, present=present, prefix=self.prefix, coerce_type=True)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/lib/conf.py", line 256, in get_value
return self._coerce_type(raw_val, prefix)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/lib/conf.py", line 276, in _coerce_type
return self.type(raw)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/conf.py", line 66, in coerce_password_from_script
raise subprocess.CalledProcessError(p.returncode, script)
subprocess.CalledProcessError: Command '/var/run/cloudera-scm-agent/process/4295-hue-HUE_SERVER/altscript.sh sec-8-password' returned non-zero exit status 1I made sure current hue password set in CM is working fine.
Please help here.
Created 03-05-2016 06:34 PM
Created 03-04-2016 11:51 AM
Hello, Even im facing the same issue.Could anyone please help .
Created 03-05-2016 06:34 PM
This is now fixed.
Created 03-06-2016 05:42 AM
Congratulations on solving your issue @vganji. Would you mind sharing your solution in case it can assist others?
Created 03-31-2016 05:48 AM
Created 11-25-2016 10:53 AM
Vganji,
How did you solve it?
Thanks,
Bramd
Created 11-25-2016 06:54 PM
In Cloudera Manager 5.5 and higher, service passwords are stored in Cloudera Manager so that they are not exposed in the process directories. As part of this, the passwords are stored in a jceks file in each process directory. A password is then passed to the start scripts to decrypt the file containing the passwords.
When attempting to run the "hue" command from the command line, you will get the following:
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/lib/conf.py", line 276, in _coerce_type
return self.type(raw)
File "/opt/cloudera/parcels/CDH-5.6.0-1.cdh5.6.0.p0.45/lib/hue/desktop/core/src/desktop/conf.py", line 66, in coerce_password_from_script
raise subprocess.CalledProcessError(p.returncode, script)
subprocess.CalledProcessError: Command '/var/run/cloudera-scm-agent/process/4295-hue-HUE_SERVER/altscript.sh sec-8-password' returned non-zero exit status 1
This is because "altscript.sh" was not passed the password from CM.
To help allow you to be able to run commands from the commandline, I suggest trying:
# export HUE_CONF_DIR=/var/run/cloudera-scm-agent/process/`ls -lrt /var/run/cloudera-scm-agent/process/ | awk '{print $9}' |grep HUE_SERVER| tail -1`
# HUE_IGNORE_PASSWORD_SCRIPT_ERRORS=1 HUE_DATABASE_PASSWORD=password /opt/cloudera/parcels/CDH/lib/hue/build/env/bin/hue livy_server
Since the Spark Notebook is not supported in CDH yet, we cannot guarantee it will work as desired, but at the least, the steps I give should help you get around the exception that @vganji mentioned.
Created 11-30-2016 08:28 AM