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
john@clublorcana:~/s0lo_games_engine$ ./clublorcana_api.py
Traceback (most recent call last):
File "/home/john/s0lo_games_engine/./clublorcana_api.py", line 61, in
uvicorn.run(app, host='0.0.0.0', port=api_port, ssl_keyfile=ssl_cert_key, ssl_certfile=ssl_cert_key)
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/main.py", line 579, in run
server.run()
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/server.py", line 76, in _serve
config.load()
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/config.py", line 400, in load
self.ssl: ssl.SSLContext | None = create_ssl_context(
^^^^^^^^^^^^^^^^^^^
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/config.py", line 113, in create_ssl_context
ctx.load_cert_chain(certfile, keyfile, get_password)
ssl.SSLError: [SSL] PEM lib (_ssl.c:3845)
The server cert and private key are basic PEM formatted files. I had a look at the config.py file, and see its just importing the ssl library. So I tested that directly by creating my own context. I'm able to load the certs fine with that.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Fresh install of Ubuntu 24.10. Latest version of Uvicorn. Freshly generated certificate from Cloudflare.
uvicorn.run(app, host='0.0.0.0', port=api_port, ssl_keyfile=ssl_cert_key, ssl_certfile=ssl_cert_key)
Fails 100% of the time with:
john@clublorcana:~/s0lo_games_engine$ ./clublorcana_api.py
Traceback (most recent call last):
File "/home/john/s0lo_games_engine/./clublorcana_api.py", line 61, in
uvicorn.run(app, host='0.0.0.0', port=api_port, ssl_keyfile=ssl_cert_key, ssl_certfile=ssl_cert_key)
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/main.py", line 579, in run
server.run()
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/server.py", line 65, in run
return asyncio.run(self.serve(sockets=sockets))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/server.py", line 69, in serve
await self._serve(sockets)
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/server.py", line 76, in _serve
config.load()
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/config.py", line 400, in load
self.ssl: ssl.SSLContext | None = create_ssl_context(
^^^^^^^^^^^^^^^^^^^
File "/home/john/.local/lib/python3.12/site-packages/uvicorn/config.py", line 113, in create_ssl_context
ctx.load_cert_chain(certfile, keyfile, get_password)
ssl.SSLError: [SSL] PEM lib (_ssl.c:3845)
The server cert and private key are basic PEM formatted files. I had a look at the config.py file, and see its just importing the ssl library. So I tested that directly by creating my own context. I'm able to load the certs fine with that.
Beta Was this translation helpful? Give feedback.
All reactions