Support Questions

Find answers, ask questions, and share your expertise

Can you please have a look at below mentioned HUE issue and help in understanding root cause ?

[01/Aug/2016 01:31:55 +0000] access       WARNING  10.32.151.30 fos6211 - "POST /accounts/login/ HTTP/1.0" -- Failed login for user "fos6211"
[01/Aug/2016 05:12:58 +0000] middleware   INFO     Processing exception: unable to open database file: Traceback (most recent call last):
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/hue/desktop/core/src/desktop/auth/views.py", line 134, in dt_login
    login(request, user)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/contrib/auth/__init__.py", line 69, in login
    user.save()
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/models/base.py", line 434, in save
    self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/models/base.py", line 500, in save_base
    rows = manager.using(using).filter(pk=pk_val)._update(values)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/models/query.py", line 491, in _update
    return query.get_compiler(self.db).execute_sql(None)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/models/sql/compiler.py", line 861, in execute_sql
    cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/models/sql/compiler.py", line 727, in execute_sql
    cursor.execute(sql, params)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/backends/util.py", line 15, in execute
    return self.cursor.execute(sql, params)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/db/backends/sqlite3/base.py", line 200, in execute
    return Database.Cursor.execute(self, query, params)
DatabaseError: unable to open database file
[01/Aug/2016 11:58:55 +0000] middleware   INFO     Redirecting to runcpserver.txtlogin page: /about/
[01/Aug/2016 11:58:55 +0000] access       INFO     10.53.252.29 -anon- - "GET /about/ HTTP/1.0" -- login redirection
[01/Aug/2016 11:58:58 +0000] middleware   INFO     Processing exception: /dev/urandom not found: Traceback (most recent call last):
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/lib/hue/desktop/core/src/desktop/auth/views.py", line 134, in dt_login
    login(request, user)
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/contrib/auth/__init__.py", line 78, in login
    request.session.cycle_key()
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/contrib/sessions/backends/base.py", line 248, in cycle_key
    self.create()
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/contrib/sessions/backends/db.py", line 36, in create
    self.session_key = self._get_new_session_key()
  File "/usr/lib/hue/build/env/lib/python2.6/site-packages/Django-1.2.3-py2.6.egg/django/contrib/sessions/backends/base.py", line 142, in _get_new_session_key
    % (randrange(0, MAX_SESSION_KEY), pid, time.time(),
  File "/usr/lib64/python2.6/random.py", line 201, in randrange
    return int(istart + self._randbelow(width))
  File "/usr/lib64/python2.6/random.py", line 248, in _randbelow
    r = getrandbits(k)
  File "/usr/lib64/python2.6/random.py", line 812, in getrandbits
    x = long(_hexlify(_urandom(bytes)), 16)
NotImplementedError: /dev/urandom not found
1 ACCEPTED SOLUTION

Super Guru

@kishore sanchina

I had fixed it yesterday by increasing ulimit. Error shown in provided logs were pointing to ulimit issue.

nofile is variable for number of open files and nproc is number of processes limit for hue user.

View solution in original post

7 REPLIES 7

Super Guru

@kishore sanchina

Can you please check your /etc/hue/conf/hue.ini file and see below variable

 [[database]]
    engine=sqlite3
    name=/var/lib/hue/desktop.db

Can you please check if path to desktop.db or any db name according to your configuration exists? By looking at the error, it looks like path issue/permission issue or database is missing.

Thanks a lot @kuldeep kulkarni

@Kuldeep Kulkarni The support engineer advised to edit /etc/security/limits.conf, and add the following lines:

hue - nofile 32768

hue - nproc 65536

And then restart Hue. Still not sure how he came to this value for nofile, and nproc, but this value is higher than the default, and should prevent this in the future.

please explain what is nofile and nproc..?

Super Guru

@kishore sanchina

I had fixed it yesterday by increasing ulimit. Error shown in provided logs were pointing to ulimit issue.

nofile is variable for number of open files and nproc is number of processes limit for hue user.

@Kuldeep Kulkarni how to change ulimit value. please explain step by step .

Super Guru

@kishore sanchina

Let's say you want to set ulimit for user 'kishore', please login to the system via root and edit /etc/security/limits.conf

Add below lines in it

kishore - nofile 32768
kishote - nproc 65536

Here basically we are increasing number of open files limit to 32K and number of processes limit to 65K

Super Guru

@kishore sanchina - If this information helps then please accept the appropriate answer to close this question 🙂 Thank you.

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.