No Resource Manager available

Hello,

I’ve installed Hue version 4.2.0 according to guide on [https://docs.gethue.com/administrator/installation/]

I’m using CentOS 6.7 and Hadoop version HDP-2.3.4.0-3485
Python 2.6.6.
YARN 2.7.1.2.3
Oozie 4.2.0.2.3

I configured in hue.ini under [hadoop] [[yarn_clusters]] [[[default]]] my resource manager host, port, history serer etc…

resourcemanager_host=192.168.X.X
resourcemanager_port=8088
resourcemanager_api_url=http://192.168.X.X:8088/
proxy_api_url=http://192.168.X.X:8088/
history_server_api_url=http://192.168.X.X:19888/

HA resource manager is activated.

When I go to Jobs I got errors:

No Resource Manager are available.
’NoneType’ object has no attribute 'get_formatted_properties’

runcpserver.log says this:

[09/Apr/2020 04:02:49 -0700] api2 ERROR Error running <function jobs at 0x7fde0dcf07d0>
Traceback (most recent call last):
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api2.py”, line 38, in decorator
return func(*args, **kwargs)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api2.py”, line 57, in jobs
jobs = get_api(request.user, interface).apps(filters)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/job_api.py”, line 51, in apps
return self.yarn_api.apps(filters)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/job_api.py”, line 104, in apps
jobs = NativeYarnApi(self.user).get_jobs(**filter_params)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api.py”, line 70, in init
self.resource_manager_api = resource_manager_api.get_resource_manager(user.username)
File “/usr/share/hue/desktop/libs/hadoop/src/hadoop/yarn/resource_manager_api.py”, line 52, in get_resource_manager
raise PopupException(_(‘No Resource Manager are available.’))
PopupException: No Resource Manager are available.
[09/Apr/2020 04:02:49 -0700] access INFO 192.168.8.113 hue - “POST /jobbrowser/api/jobs/jobs HTTP/1.1”
[09/Apr/2020 04:02:49 -0700] api2 ERROR Error running <function jobs at 0x7fde0dcf07d0>
Traceback (most recent call last):
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api2.py”, line 38, in decorator
return func(*args, **kwargs)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api2.py”, line 57, in jobs
jobs = get_api(request.user, interface).apps(filters)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/base_api.py”, line 43, in get_api
return QueryApi(user)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/query_api.py”, line 48, in init
self.api = _get_api(user)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/query_api.py”, line 39, in _get_api
server_url = _get_impala_server_url(session)
File “/usr/share/hue/apps/impala/src/impala/server.py”, line 52, in _get_impala_server_url
impala_settings = session.get_formatted_properties()
AttributeError: ‘NoneType’ object has no attribute ‘get_formatted_properties’
[09/Apr/2020 04:02:49 -0700] access INFO 192.168.8.113 hue - “POST /jobbrowser/api/jobs/queries HTTP/1.1”

error.log says this:

[09/Apr/2020 04:04:09 -0700] api2 ERROR Error running <function jobs at 0x7fde0dcf07d0>
Traceback (most recent call last):
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api2.py”, line 38, in decorator
return func(*args, **kwargs)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api2.py”, line 57, in jobs
jobs = get_api(request.user, interface).apps(filters)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/base_api.py”, line 43, in get_api
return QueryApi(user)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/query_api.py”, line 48, in init
self.api = _get_api(user)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/query_api.py”, line 39, in _get_api
server_url = _get_impala_server_url(session)
File “/usr/share/hue/apps/impala/src/impala/server.py”, line 52, in get_impala_server_url
impala_settings = session.get_formatted_properties()
AttributeError: ‘NoneType’ object has no attribute ‘get_formatted_properties’
[09/Apr/2020 04:04:09 -0700] api2 ERROR Error running <function jobs at 0x7fde0dcf07d0>
Traceback (most recent call last):
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api2.py”, line 38, in decorator
return func(*args, **kwargs)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api2.py”, line 57, in jobs
jobs = get_api(request.user, interface).apps(filters)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/job_api.py”, line 51, in apps
return self.yarn_api.apps(filters)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/apis/job_api.py”, line 104, in apps
jobs = NativeYarnApi(self.user).get_jobs(**filter_params)
File “/usr/share/hue/apps/jobbrowser/src/jobbrowser/api.py”, line 70, in init
self.resource_manager_api = resource_manager_api.get_resource_manager(user.username)
File “/usr/share/hue/desktop/libs/hadoop/src/hadoop/yarn/resource_manager_api.py”, line 52, in get_resource_manager
raise PopupException(
(‘No Resource Manager are available.’))
PopupException: No Resource Manager are available.

Is this a bug or I am doing something wrong?

Thanks in advance,
Tom

Would recommend to add a ‘if session:’ there or upgrade to a more recent Hue which contains the fix: