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 3.8.1 on centos 7 - How to start it

Solved Go to solution
Highlighted

Hue 3.8.1 on centos 7 - How to start it

Rising Star

I have installed Hue 3.8.1 from tarball and it's running on centos 7. I am not sure how to start hue. 

 

Below is the directory structure.

 

[root@ds hue-3.8.1]# ls -l
total 56
drwxrwxr-x. 21 sitadmin sitadmin  4096 May  4  2015 apps
drwxr-xr-x.  3 root     root        17 Mar 10 23:14 build
drwxrwxr-x.  5 sitadmin sitadmin    58 May  4  2015 desktop
drwxrwxr-x.  6 sitadmin sitadmin   142 May  4  2015 docs
drwxrwxr-x.  3 sitadmin sitadmin    24 May  4  2015 ext
-rw-rw-r--.  1 sitadmin sitadmin 11358 May  4  2015 LICENSE.txt
-rw-rw-r--.  1 sitadmin sitadmin  4715 May  4  2015 Makefile
-rw-rw-r--.  1 sitadmin sitadmin  8505 May  4  2015 Makefile.sdk
-rw-rw-r--.  1 sitadmin sitadmin  3498 May  4  2015 Makefile.vars
-rw-rw-r--.  1 sitadmin sitadmin  2192 May  4  2015 Makefile.vars.priv
drwxrwxr-x.  2 sitadmin sitadmin    21 May  4  2015 maven
-rw-rw-r--.  1 sitadmin sitadmin   801 May  4  2015 NOTICE.txt
-rw-rw-r--.  1 sitadmin sitadmin  1562 May  4  2015 README
drwxrwxr-x.  5 sitadmin sitadmin    89 May  4  2015 tools
-rw-rw-r--.  1 sitadmin sitadmin   932 May  4  2015 VERSION

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

Per documentation, the start command is:

 

/usr/local/hue/build/env/bin/supervisor

If it doesn't start, make sure you have completed the "make apps" command and installed all dependencies.  Also depending on your system you want to chown -R hue:hue /usr/local/hue

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

View solution in original post

9 REPLIES 9
Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

Expert Contributor

@prakashpunj 

The hue-server package includes service scripts to start and stop the Hue Server.

 

To start the Hue Server:

$ sudo service hue start

To restart the Hue Server:

$ sudo service hue restart

To stop the Hue Server:

$ sudo service hue stop

Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

Per documentation, the start command is:

 

/usr/local/hue/build/env/bin/supervisor

If it doesn't start, make sure you have completed the "make apps" command and installed all dependencies.  Also depending on your system you want to chown -R hue:hue /usr/local/hue

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

View solution in original post

Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

Rising Star

I see supervisor.py file got created in different folder than /usr/local/hue. It's in desktop/core/src/desktop folder. I am running as root. Below is what I get

 

[root@ds desktop]# pwd
/root/hue-3.8.1/desktop/core/src/desktop
[root@ds desktop]# ./supervisor
-bash: ./supervisor: No such file or directory
[root@ds desktop]# ./supervisor.py
-bash: ./supervisor.py: Permission denied
[root@ds desktop]# chmod 777 supervisor.py
[root@ds desktop]# ./supervisor.py
Traceback (most recent call last):
  File "./supervisor.py", line 32, in <module>
    from daemon.pidlockfile import PIDLockFile
ImportError: No module named daemon.pidlockfile

 

 

Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

looks like you have it installed as /root/hue-3.8.1

try using /root/hue-3.8.1 instead of /usr/local/hue in the startup command?

 

I would recommend to put it in /usr/local and symlink if not installed as just /hue/ folder:

 

     ln -s /usr/local/hue-3.8.1 /usr/local/hue 

 

also make sure you execute "make apps" in the folder to install everything as the hue user...

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

Rising Star

I managed to install it (version 4.x) of hue on centos but when I hit it from the browser, here is what I get rather than a login screen. 

 

This is what I see when I run the supervisor

[hue@ds hue-4.0.0]$ sudo build/env/bin/supervisor
[sudo] password for hue: 
starting server with options:
{'daemonize': False,
 'host': 'ds.asotc.com',
 'pidfile': None,
 'port': 8888,
 'server_group': 'hue',
 'server_name': 'localhost',
 'server_user': 'hue',
 'ssl_certificate': None,
 'ssl_certificate_chain': None,
 'ssl_cipher_list': 'ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA',
 'ssl_private_key': None,
 'threads': 40,
 'workdir': None}

 

Traceback (most recent call last):
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/lib/wsgiserver.py", line 1215, in communicate
    req.respond()
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/lib/wsgiserver.py", line 576, in respond
    self._respond()
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/lib/wsgiserver.py", line 588, in _respond
    response = self.wsgi_app(self.environ, self.start_response)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/wsgi.py", line 206, in __call__
    response = self.get_response(request)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 153, in get_response
    response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py", line 236, in handle_uncaught_exception
    return callback(request, **param_dict)
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/views.py", line 380, in serve_500_error
    return render("500.mako", request, {'traceback': traceback.extract_tb(exc_info[2])})
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/lib/django_util.py", line 230, in render
    **kwargs)
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/lib/django_util.py", line 148, in _render_to_response
    return django_mako.render_to_response(template, *args, **kwargs)
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/lib/django_mako.py", line 125, in render_to_response
    return HttpResponse(render_to_string(template_name, data_dictionary), **kwargs)
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/lib/django_mako.py", line 114, in render_to_string_normal
    result = template.render(**data_dict)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/template.py", line 443, in render
    return runtime._render(self, self.callable_, args, data)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 786, in _render
    **_kwargs_for_callable(callable_, data))
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 818, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Mako-0.8.1-py2.7.egg/mako/runtime.py", line 844, in _exec_template
    callable_(context, *args, **kwargs)
  File "/tmp/tmpnJ8DqA/desktop/500.mako.py", line 120, in render_body
    __M_writer(unicode( commonfooter(request, messages) ))
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/views.py", line 494, in commonfooter
    hue_settings = Settings.get_settings()
  File "/home/hue/hue-4.0.0/desktop/core/src/desktop/models.py", line 109, in get_settings
    settings, created = Settings.objects.get_or_create(id=1)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 154, in get_or_create
    return self.get_queryset().get_or_create(**kwargs)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 391, in get_or_create
    six.reraise(*exc_info)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 383, in get_or_create
    obj.save(force_insert=True, using=self.db)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/base.py", line 545, in save
    force_update=force_update, update_fields=update_fields)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/base.py", line 573, in save_base
    updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/base.py", line 654, in _save_table
    result = self._do_insert(cls._base_manager, using, fields, update_pk, raw)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/base.py", line 687, in _do_insert
    using=using, raw=raw)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py", line 232, in _insert
    return insert_query(self.model, objs, fields, **kwargs)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py", line 1514, in insert_query
    return query.get_compiler(using=using).execute_sql(return_id)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py", line 903, in execute_sql
    cursor.execute(sql, params)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/home/hue/hue-4.0.0/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 "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/home/hue/hue-4.0.0/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/sqlite3/base.py", line 452, in execute
    return Database.Cursor.execute(self, query, params)
OperationalError: attempt to write a readonly database

 

Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

OperationalError: attempt to write a readonly database

 

Need to fix the write perms on the database file...  not sure of the path you have now, but mine was in the desktop folder.

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

Rising Star

@stevenmatison 

 

So what permission do I need to change to which file ?

 

I changed the permission to 777 to desktop.db which is under desktop folder but no help. 

 

Thanks

 

Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

Rising Star

@stevenmatison 

 

So I changed Hue directory permission to hue user and that fixed the issue..

Highlighted

Re: Hue 3.8.1 on centos 7 - How to start it

@prakashpunj Please accept my first reply as the solution?  

 


 


If this answer resolves your issue or allows you to move forward, please choose to ACCEPT this solution and close this topic. If you have further dialogue on this topic please comment here or feel free to private message me. If you have new questions related to your Use Case please create separate topic and feel free to tag me in your post.  


 


Thanks,



Steven

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