1
votes

I am getting an:

Error: Undefined message in HUE every time I try to upload a file. I am able to create a subdirectory/folder in HDFS but file uploads are not working.

I tried copying a file to HDFS from the linux CLI using the hadoop user, and it works.

Hue user is hadoop

HDFS directory owner is hadoop:hadoop

Edit: Adding the error

ERROR    Internal Server Error: /filebrowser/upload/file
Traceback (most recent call last):
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/core/handlers/exception.py", line 41, in inner
    response = get_response(request)
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/core/handlers/base.py", line 249, in _legacy_get_response
    response = self._get_response(request)
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/core/handlers/base.py", line 178, in _get_response
    response = middleware_method(request, callback, callback_args, callback_kwargs)
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/middleware/csrf.py", line 300, in process_view
    request_csrf_token = request.POST.get('csrfmiddlewaretoken', '')
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/core/handlers/wsgi.py", line 126, in _get_post
    self._load_post_and_files()
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/http/request.py", line 299, in _load_post_and_files
    self._post, self._files = self.parse_file_upload(self.META, data)
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/http/request.py", line 258, in parse_file_upload
    return parser.parse()
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/http/multipartparser.py", line 269, in parse
    self._close_files()
  File "/usr/lib/hue/build/env/lib/python2.7/site-packages/Django-1.11.20-py2.7.egg/django/http/multipartparser.py", line 316, in _close_files
    handler.file.close()
AttributeError: 'NoneType' object has no attribute 'close'

[12/Apr/2020 22:48:51 -0700] upload       DEBUG    HDFSfileUploadHandler receive_data_chunk

[12/Apr/2020 22:48:51 -0700] upload       ERROR    Not using HDFS upload handler: 

[12/Apr/2020 22:48:51 -0700] resource     ERROR    All 1 clients failed: {'http://IRedactedMyinstanceIdentHere.ap-southeast-1.compute.internal:14000/webhdfs/v1': u'500 Server Error: Internal Server Error for url: http://IRedactedMyinstanceIdentHere.ap-southeast-1.compute.internal:14000/webhdfs/v1/user/hadoop/Test-Data?op=CHECKACCESS&fsaction=rw-&user.name=hue&doas=hadoop\n{"RemoteException":{"message":"java.lang.IllegalArgumentException: No enum constant org.apache.hadoop.fs.http.client.HttpFSFileSystem.Operation.CHECKACCESS","exception":"QueryParamException","javaClassName":"com.sun.jersey.api.ParamException$QueryParamException"}}\n'}

[12/Apr/2020 22:48:51 -0700] resource     ERROR    Caught exception from http://IRedactedMyinstanceIdentHere.ap-southeast-1.compute.internal:14000/webhdfs/v1: 500 Server Error: Internal Server Error for url: http://IRedactedMyinstanceIdentHere.ap-southeast-1.compute.internal:14000/webhdfs/v1/user/hadoop/Test-Data?op=CHECKACCESS&fsaction=rw-&user.name=hue&doas=hadoop
{"RemoteException":{"message":"java.lang.IllegalArgumentException: No enum constant org.apache.hadoop.fs.http.client.HttpFSFileSystem.Operation.CHECKACCESS","exception":"QueryParamException","javaClassName":"com.sun.jersey.api.ParamException$QueryParamException"}}
 (error 500)
1
Do you see any error in hue logs? - franklinsijo
Added the error in the question. - dribble

1 Answers

1
votes

As you can see from the error message, it reports that there is no match found for the query param passed when hue tries to perform the CHECKACCESS operation.

http://IRedactedMyinstanceIdentHere.ap-southeast-1.compute.internal:14000/webhdfs/v1/user/hadoop/Test-Data?op=CHECKACCESS&fsaction=rw-&user.name=hue&doas=hadoop

{"RemoteException":{"message":"java.lang.IllegalArgumentException: No enum constant org.apache.hadoop.fs.http.client.HttpFSFileSystem.Operation.CHECKACCESS","exception":"QueryParamException","javaClassName":"com.sun.jersey.api.ParamException$QueryParamException"}}

This implementation seems to be missing in some of the hadoop versions and is a known bug HTTPFS - CHECKACCESS operation missing.