Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When connection to Zino server is temporarily lost, Howitz stops working until restarted #94

Closed
lunkwill42 opened this issue May 24, 2024 · 2 comments · Fixed by #110
Closed
Labels
bug Something isn't working uncaught exception

Comments

@lunkwill42
Copy link
Member

If Howitz' connection to a Zino backend is lost (e.g. because of a Zino server restart or some temporary network issue), Howitz becomes useless for all users until the flask web app is restarted.

When the connection is lost and Howitz tries to run an API operation against the lost connection, a very unhelpful error message is shown in the bottom right corner of the page:

image

This is logged to the console:

INFO howitz in load_user: User "mvold" logged in
127.0.0.1 - - [24/May/2024 11:22:21] "GET /poll_events HTTP/1.1" 500 -
DEBUG zinolib.ritz in _request: send: b'caseids'
ERROR howitz in handle_generic_exception: Exception in /poll_events: [Errno 32] Broken pipe:
Traceback (most recent call last):
  File "/home/mvold/d/howitz/.ve/lib/python3.11/site-packages/flask/app.py", line 1484, in full_dispatch_request
    rv = self.dispatch_request()
         ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mvold/d/howitz/.ve/lib/python3.11/site-packages/flask/app.py", line 1469, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mvold/d/howitz/src/howitz/endpoints.py", line 343, in poll_events
    poll_events_list = poll_current_events()
                       ^^^^^^^^^^^^^^^^^^^^^
  File "/home/mvold/d/howitz/src/howitz/endpoints.py", line 118, in poll_current_events
    current_app.event_manager.get_events()
  File "/home/mvold/d/howitz/.ve/lib/python3.11/site-packages/zinolib/controllers/zino1.py", line 479, in get_events
    for event_id in self._event_adapter.get_event_ids(self.session.request):
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mvold/d/howitz/.ve/lib/python3.11/site-packages/zinolib/controllers/zino1.py", line 301, in get_event_ids
    return request.get_caseids()
           ^^^^^^^^^^^^^^^^^^^^^
  File "/home/mvold/d/howitz/.ve/lib/python3.11/site-packages/zinolib/ritz.py", line 547, in get_caseids
    response = self._request(b"caseids")
               ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mvold/d/howitz/.ve/lib/python3.11/site-packages/zinolib/ritz.py", line 374, in _request
    self._sock.send(command)
BrokenPipeError: [Errno 32] Broken pipe
@hmpf
Copy link
Contributor

hmpf commented Jun 6, 2024

There's an improved error message from zinolib 1.0.3 on.

@lunkwill42
Copy link
Member Author

There's an improved error message from zinolib 1.0.3 on.

Yes, but it seems Howitz was inadvertently locked to an older version of zinolib until recently. The error remains, but the message is slightly more helpful now, at least:

Lost connection to server: [Errno 32] Broken pipe

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working uncaught exception
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants