Deployed an app that uses MongoDB. Issue with SSL Cert and used this stack overflow answer
How does certifi work with streamlit cloud?
Error Message:
2023-08-21 13:05:43.229 Uncaught app exception
Traceback (most recent call last):
File "/home/adminuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 552, in _run_script
exec(code, module.__dict__)
File "/mount/src/pms_chef_bot/pages/2_Login.py", line 43, in <module>
for record in cursor:
File "/home/adminuser/venv/lib/python3.9/site-packages/pymongo/cursor.py", line 1251, in next
if len(self.__data) or self._refresh():
File "/home/adminuser/venv/lib/python3.9/site-packages/pymongo/cursor.py", line 1142, in _refresh
self.__session = self.__collection.database.client._ensure_session()
File "/home/adminuser/venv/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1758, in _ensure_session
return self.__start_session(True, causal_consistency=False)
File "/home/adminuser/venv/lib/python3.9/site-packages/pymongo/mongo_client.py", line 1703, in __start_session
self._topology._check_implicit_session_support()
File "/home/adminuser/venv/lib/python3.9/site-packages/pymongo/topology.py", line 538, in _check_implicit_session_support
self._check_session_support()
File "/home/adminuser/venv/lib/python3.9/site-packages/pymongo/topology.py", line 554, in _check_session_support
self._select_servers_loop(
File "/home/adminuser/venv/lib/python3.9/site-packages/pymongo/topology.py", line 238, in _select_servers_loop
raise ServerSelectionTimeoutError(
pymongo.errors.ServerSelectionTimeoutError: SSL handshake failed: ac-57cw5mr-shard-00-01.ouufw1l.mongodb.net:27017: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1129),SSL handshake failed: ac-57cw5mr-shard-00-02.ouufw1l.mongodb.net:27017: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1129),SSL handshake failed: ac-57cw5mr-shard-00-00.ouufw1l.mongodb.net:27017: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1129), Timeout: 30s, Topology Description: <TopologyDescription id: 64e3610893ffc59f52a1c615, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('ac-57cw5mr-shard-00-00.ouufw1l.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('SSL handshake failed: ac-57cw5mr-shard-00-00.ouufw1l.mongodb.net:27017: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1129)')>, <ServerDescription ('ac-57cw5mr-shard-00-01.ouufw1l.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('SSL handshake failed: ac-57cw5mr-shard-00-01.ouufw1l.mongodb.net:27017: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1129)')>, <ServerDescription ('ac-57cw5mr-shard-00-02.ouufw1l.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('SSL handshake failed: ac-57cw5mr-shard-00-02.ouufw1l.mongodb.net:27017: [SSL: TLSV1_ALERT_INTERNAL_ERROR] tlsv1 alert internal error (_ssl.c:1129)')>]>