Support Questions
Find answers, ask questions, and share your expertise

Hue 3.9 search queries- Server Error (500) ora-06502

Hue 3.9 search queries- Server Error (500) ora-06502

New Contributor

Hello everybody,

after upgrading from Hue 3.7 (CDH 5.4) to HUE 3.9 (CDH 5.5) -

I have a problem when searching in the box of queries history.

After some typing I get  "Server Error (500)".

 

In the logs I found out that it is error of ora-06502 (PL/SQL: "numeric or value error: character string buffer too small"), according to the info it happens when trying to do execute an sql query in the backend.

 

The Hue 3.9 DB is ORACLE (history migrated from sqlite in previous version - 3.7).

 

P.S.,

@romain I love your movies...

 

THANKS!

 

3 REPLIES 3

Re: Hue 3.9 search queries- Server Error (500) ora-06502

Ha, looks like
https://github.com/cloudera/hue/commit/48251195de83c08c546415e03f729b682b658c1c,
but was fixed a while ago.

Could you share your trace from the /logs page of Hue?
Does it look like

[06/Mar/2015 06:43:57 +0000] base ERROR Internal Server Error:
/impala/query_history
Traceback (most recent call last):
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/core/handlers/base.py",
line 111, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/apps/beeswax/src/beeswax/views.py",
line 320, in list_query_history
page, filter_params = _list_query_history(request.user, querydict_query,
DEFAULT_PAGE_SIZE, prefix)
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/apps/beeswax/src/beeswax/views.py",
line 957, in _list_query_history
total_count = db_queryset.count()
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/query.py",
line 351, in count
return self.query.get_count(using=self.db)
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/sql/query.py",
line 418, in get_count
number = obj.get_aggregation(using=using)[None]
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/sql/query.py",
line 384, in get_aggregation
result = query.get_compiler(using).execute_sql(SINGLE)
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/models/sql/compiler.py",
line 818, in execute_sql
cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/backends/util.py",
line 40, in execute
return self.cursor.execute(sql, params)
File "/opt/cloudera/parcels/CDH-5
.1.3-1.cdh5.1.3.p520.147/lib/hue/build/env/lib/python2.6/site-packages/Django-1.4.5-py2.6.egg/django/db/backends/oracle/base.py",
line 675, in execute
return self.cursor.execute(query, self._param_generator(params))
DatabaseError: ORA-06502: PL/SQL: numeric or value error: character string
buffer too small
ORA-06512: at line 1

Re: Hue 3.9 search queries- Server Error (500) ora-06502

New Contributor

Hi romain and everybody,

 

the solution suggested 

"return "DBMS_LOB.SUBSTR(%s, 4000)" is already in the python code of my file, but still I have this bug.

 

Log file for Server Error (500) when executing sql of get count:

/opt/cloudera/parcels/CDH-5
.5.1-1.cdh5.5.1.p0.11/lib/hue/build/env/lib/python2.6/site-packages/Django-1.6.10-py2.6.egg/django/db/backends/oracle/base.py", line number 846 in execute

 

Thanks

Re: Hue 3.9 search queries- Server Error (500) ora-06502

Explorer

Hi Adam,

  Can you please provide the complete stack trace.

 

Thanks.