Hue give Server Error (500) whenacces list oozie workflow id to know status

Kali ini gw mendapatkan error pas mau ngakses status id workflow di hue versi 3.9. Error tersebut muncul peringatan Server Error (500).

huecuy

21/Jun/2016 23:42:28 -0700] middleware INFO Processing exception: local variable ‘hue_coord’ referenced before assignment: Traceback (most recent call last):
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py”, line 112, in get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py”, line 371, in inner
return func(*args, **kwargs)
File “/usr/local/hue/apps/oozie/src/oozie/views/dashboard.py”, line 166, in decorate
return view_func(request, *args, **kwargs)
File “/usr/local/hue/apps/oozie/src/oozie/views/dashboard.py”, line 385, in list_oozie_workflow
‘hue_coord’: hue_coord,
UnboundLocalError: local variable ‘hue_coord’ referenced before assignment
[21/Jun/2016 23:42:28 -0700] resource DEBUG GET Got response: <workflow-app name=”mostpopular-…
[21/Jun/2016 23:42:28 -0700] connectionpool DEBUG “GET /oozie/v1/job/0000203-160621121820735-oozie-oozi-W?timezone=America%2FLos_Angeles&show=definition&user.name=hue&doAs=hdfs HTTP/1.1” 200 None
[21/Jun/2016 23:42:28 -0700] dashboard ERROR Error generating full page for running workflow 0000203-160621121820735-oozie-oozi-W
Traceback (most recent call last):
File “/usr/local/hue/apps/oozie/src/oozie/views/dashboard.py”, line 314, in list_oozie_workflow
hue_coord = get_history().get_coordinator_from_config(oozie_workflow.conf_dict)
File “/usr/local/hue/apps/oozie/src/oozie/models2.py”, line 2216, in get_coordinator_from_config
doc = Document2.objects.get(type=’oozie-coordinator2′, id=conf_dict.get(Coordinator.HUE_ID))
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/manager.py”, line 151, in get
return self.get_queryset().get(*args, **kwargs)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py”, line 304, in get
num = len(clone)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py”, line 77, in __len__
self._fetch_all()
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py”, line 857, in _fetch_all
self._result_cache = list(self.iterator())
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/query.py”, line 220, in iterator
for row in compiler.results_iter():
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py”, line 713, in results_iter
for rows in self.execute_sql(MULTI):
File “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/models/sql/compiler.py”, line 786, in execute_sql
cursor.execute(sql, params)
File “/usr/local/hue/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 “/usr/local/hue/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 “/usr/local/hue/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 “/usr/local/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/backends/mysql/base.py”, line 124, in execute
return self.cursor.execute(query, args)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/cursors.py”, line 205, in execute
self.errorhandler(self, exc, value)
File “/usr/local/hue/build/env/lib/python2.7/site-packages/MySQL_python-1.2.5-py2.7-linux-x86_64.egg/MySQLdb/connections.py”, line 36, in defaulterrorhandler
raise errorclass, errorvalue
ProgrammingError: (1146, “Table ‘hue.desktop_document2’ doesn’t exist”)

nah terus gw liat view logsnya terus gw trace errornya, dan gw mendapatkan errornya sebagai berikut :


Pas gw googling gw belom mendapatkan solusi, dan akhirnya gw bertanya di mailing listnya hue user group. Ternyata terdapat bug bahwa si hue tidak bisa UnboundLocalError: local variable ‘hue_coord’ referenced before assignment.

Untuk bug tersebut sudah di resolve oleh sang developernya. Solusinya adalah kalian hanya perlu menambahkan parameter “hue_coord = None” pada file /usr/local/hue/apps/oozie/src/oozie/views/dashboard.py di baris berikut ini :

Sebelum :

credentials = None
doc = None
hue_workflow = None
workflow_graph = ‘MISSING’ # default to prevent loading the graph tab for deleted workflows
full_node_list = None

 

Sesudah :

credentials = None
doc = None
hue_workflow = None
hue_coord = None
workflow_graph = ‘MISSING’ # default to prevent loading the graph tab for deleted workflows
full_node_list = None

 

Info lebih lanjut bisa melihat sumber berikut ini :

https://groups.google.com/a/cloudera.org/forum/#!topic/hue-user/s7y5A975IsA

https://issues.cloudera.org/browse/HUE-4191

https://github.com/cloudera/hue/commit/ea996ac9ad7ee0c5656f8e17720910bd03f08541

Advertisements

tinggalkan curcol

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s