Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

hue sync unix accounts - Error

hue sync unix accounts - Error

Contributor

Hello - I get the following error, when i try to sync unix accounts with HUE

 

[root@ip-10-0-0-188 hue]# build/env/bin/hue useradmin_sync_with_unix
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.7.2-1.cdh5.7.2.p0.18/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.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 261, in fetch_command
commands = get_commands()
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 107, in get_commands
apps = settings.INSTALLED_APPS
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/__init__.py", line 54, in __getattr__
self._setup(name)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/__init__.py", line 49, in _setup
self._wrapped = Settings(settings_module)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/conf/__init__.py", line 128, in __init__
mod = importlib.import_module(self.SETTINGS_MODULE)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/utils/importlib.py", line 40, in import_module
__import__(name)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/desktop/core/src/desktop/settings.py", line 242, in <module>
conf.initialize(_desktop_conf_modules, _config_dir)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/desktop/core/src/desktop/lib/conf.py", line 591, in initialize
conf_data = load_confs(_configs_from_dir(config_dir))
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/desktop/core/src/desktop/lib/conf.py", line 523, in load_confs
for in_conf in conf_source:
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/desktop/core/src/desktop/lib/conf.py", line 499, in _configs_from_dir
for filename in sorted(os.listdir(conf_dir)):
OSError: [Errno 36] File name too long: '/var/run/cloudera-scm-agent/process/total 0\ndrwxr-xr-x 4 root root 100 Oct 21 11:55 ccdeploy_etc_-7499926885451336301\ndrwxr-x--x 3 zookeeper zookeeper 280 Oct 21 12:09 932-zookeeper-server\ndrwxr-x--x 3 hdfs hdfs 500 Oct 21 12:09 942-hdfs-NAMENODE\ndrwxr-x--x 3 sentry sentry 280 Oct 21 12:10 944-sentry-SENTRY_SERVER\ndrwxr-x--x 3 mapred hadoop 380 Oct 21 12:10 952-yarn-JOBHISTORY\ndrwxr-x--x 3 yarn hadoop 520 Oct 21 12:10 955-yarn-RESOURCEMANAGER\ndrwxr-x--x 5 sqoop2 sqoop 280 Oct 21 12:11 957-sqoop-SQOOP_SERVER\ndrwxr-x--x 11 root root 220 Oct 21 12:12 .\ndrwxr-x--x 6 hue hue 320 Oct 21 12:12 973-hue-HUE_SERVER\ndrwxr-x--x 4 hue hue 260 Oct 21 12:12 974-hue-KT_RENEWER\ndrwxr-xr-x 6 cloudera-scm cloudera-scm 180 Oct 21 15:51 ..'
[root@ip-10-0-0-188 hue]#

2 REPLIES 2

Re: hue sync unix accounts - Error

Weird, do you actually have a very long file name generated by CM?

OSError: [Errno 36] File name too long:
'/var/run/cloudera-scm-agent/process/total
0\ndrwxr-xr-x 4 root root 100 Oct 21 11:55 ccdeploy_etc_-
7499926885451336301\ndrwxr-x--x 3 zookeeper zookeeper 280 Oct 21 12:09
932-zookeeper-server\ndrwxr-x--x 3 hdfs hdfs 500 Oct 21 12:09
942-hdfs-NAMENODE\ndrwxr-x--x 3 sentry sentry 280 Oct 21 12:10
944-sentry-SENTRY_SERVER\ndrwxr-x--x 3 mapred hadoop 380 Oct 21 12:10
952-yarn-JOBHISTORY\ndrwxr-x--x 3 yarn hadoop 520 Oct 21 12:10
955-yarn-RESOURCEMANAGER\ndrwxr-x--x 5 sqoop2 sqoop 280 Oct 21 12:11
957-sqoop-SQOOP_SERVER\ndrwxr-x--x 11 root root 220 Oct 21 12:12
.\ndrwxr-x--x 6 hue hue 320 Oct 21 12:12 973-hue-HUE_SERVER\ndrwxr-x--x 4
hue hue 260 Oct 21 12:12 974-hue-KT_RENEWER\ndrwxr-xr-x 6 cloudera-scm
cloudera-scm 180 Oct 21 15:51 ..'
Highlighted

Re: hue sync unix accounts - Error

Contributor

I am not getting a whole different error. We are using a MySQL DB thats hosted seperatly, there is no need for it to try and connect to the host server.

 

I checked the hue.ini file in the HUE_HOME directory under /var/run/cloudera-scm-agent/process/1166-hue-HUE_SERVER/, it does have the correct DATABASE settings. 

[root@ip-10-0-0-188 hue]# build/env/bin/hue useradmin_sync_with_unix
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.7.2-1.cdh5.7.2.p0.18/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.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 399, in execute_from_command_line
utility.execute()
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/__init__.py", line 392, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/base.py", line 242, in run_from_argv
self.execute(*args, **options.__dict__)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/management/base.py", line 285, in execute
output = self.handle(*args, **options)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/apps/useradmin/src/useradmin/management/commands/useradmin_sync_with_unix.py", line 47, in handle
sync_unix_users_and_groups(min_uid, max_uid, min_gid, max_gid, check_shell)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/apps/useradmin/src/useradmin/views.py", line 673, in sync_unix_users_and_groups
hue_group = Group.objects.get(name=name)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 151, in get
return self.get_queryset().get(*args, **kwargs)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 304, in get
num = len(clone)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 77, in __len__
self._fetch_all()
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 857, in _fetch_all
self._result_cache = list(self.iterator())
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 220, in iterator
for row in compiler.results_iter():
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 713, in results_iter
for rows in self.execute_sql(MULTI):
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 785, in execute_sql
cursor = self.connection.cursor()
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 162, in cursor
cursor = util.CursorWrapper(self._cursor(), self)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 132, in _cursor
self.ensure_connection()
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection
self.connect()
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/utils.py", line 99, in __exit__
six.reraise(dj_exc_type, dj_exc_value, traceback)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 127, in ensure_connection
self.connect()
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/__init__.py", line 115, in connect
self.connection = self.get_new_connection(conn_params)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/mysql/base.py", line 435, in get_new_connection
conn = Database.connect(**conn_params)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/__init__.py", line 81, in Connect
return Connection(*args, **kwargs)
File "/opt/cloudera/parcels/CDH-5.7.2-1.cdh5.7.2.p0.18/lib/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/connections.py", line 193, in __init__
super(Connection, self).__init__(*args, **kwargs2)
django.db.utils.OperationalError: (1045, "Access denied for user 'hue'@'10.0.0.188' (using password: YES)")

Don't have an account?
Coming from Hortonworks? Activate your account here