Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on
05-17-2016
06:03 AM
- last edited on
04-21-2026
06:52 AM
by
GrazittiAPI
Hello,
I wish to load balance multiple hue servers under a load balancer. Each hue server keeps the record in its own prostgre database. For running a multiple hue servers, I need to keep these records in a centralized DB. Is it possible to maintain the entire hue servers in my cluster in a centralized db?
Thanks in advance.
Created 05-18-2016 04:24 AM
Scheme should be created automatically, Follow below steps:
To set up Hue to use a MySQL database:
# mysql -u root -p< CREATE USER $HUEUSER IDENTIFIED BY '$HUEPASSWORD'; GRANT ALL PRIVILEGES on *.* to ‘$HUEUSER’@’localhost’ WITH GRANT OPTION; GRANT ALL on $HUEUSER.* to ‘$HUEUSER’@’localhost’ IDENTIFIED BY $HUEPASSWORD; FLUSH PRIVILEGES;
where $HUEUSER is the Hue user name and $HUEPASSWORD is the Hue user password.
# mysql -u root -p
CREATE DATABASE $DBNAME;
/etc/hue/conf/hue.ini file and edit the [[database]] section (modify for your MySQL setup).[[database]] engine=mysql host=$DATABASEIPADDRESSORHOSTNAME port=$PORT user=$HUEUSER password=$HUEPASSWORD name=$DBNAME
/usr/lib/hue/build/env/bin/hue syncdb --noinput
/etc/init.d/hue start
Created 05-21-2021 12:25 AM
Hi @Rajuambala as this is an older post, you would have a better chance of receiving a resolution by starting a new thread. This will also be an opportunity to provide details specific to your environment that could aid others in assisting you with a more accurate answer to your question. You can link this thread as a reference in your new post.
Regards,
Vidya Sargur,Created 05-22-2016 09:37 AM
Thank you for all your responses. It works fine. But I got some error while restarting hue service in all hosts.
[centos@ip-172-31-56-224 ~]$ sudo -i [root@ip-172-31-56-224 ~]# /etc/init.d/hue restart
Shutting down hue: [ OK ] Traceback (most recent call last):
File "/usr/lib/hue/build/env/bin//hue", line 9, in <module> load_entry_point('desktop==2.6.1', 'console_scripts', 'hue')()
File "/usr/lib/hue/desktop/core/src/desktop/manage_entry.py", line 41, in entry from desktop import settings, appmanager File "/usr/lib/hue/desktop/core/src/desktop/settings.py", line 52, in <module> desktop.log.basic_logging(os.environ[ENV_HUE_PROCESS_NAME])
File "/usr/lib/hue/desktop/core/src/desktop/log/__init__.py", line 125, in basic_logging logging.config.fileConfig(log_conf) File "/usr/lib64/python2.6/logging/config.py", line 84, in fileConfig handlers = _install_handlers(cp, formatters)
File "/usr/lib64/python2.6/logging/config.py", line 162, in _install_handlers h = klass(*args)
File "/usr/lib64/python2.6/logging/handlers.py", line 112, in __init__ BaseRotatingHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib64/python2.6/logging/handlers.py", line 64, in __init__ logging.FileHandler.__init__(self, filename, mode, encoding, delay)
File "/usr/lib64/python2.6/logging/__init__.py", line 835, in __init__ StreamHandler.__init__(self, self._open())
File "/usr/lib64/python2.6/logging/__init__.py", line 854, in _open stream = open(self.baseFilename, self.mode)
IOError: [Errno 13] Permission denied: '/usr/lib/hue/logs/access.log'
Starting hue: [ OK ]
[root@ip-172-31-56-224 ~]# /etc/init.d/hue status
supervisor (pid 12586) is running...
[root@ip-172-31-56-224 ~]#
Will it impact my environment?
Thanks and Regards,
Radhakrishnan.R