You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The only way to make sc-web work again after it lost connection to sc-server is to restart app.py, connections loss causes an UncaughtException:
[E 220818 11:16:16 web:1798] Uncaught exception GET /api/user/ (172.17.0.1)
HTTPServerRequest(protocol='http', host='localhost:8000', method='GET', uri='/api/user/', version='HTTP/1.1', remote_ip='172.17.0.1')
Traceback (most recent call last):
File "/usr/local/lib/python3.8/dist-packages/tornado/web.py", line 1711, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/sc-web/server/decorators.py", line 28, in wrapper
return func(*argv)
File "/sc-web/server/handlers/api.py", line 389, in get
user_addr = sc_session.get_sc_addr()
File "/sc-web/server/decorators.py", line 28, in wrapper
return func(*argv)
File "/sc-web/server/handlers/api_logic.py", line 759, in get_sc_addr
self.sc_addr = self._session_get_sc_addr()
File "/sc-web/server/handlers/api_logic.py", line 878, in _session_get_sc_addr
return self._find_user_by_system_idtf("session::" + str(self.session_key))
File "/sc-web/server/handlers/api_logic.py", line 856, in _find_user_by_system_idtf
value = client.resolve_keynodes(ScIdtfResolveParams(idtf=idtf, type=None))[0]
File "/usr/local/lib/python3.8/dist-packages/sc_client/client/_api.py", line 67, in resolve_keynodes
return session.execute(common.ClientCommand.KEYNODES, *params)
File "/usr/local/lib/python3.8/dist-packages/sc_client/session.py", line 150, in execute
return _ScClientSession.executor.run(request_type, *args)
File "/usr/local/lib/python3.8/dist-packages/sc_client/client/_executor.py", line 29, in run
response = session.send_message(self._executor_mapper.get(command_type), payload)
File "/usr/local/lib/python3.8/dist-packages/sc_client/session.py", line 121, in send_message
raise BrokenPipeError
BrokenPipeError
[E 220818 11:16:16 web:2271] 500 GET /api/user/ (172.17.0.1) 1.16ms
To Reproduce
Steps to reproduce the behavior:
Start sc-server
Start sc-web
Check that the page works
Restart sc-server
You will get HTTP 500
Page will no longer be able to load properly
Expected behavior
In case the connection to sc-server was lost there should be an attempt to restore it, transparently to the user side. In other words, we should handle the BrokenPipe exception.
Desktop (please complete the following information):
OS: macOS 13 Ventura
Browser: Chromium
Runtime: Docker
The text was updated successfully, but these errors were encountered:
Describe the bug
The only way to make sc-web work again after it lost connection to
sc-server
is to restartapp.py
, connections loss causes an UncaughtException:To Reproduce
Steps to reproduce the behavior:
Expected behavior
In case the connection to sc-server was lost there should be an attempt to restore it, transparently to the user side. In other words, we should handle the BrokenPipe exception.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: