clemlabprojects / ambari

Fork of Apache Ambari maintained by Clemlab Company
https://www.clemlab.com
Apache License 2.0
39 stars 15 forks source link

Failed to start Hue in ODP 1.2.2.0-135 #81

Open Meikelrizkyhartawan opened 2 months ago

Meikelrizkyhartawan commented 2 months ago

I'm trying to start Hue, but I'm encountering errors. I've already configured the database for Hue in the Ambari UI. However, when I start the service, Hue throws an error.

To investigate further, I attempted to start Hue manually to access the logs. The logs indicate that Hue cannot connect to MySQL. This is strange because the URL it's using points to port 5432, which is the port for PostgreSQL. I've confirmed that the database is configured for MySQL in Ambari, and I've successfully tested the connection to MySQL independently.

Ambari hue configuration :

image

Ambari Logs error :

Traceback (most recent call last): File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 999, in restart self.status(env) File "/var/lib/ambari-agent/cache/stacks/ODP/1.2/services/HUE/package/scripts/hue_server.py", line 204, in status check_process_status(status_params.hue_pid_file) File "/usr/lib/ambari-agent/lib/resource_management/libraries/functions/check_process_status.py", line 43, in check_process_status raise ComponentIsNotRunning() ComponentIsNotRunning

The above exception was the cause of the following exception:

Traceback (most recent call last): File "/var/lib/ambari-agent/cache/stacks/ODP/1.2/services/HUE/package/scripts/hue_server.py", line 220, in HueGateway().execute() File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 352, in execute method(env) File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 1016, in restart self.post_start(env) File "/usr/lib/ambari-agent/lib/resource_management/libraries/script/script.py", line 428, in post_start raise Fail("Pid file {0} doesn't exist after starting of the component.".format(pid_file)) resource_management.core.exceptions.Fail: Pid file /var/run/hue/hue.pid doesn't exist after starting of the component.

command start error :

/usr/odp/1.2.2.0-135/hue/build/env/bin/supervisor -p /var/run/hue/hue.pid

The above exception was the direct cause of the following exception:

Traceback (most recent call last): File "/usr/odp/1.2.2.0-135/hue/build/env/bin/hue", line 33, in sys.exit(load_entry_point('desktop', 'console_scripts', 'hue')()) File "/usr/odp/1.2.2.0-135/hue/desktop/core/src/desktop/manage_entry.py", line 233, in entry execute_from_command_line(sys.argv) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/core/management/init.py", line 419, in execute_from_command_line utility.execute() File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/core/management/init.py", line 395, in execute django.setup() File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/apps/registry.py", line 122, in populate app_config.ready() File "/usr/odp/1.2.2.0-135/hue/desktop/libs/notebook/src/notebook/apps.py", line 34, in ready table_names = connection.introspection.table_names() File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/db/backends/base/introspection.py", line 50, in table_names with self.connection.cursor() as cursor: File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner return func(*args, kwargs) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/db/backends/base/base.py", line 259, in cursor return self._cursor() File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/db/backends/base/base.py", line 235, in _cursor self.ensure_connection() File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner return func(*args, *kwargs) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection self.connect() File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/db/utils.py", line 90, in exit raise dj_exc_value.with_traceback(traceback) from exc_value File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/db/backends/base/base.py", line 219, in ensure_connection self.connect() File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner return func(args, kwargs) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/db/backends/base/base.py", line 200, in connect self.connection = self.get_new_connection(conn_params) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/utils/asyncio.py", line 33, in inner return func(args, kwargs) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/django/db/backends/mysql/base.py", line 234, in get_new_connection connection = Database.connect(conn_params) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/MySQLdb/init.py", line 121, in Connect return Connection(args, *kwargs) File "/usr/odp/1.2.2.0-135/hue/build/env/lib/python3.8/site-packages/MySQLdb/connections.py", line 195, in init super().init(args, **kwargs2) django.db.utils.OperationalError: (2003, "Can't connect to MySQL server on '192.168.114.51:5432' (111)")