langchain-ai / langchain

🦜🔗 Build context-aware reasoning applications
https://python.langchain.com
MIT License
93.94k stars 15.14k forks source link

MongoDBAtlasVectorSearch.from_connection_string. [SSL: CERTIFICATE_VERIFY_FAILED] #27626

Closed codenamics closed 5 hours ago

codenamics commented 5 hours ago

Checked other resources

Example Code

vectorStore = MongoDBAtlasVectorSearch.from_connection_string(
    "xxxxxxxxxxx",
    dbName + "." + collectionName,
    embeddings,
    index_name=index,
)

Error Message and Stack Trace (if applicable)

raise ServerSelectionTimeoutError( pymongo.errors.ServerSelectionTimeoutError: langchain-shard-00-01.0xyal.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms),langchain-shard-00-00.0xyal.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms),langchain-shard-00-02.0xyal.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms), Timeout: 30s, Topology Description: <TopologyDescription id: 671acee57ae8fd26080b2026, topology_type: ReplicaSetNoPrimary, servers: [<ServerDescription ('langchain-shard-00-00.0xyal.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('langchain-shard-00-00.0xyal.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>, <ServerDescription ('langchain-shard-00-01.0xyal.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('langchain-shard-00-01.0xyal.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>, <ServerDescription ('langchain-shard-00-02.0xyal.mongodb.net', 27017) server_type: Unknown, rtt: None, error=AutoReconnect('langchain-shard-00-02.0xyal.mongodb.net:27017: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1000) (configured timeouts: socketTimeoutMS: 20000.0ms, connectTimeoutMS: 20000.0ms)')>]>

Description

Looks like on mac (big sur) somehow we cannot connect to AtlasMongoDB how can i pass tls to

MongoDBAtlasVectorSearch.from_connection_string

System Info

Mac langchain 0.3

codenamics commented 5 hours ago

install certificates on mac application/python install certs