Network error while connecting to cluster0-shard-00-00-jxeqq.mongodb.net:27017

while trying to connect to cluster0-shard-00-00-jxeqq.mongodb.net:27017

C:> mongo cluster0-shard-00-00-jxeqq.mongodb.net:27017

MongoDB shell version v4.0.8
connecting to: mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017/test?gssapiServiceName=mongodb
2019-04-05T15:13:44.258-0400 E QUERY    [js] Error: network error while attempting to run command 'isMaster' on host 'cluster0-shard-00-00-jxeqq.mongodb.net:27017'  :
connect@src/mongo/shell/mongo.js:343:13
@(connect):2:6
exception: connect failed

Note am able to ping to this server,

ping cluster0-shard-00-00-jxeqq.mongodb.net

Pinging ec2-34-195-121-130.compute-1.amazonaws.com [34.195.121.130] with 32 bytes of data:
Reply from 34.195.121.130: bytes=32 time=33ms TTL=37
Reply from 34.195.121.130: bytes=32 time=14ms TTL=37
Reply from 34.195.121.130: bytes=32 time=18ms TTL=37
Reply from 34.195.121.130: bytes=32 time=15ms TTL=37

Ping statistics for 34.195.121.130:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 14ms, Maximum = 33ms, Average = 20ms

It’s working now. I installed mongodb 3.6 version and then voila! Connected!!

Had to use --ssl, while connecting.

C:\Program Files\MongoDB\Server\3.6\bin>mongo cluster0-shard-00-00-jxeqq.mongodb.net:27017 --ssl
MongoDB shell version v3.6.6
connecting to: mongodb://cluster0-shard-00-00-jxeqq.mongodb.net:27017/test
MongoDB server version: 3.6.11
MongoDB Enterprise Cluster0-shard-0:SECONDARY>