Support Questions

Find answers, ask questions, and share your expertise

HTTP 500 while emptying Hue 3.9 trash directory

avatar
Rising Star
Hey,
 
I have Hue 3.9 (CDH 5.7) and can not delete files from trash. I've been googling but couldn't find any place with resonable solution.
 
In /var/log/hue/runcpserver.log I have:
[09/May/2016 13:00:55 +0200] access       INFO     192.168.1.1 isegrim - "POST /filebrowser/trash/purge HTTP/1.1"
[09/May/2016 13:00:55 +0200] middleware   INFO     Processing exception: 'WebHdfs' object has no attribute 'fs_set': Traceback (most recent call last):
  File "/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/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 "/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/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 "/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/http.py", line 41, in inner
    return func(request, *args, **kwargs)
  File "/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/apps/filebrowser/src/filebrowser/views.py", line 1129, in trash_purge
    return generic_op(TrashPurgeForm, request, request.fs.purge_trash, [], None)
  File "/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/apps/filebrowser/src/filebrowser/views.py", line 968, in generic_op
    op(*args)
  File "/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py", line 165, in purge_trash
    for fs in self.fs_set:
  File "/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py", line 38, in __getattr__
    return getattr(object.__getattribute__(self, "_default_fs"), item)
AttributeError: 'WebHdfs' object has no attribute 'fs_set'

[09/May/2016 13:00:55 +0200] decorators   INFO     AXES: Calling decorated function: dt_login
[09/May/2016 13:00:55 +0200] decorators   INFO     args: (True,)
[09/May/2016 13:00:55 +0200] access       WARNING  192.168.1.1 isegrim - "POST /filebrowser/trash/purge HTTP/1.1" -- Failed login for user: None
[09/May/2016 13:00:55 +0200] decorators   INFO     AXES: Repeated login failure by 192.168.1.1. Updating access record. Count = 2
 
And in Hue I have HTTP ERROR 500:
 
Server error.

Sorry, there's been an error. An email was sent to your administrators. Thank you for your patience.


 More Info... |  View logs
File NameLine NumberFunction Name
/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/core/handlers/base.py112get_response
/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/db/transaction.py371inner
/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/build/env/lib/python2.7/site-packages/Django-1.6.10-py2.7.egg/django/views/decorators/http.py41inner
/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/apps/filebrowser/src/filebrowser/views.py1129trash_purge
/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/apps/filebrowser/src/filebrowser/views.py968generic_op
/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py165purge_trash
/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py38__getattr__
 

 

1 ACCEPTED SOLUTION

avatar
Rising Star

Hey,

I was able to fix this by adding underscore to the variable name and restart Hue.

sed -i -e 's/self.fs_set/self._fs_set/' /opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py

So with this workaround, I'll wait for Hue's Jira to be done, and will remember to patch this file after every CDH upgrade until it is fixed.

View solution in original post

5 REPLIES 5

avatar
Rising Star

I see that in

/opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py

there is always self._fs_set,

but one time in the line that the error raised is self.fs_set (not '_' before fs) - but this variable is not set anywhere.

I've changed that to self._fs_set, but I still got the same error - do I have to restart Hue so it would reread  proxyfs.py?

 

avatar
Super Guru
Feel free to comment on the jira for the technical discussion

avatar
Rising Star

Thank you Romainr for your suggestion.

 

I've searched HUE's JIRA for trash problems but did not find any issue describing my problem, so I've created new:

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

 

I hope this is ok.

avatar
Rising Star

Hey,

I was able to fix this by adding underscore to the variable name and restart Hue.

sed -i -e 's/self.fs_set/self._fs_set/' /opt/cloudera/parcels/CDH-5.7.0-1.cdh5.7.0.p0.45/lib/hue/desktop/core/src/desktop/lib/fs/proxyfs.py

So with this workaround, I'll wait for Hue's Jira to be done, and will remember to patch this file after every CDH upgrade until it is fixed.

avatar
Super Guru