Project

General

Profile

Actions

Bug #7241

open

Hawat fails with 500 on DB restart, Mentat (Storage) also breaks

Added by Radko Krkoš over 3 years ago. Updated 7 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
04/23/2021
Due date:
% Done:

0%

Estimated time:
To be discussed:
No

Description

This was dealt with before, but only partially. Recent events have shown that the connection management code is in case of DB restart still failing to reconnect. I cannot find the original bug now. Attaching log for posterity:

Request: /events/search?dt_from=2021-04-16+10%3A00%3A00&dt_to=2021-04-23+10%3A00%3A00&source_addrs=&source_ports=&submit=Search, referer: https://mentat-hub.cesnet.cz/mentat/eve
Traceback:, referer: https://mentat-hub.cesnet.cz/mentat/events/search
Traceback (most recent call last):, referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 2446, in wsgi_app, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    response = self.full_dispatch_request(), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1951, in full_dispatch_request, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    rv = self.handle_user_exception(e), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1820, in handle_user_exception, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    reraise(exc_type, exc_value, tb), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/_compat.py", line 39, in reraise, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    raise value, referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1949, in full_dispatch_request, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    rv = self.dispatch_request(), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/app.py", line 1935, in dispatch_request, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    return self.view_functions[rule.endpoint](**req.view_args), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/flask_login/utils.py", line 272, in decorated_view, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    return func(*args, **kwargs), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/flask/views.py", line 89, in view, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    return self.dispatch_request(*args, **kwargs), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/vial/view/__init__.py", line 909, in dispatch_request, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    items = self.search(form_data), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/hawat/base.py", line 372, in search, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    self._check_search_query_quota(), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/hawat/base.py", line 350, in _check_search_query_quota, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    int(flask_login.current_user.get_id()), referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/mentat/services/eventstorage.py", line 1710, in queries_status, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    qpattern, referer: https://mentat-hub.cesnet.cz/mentat/events/search
  File "/var/mentat/venv/lib/python3.7/site-packages/psycopg2/extras.py", line 319, in execute, referer: https://mentat-hub.cesnet.cz/mentat/events/search
    return super(NamedTupleCursor, self).execute(query, vars), referer: https://mentat-hub.cesnet.cz/mentat/events/search
psycopg2.InterfaceError: cursor already closed, referer: https://mentat-hub.cesnet.cz/mentat/events/search, referer: https://mentat-hub.cesnet.cz/mentat/events/search
Actions

Also available in: Atom PDF