vapor-ware / synse-server

An HTTP API for monitoring and controlling physical and virtual devices
https://synse.readthedocs.io/en/latest/server/intro/
GNU General Public License v3.0
39 stars 11 forks source link

invalid ssl configs do not cause plugin to terminate #389

Closed edaniszewski closed 4 years ago

edaniszewski commented 4 years ago

By invalid, I mean not found.

The logs:

timestamp='2020-04-09T19:09:19.302748Z' logger='synse_server.server' level='debug' event='serving API endpoints'
Task exception was never retrieved
future: <Task finished name='Task-1' coro=<Sanic.create_server() done, defined at /usr/local/lib/python3.8/site-packages/sanic/app.py:1183> exception=FileNotFoundError(2, 'No such file or directory')>
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/sanic/app.py", line 1257, in create_server
    server_settings = self._helper(
  File "/usr/local/lib/python3.8/site-packages/sanic/app.py", line 1345, in _helper
    context.load_cert_chain(cert, keyfile=key)
FileNotFoundError: [Errno 2] No such file or directory
^CTraceback (most recent call last):
  File "/usr/local/bin/synse_server", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/site-packages/synse_server/__main__.py", line 57, in main
    server.run()
  File "/usr/local/lib/python3.8/site-packages/synse_server/server.py", line 161, in run
    loop.synse_loop.run_forever()
  File "uvloop/loop.pyx", line 1351, in uvloop.loop.Loop.run_forever
  File "uvloop/loop.pyx", line 519, in uvloop.loop.Loop._run
  File "uvloop/handles/poll.pyx", line 213, in uvloop.loop.__on_uvpoll_event
  File "uvloop/cbhandles.pyx", line 90, in uvloop.loop.Handle._run
  File "uvloop/cbhandles.pyx", line 73, in uvloop.loop.Handle._run
  File "uvloop/loop.pyx", line 359, in uvloop.loop.Loop._read_from_self
  File "uvloop/loop.pyx", line 364, in uvloop.loop.Loop._invoke_signals
  File "uvloop/loop.pyx", line 339, in uvloop.loop.Loop._ceval_process_signals
KeyboardInterrupt

This is when an ssl cert and key are specified which do not exist.