cloudera / hue

Open source SQL Query Assistant service for Databases/Warehouses
https://cloudera.com
Apache License 2.0
1.17k stars 366 forks source link

KeyError: "Couldn't get user id for user hue" #27

Closed gavenpeng closed 11 years ago

gavenpeng commented 11 years ago

[root@hbase2 hue]# build/env/bin/supervisor Traceback (most recent call last): File "build/env/bin/supervisor", line 8, in load_entry_point('desktop==2.3.0', 'console_scripts', 'supervisor')() File "/home/chamago/hue/desktop/core/src/desktop/supervisor.py", line 312, in main setup_user_info() File "/home/chamago/hue/desktop/core/src/desktop/supervisor.py", line 253, in setup_user_info desktop.lib.daemon_utils.get_uid_gid(SETUID_USER, SETGID_GROUP) File "/home/chamago/hue/desktop/core/src/desktop/lib/daemon_utils.py", line 45, in get_uid_gid raise KeyError("Couldn't get user id for user %s" % (username,)) KeyError: "Couldn't get user id for user hue"

romainr commented 11 years ago

Hue is running as the 'hue' user. It seems this user does not exist on your system.

Could you do a: adduser hue ...

and retry?

gavenpeng commented 11 years ago

thanks you ,I create the 'hue' user,r un the command no show the error,but show other error,the msg is

Traceback (most recent call last): File "/home/chamago/hue/desktop/core/src/desktop/supervisor.py", line 150, in run self.popen_kwargs) File "/usr/lib64/python2.6/subprocess.py", line 639, in init**

errread, errwrite)

File "/usr/lib64/python2.6/subprocess.py", line 1228, in _execute_child raise child_exception OSError: [Errno 13] Permission denied

i give the hue 777 permission ,also display the error message,i don't know the permission of which user

romainr commented 11 years ago

You installed Hue in /home/chamago apparently.

login as chamago cd /home/chamago/hue sudo chmod -R 777 /var/lib/hive/metastore/metastore_db build/env/bin/supervisor

or at least the webserver

./build/env/bin/hue runserver sudo chmod -R 777 /var/lib/hive/metastore/metastore_db ./build/env/bin/hue beeswax_server

jerry-x commented 10 years ago

maybe you use root to install hue,change the owner and group of the directory where you install hue,such as chown -R hue:hadoop /root_directory_name_of_hue

Errol-n commented 9 years ago

That worked for me. Do not forget to create the Hue user. It was just so that the Hue user didn't have read rights to the db