pharo-nosql / mongotalk

A Pharo driver for MongoDB
MIT License
19 stars 13 forks source link

ConnectionClosed: Connection closed while waiting for data #93

Open rydnr opened 3 years ago

rydnr commented 3 years ago

Hi,

I'm running Pharo8 with mongotalk master, and I'm unable to connect to a MongoDB Atlas cluster. I always get "ConnectionClosed: Connection closed while waiting for data" errors:

mongotalk

The connection seems to close when ReplyOperation tries to read the size (method ReplyOperation>>read).

The code I'm using is:

| client |
client := MongoClient withUrls: #('mongodb://pro-contestia-shard-00-02.ffzva.mongodb.net:27017' 'mongodb://pro-contestia-shard-00-01.ffzva.mongodb.net:27017' 'mongodb://pro-contestia-shard-00-00.ffzva.mongodb.net:27017').
client start.
client primaryMongoDo: [ :mongo |
    ((mongo
        databaseNamed: 'test')
        getCollection: 'pilots')
        add: { 'name' -> 'Fangio' } asDictionary ].
client stop.

My first assumption was that the stream class MongoTalk uses is SocketStream and not ZdcSecureSocketStream. MongoDB Atlas requires TLS. Is it supported?