-
Notifications
You must be signed in to change notification settings - Fork 83
Open
Description
Hi, I'm trying the tutorial notebook for CosmosDB-MongoDB-vCore.
I have no problems connecting with:
mongo_conn = "mongodb+srv://"+urllib.parse.quote(COSMOS_MONGO_USER)+":"+urllib.parse.quote(COSMOS_MONGO_PWD)+"@"+COSMOS_MONGO_SERVER+"?tls=true&authMechanism=SCRAM-SHA-256&retrywrites=false&maxIdleTimeMS=120000"
mongo_client = pymongo.MongoClient(mongo_conn)
But then when creating the the DB and listing collection names with:
db = mongo_client['ExampleDB']
COLLECTION_NAME = "ExampleCollection"
collection = db[COLLECTION_NAME]
if COLLECTION_NAME not in db.list_collection_names():
db.create_collection(COLLECTION_NAME)
the call of:
db.list_collection_names()
doesn't go through and return the error:
ServerSelectionTimeoutError: c.cosmos-db-openai-explore.mongocluster.cosmos.azure.com:10260: timed out (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms), Timeout: 30s, Topology Description: <TopologyDescription id: 6602e5685fa5c332a820d706, topology_type: Unknown, servers: [<ServerDescription ('c.cosmos-db-openai-explore.mongocluster.cosmos.azure.com', 10260) server_type: Unknown, rtt: None, error=NetworkTimeout('c.cosmos-db-openai-explore.mongocluster.cosmos.azure.com:10260: timed out (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>]>
Any advice? Thanks in advance!
Metadata
Metadata
Assignees
Labels
No labels