Connection test Error from command line

Hi, could you please help me with this connection error :

2019-04-12T10:26:26.821+0100 W NETWORK [js] Unable to reach primary for set Cluster0-shard-0
2019-04-12T10:26:26.821+0100 I NETWORK [js] Cannot reach any nodes for set Cluster0-shard-0. Please check network connectivity and
the status of the set. This has happened for 8 checks in a row.
2019-04-12T10:26:26.822+0100 E QUERY [js] Error: connect failed to replica set Cluster0-shard-0/cluster0-shard-00-00-yekah.mongodb.net.:27017,cluster0-shard-00-01-yekah.mongodb.net.:27017,cluster0-shard-00-02-yekah.mongodb.net.:27017 :
connect@src/mongo/shell/mongo.js:343:13
@(connect):1:6
exception: connect failed

this keeps showing up when I try to connect to Mongo atlas . . . and obviously, my internet connectivity is good!

Hi @olalekan_ogundipe_04604,

Can you share the command that you are running?



I can’t connect to db

mongo “mongodb+srv://m220student:: m220password@mflix-4prbz.mongodb.net/test?retryWrites=true

…and I got this as a response :

Microsoft Windows [Version 6.3.9600]

© 2013 Microsoft Corporation. All rights reserved.

C:\Users\OLAMI\Desktop\Coding Files\Database\MONGO LECTURES\mflix-js (2)>mongo “mongodb+srv://m220student:: m220password@mflix-4prbz.mongodb.net/test?retryWrites=true

FailedToParse: Password must be URL Encoded for mongodb:// URL: mongodb+srv://m220student:: m220password@mflix-4prbz.mongodb.net/test?retryWrites=true

try ‘mongo --help’ for more information

This is the whole command line output :

C:\Users\OLAMI\Desktop\Coding Files\Database\MONGO LECTURES\mflix-js (2)>mongo "mongodb+srv://m220student: m220password@mflix-4prbz.mongodb.net/test?retryWrites=true"
MongoDB shell version v4.0.6
connecting to: mongodb://mflix-shard-00-00-4prbz.mongodb.net.:27017,mflix-shard-00-01-4prbz.mongodb.net.:27017,mflix-shard-00-02-4prbz.mongodb.net.:27017/test?authSource=admin&gssapiServiceName=mongodb&replicaSet=mflix-shard-0&retryWrites=true&ssl=true
2019-04-13T07:10:53.729+0100 I NETWORK [js] Starting new replica set monitor for mflix-shard-0/mflix-shard-00-00-4prbz.mongodb.net.:27017,mflix-shard-00-01-4prbz.mongodb.net.:27017,mflix-shard-00-02-4prbz.mongodb.net.:27017
2019-04-13T07:10:55.190+0100 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to mflix-shard-00-00-4prbz.mongodb.net.:27017 (1 connections now open to mflix-shard-00-00-4prbz.mongodb.net.:27017 with a 5 second timeout)
2019-04-13T07:10:55.300+0100 I NETWORK [js] Successfully connected to mflix-shard-00-02-4prbz.mongodb.net.:27017 (1 connections now open to mflix-shard-00-02-4prbz.mongodb.net.:27017 with a 5 second timeout)
2019-04-13T07:10:55.397+0100 I NETWORK [ReplicaSetMonitor-TaskExecutor] changing hosts to mflix-shard-0/mflix-shard-00-00-4prbz.mongodb.net:27017,mflix-shard-00-01-4prbz.mongodb.net:27017,mflix-shard-00-02-4prbz.mongodb.net:27017 from mflix-shard-0/mflix-shard-00-00-4prbz.mongodb.net.:27017,mflix-shard-00-01-4prbz.mongodb.net.:27017,mflix-shard-00-02-4prbz.mongodb.net.:27017
2019-04-13T07:10:56.333+0100 I NETWORK [js] Successfully connected to mflix-shard-00-00-4prbz.mongodb.net:27017 (1 connections now open to mflix-shard-00-00-4prbz.mongodb.net:27017 with a 5 second timeout)
2019-04-13T07:10:56.371+0100 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to mflix-shard-00-01-4prbz.mongodb.net:27017 (1 connections now open to mflix-shard-00-01-4prbz.mongodb.net:27017 with a 5 second timeout)
2019-04-13T07:10:57.430+0100 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to mflix-shard-00-02-4prbz.mongodb.net:27017 (1 connections now open to mflix-shard-00-02-4prbz.mongodb.net:27017 with a 5 second timeout)
2019-04-13T07:10:57.818+0100 I NETWORK [js] Marking host mflix-shard-00-00-4prbz.mongodb.net:27017 as failed :: caused by :: Location40659: can’t connect to new replica set master [mflix-shard-00-00-4prbz.mongodb.net:27017], err: Location8000: bad auth Authentication failed.
2019-04-13T07:10:58.241+0100 I NETWORK [js] Marking host mflix-shard-00-02-4prbz.mongodb.net:27017 as failed :: caused by :: SocketException: can’t authenticate against replica set node mflix-shard-00-02-4prbz.mongodb.net:27017 :: caused by :: socket exception
[CONNECT_ERROR] server [mflix-shard-00-02-4prbz.mongodb.net:27017] connection pool error: network error while attempting to run command ‘isMaster’ on host 'mflix-shard-00-02-4prbz.mongodb.net:27017
2019-04-13T07:10:58.640+0100 I NETWORK [js] Marking host mflix-shard-00-01-4prbz.mongodb.net:27017 as failed :: caused by :: SocketException: can’t authenticate against replica set node mflix-shard-00-01-4prbz.mongodb.net:27017 :: caused by :: socket exception
[CONNECT_ERROR] server [mflix-shard-00-01-4prbz.mongodb.net:27017] connection pool error: network error while attempting to run command ‘isMaster’ on host 'mflix-shard-00-01-4prbz.mongodb.net:27017
2019-04-13T07:11:00.091+0100 I NETWORK [js] Marking host mflix-shard-00-00-4prbz.mongodb.net:27017 as failed :: caused by :: Location40659: can’t connect to new replica set master [mflix-shard-00-00-4prbz.mongodb.net:27017], err: Location8000: bad auth Authentication failed.
2019-04-13T07:11:00.092+0100 E QUERY [js] Error: can’t authenticate against replica set node mflix-shard-00-00-4prbz.mongodb.net:27017 :: caused by :: can’t connect to new replica set master [mflix-shard-00-00-4prbz.mongodb.net:27017], err: Location8000: bad
auth Authentication failed. :
connect@src/mongo/shell/mongo.js:343:13
@(connect):1:6
exception: connect failed