We have two hue servers pointing to same hive server. On one of the hue servers, connection is getting lost to hive regularly. While doing any query on hue, it says "Could not connect to 10.xx.xxx.xxx:10000" but the other hue is able to connect to same hive server and working fine. Also, verified manually that hive server is running fine. Upon restarting the bad hue server using /etc/init.d/hue stop/start, it works fine for some time and then after some time, connection gets broken again. In logs, I can see
StructuredThriftTransportException: Could not connect to
10.85.114.214:10000 (code THRIFTTRANSPORT): TTransportException(u'Could not connect to 10.xx.xxx.xxx:10000',)
[28/Dec/2017 17:32:14 +0530] api ERROR error in <function execute at 0x101e4b90>
Traceback (most recent call last):
File "/var/lib/hue/apps/beeswax/src/beeswax/api.py", line 52, in decorator
return view_fn(request, *args, **kwargs)
File "/var/lib/hue/apps/beeswax/src/beeswax/api.py", line 287, in execute
query_form = get_query_form(request)
File "/var/lib/hue/apps/beeswax/src/beeswax/api.py", line 635, in get_query_form
databases = [(database, database) for database in db.get_databases()]
File "/var/lib/hue/apps/beeswax/src/beeswax/server/dbms.py", line 129, in get_databases
return self.client.get_databases()
File "/var/lib/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 956, in get_databases
return [table[col] for table in self._client.get_databases()]
File "/var/lib/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 587, in get_databases
res = self.call(self._client.GetSchemas, req)
File "/var/lib/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 555, in call
res = fn(req)
File "/var/lib/hue/desktop/core/src/desktop/lib/thrift_util.py", line 378, in wrapper
raise StructuredThriftTransportException(e, error_code=502)
Using Hue™ 3.9.0, Hive 2.2.9.0-3393. Any idea how to fix it ?