-
Notifications
You must be signed in to change notification settings - Fork 7
Description
Description:
I use the provided sar2ascii tool to generate a tar file. When i attempt to upload that data into sar2html either via the BUI or using curl i receive a 500 - internal server error in response.
Running the app interactively i can see it generates the following error message:
[2021-11-19 14:13:01,876] ERROR in app: Exception on / [POST]
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 2073, in wsgi_app
response = self.full_dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1518, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1516, in full_dispatch_request
rv = self.dispatch_request()
File "/usr/local/lib/python3.6/site-packages/flask/app.py", line 1502, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "sar2html.py", line 400, in uploadFiles
updateThread = AppContextThread(target=updateDb(hostList, app.config['UPLOAD_FOLDER']))
File "sar2html.py", line 103, in updateDb
s2df.columns = s2col
File "/usr/local/lib64/python3.6/site-packages/pandas/core/generic.py", line 5154, in setattr
return object.setattr(self, name, value)
File "pandas/_libs/properties.pyx", line 66, in pandas._libs.properties.AxisProperty.set
File "/usr/local/lib64/python3.6/site-packages/pandas/core/generic.py", line 564, in _set_axis
self._mgr.set_axis(axis, labels)
File "/usr/local/lib64/python3.6/site-packages/pandas/core/internals/managers.py", line 227, in set_axis
f"Length mismatch: Expected axis has {old_len} elements, new "
ValueError: Length mismatch: Expected axis has 5 elements, new values have 6 elements
[pid: 25916|app: 0|req: 1/4] 172.17.65.101 () {48 vars in 1004 bytes} [Fri Nov 19 14:12:55 2021] POST / => generated 290 bytes in 6060 msecs (HTTP/1.1 500) 2 headers in 99 bytes (93 switches on core 0)
Steps to reproduce the behavior:
I followed the git clone, install requirements, installation process. Everything looked to install fine, the app starts fine and i can browse the app without error.
Expected behavior
Uploaded data is ingested into the app for viewing through the BUI
Screenshots
N/A just a standard 500 internal server error
Desktop (please complete the following information):
- OS: Win10
- Browser: Chrome
- Version: 95.0.4638.69 (Official Build) (64-bit)
Additional context
Running on Oracle Linux 7.9
The error i receive from curl looks like this:
$ curl -F "file=@/tmp/sar2html-<MY_HOSTNAME>-2111191346.tar.gz" localhost:5000 -v
- About to connect() to localhost port 5000 (#0)
- Trying 127.0.0.1...
- Connected to localhost (127.0.0.1) port 5000 (#0)
POST / HTTP/1.1
User-Agent: curl/7.29.0
Host: localhost:5000
Accept: /
Content-Length: 1438783
Expect: 100-continue
Content-Type: multipart/form-data; boundary=----------------------------66a41b0862f6
- Done waiting for 100-continue
< HTTP/1.1 500 INTERNAL SERVER ERROR
< Content-Type: text/html; charset=utf-8
< Content-Length: 290 - HTTP error before end of send, stop sending
<
Internal Server Error
The server encountered an internal error and was unable to complete your request. Either the server is overloaded or there is an error in the application.
* Closing connection 0