Failure to authenticate to replica cluster

I followed (I think) the instructions for connecting to Atlas through the shell, but am getting the following response (ending with failure to authenticate). I am using the password “m001-mongodb-basics” and whitelisted my IP. Any thoughts?

Also, I don’t know if it is important, but when creating the cluster, I don’t recall being asked to create a group, and my cluster/project do not display a group name…

Sorry, I didnt post the response shown below:
MacBook-Air-1:~ elicomputer$ mongo “mongodb+srv://sandbox-t0qrr.mongodb.net/test” --username m001-student

MongoDB shell version v4.0.3

Enter password:

connecting to: mongodb+srv://sandbox-t0qrr.mongodb.net/test

2019-08-28T13:59:13.952-0400 I NETWORK [js] Starting new replica set monitor for Sandbox-shard-0/sandbox-shard-00-00-t0qrr.mongodb.net.:27017,sandbox-shard-00-01-t0qrr.mongodb.net.:27017,sandbox-shard-00-02-t0qrr.mongodb.net.:27017

2019-08-28T13:59:14.247-0400 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to sandbox-shard-00-02-t0qrr.mongodb.net.:27017 (1 connections now open to sandbox-shard-00-02-t0qrr.mongodb.net.:27017 with a 5 second timeout)

2019-08-28T13:59:14.253-0400 I NETWORK [js] Successfully connected to sandbox-shard-00-00-t0qrr.mongodb.net.:27017 (1 connections now open to sandbox-shard-00-00-t0qrr.mongodb.net.:27017 with a 5 second timeout)

2019-08-28T13:59:14.314-0400 I NETWORK [js] changing hosts to Sandbox-shard-0/sandbox-shard-00-00-t0qrr.mongodb.net:27017,sandbox-shard-00-01-t0qrr.mongodb.net:27017,sandbox-shard-00-02-t0qrr.mongodb.net:27017 from Sandbox-shard-0/sandbox-shard-00-00-t0qrr.mongodb.net.:27017,sandbox-shard-00-01-t0qrr.mongodb.net.:27017,sandbox-shard-00-02-t0qrr.mongodb.net.:27017

2019-08-28T13:59:14.572-0400 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to sandbox-shard-00-00-t0qrr.mongodb.net:27017 (1 connections now open to sandbox-shard-00-00-t0qrr.mongodb.net:27017 with a 5 second timeout)

2019-08-28T13:59:14.598-0400 I NETWORK [js] Successfully connected to sandbox-shard-00-01-t0qrr.mongodb.net:27017 (1 connections now open to sandbox-shard-00-01-t0qrr.mongodb.net:27017 with a 5 second timeout)

2019-08-28T13:59:14.896-0400 I NETWORK [ReplicaSetMonitor-TaskExecutor] Successfully connected to sandbox-shard-00-02-t0qrr.mongodb.net:27017 (1 connections now open to sandbox-shard-00-02-t0qrr.mongodb.net:27017 with a 5 second timeout)

Implicit session: session { “id” : UUID(“fbb436cf-acc2-4457-954b-4420ce1f10e5”) }

MongoDB server version: 4.0.12

2019-08-28T13:59:15.248-0400 I NETWORK [js] Marking host sandbox-shard-00-00-t0qrr.mongodb.net:27017 as failed :: caused by :: Location8000: can’t authenticate against replica set node sandbox-shard-00-00-t0qrr.mongodb.net:27017 :: caused by :: bad auth Authentication failed.

2019-08-28T13:59:15.374-0400 I NETWORK [js] Marking host sandbox-shard-00-01-t0qrr.mongodb.net:27017 as failed :: caused by :: SocketException: can’t authenticate against replica set node sandbox-shard-00-01-t0qrr.mongodb.net:27017 :: caused by :: socket exception [CONNECT_ERROR] server [sandbox-shard-00-01-t0qrr.mongodb.net:27017] connection pool error: network error while attempting to run command ‘isMaster’ on host ‘sandbox-shard-00-01-t0qrr.mongodb.net:27017

2019-08-28T13:59:15.501-0400 I NETWORK [js] Marking host sandbox-shard-00-02-t0qrr.mongodb.net:27017 as failed :: caused by :: SocketException: can’t authenticate against replica set node sandbox-shard-00-02-t0qrr.mongodb.net:27017 :: caused by :: socket exception [CONNECT_ERROR] server [sandbox-shard-00-02-t0qrr.mongodb.net:27017] connection pool error: network error while attempting to run command ‘isMaster’ on host ‘sandbox-shard-00-02-t0qrr.mongodb.net:27017

2019-08-28T13:59:15.684-0400 I NETWORK [js] Marking host sandbox-shard-00-00-t0qrr.mongodb.net:27017 as failed :: caused by :: Location8000: can’t authenticate against replica set node sandbox-shard-00-00-t0qrr.mongodb.net:27017 :: caused by :: bad auth Authentication failed.

2019-08-28T13:59:15.689-0400 E QUERY [js] Error: can’t authenticate against replica set node sandbox-shard-00-00-t0qrr.mongodb.net:27017 :: caused by :: bad auth Authentication failed. :

DB.prototype._authOrThrow@src/mongo/shell/db.js:1685:20

@(auth):6:1

@(auth):1:2

exception: login failed

Hi @Elazar_Katz_96030,

I am able to connect to your cluster using the connection string that you have provided.

Can you please try to connect using this connection string?

mongo "mongodb+srv://sandbox-t0qrr.mongodb.net/test" -u m001-student -p m001-mongodb-basics

If the issue still persists, please feel free to get back to us. Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer

Thank you Shubham. That worked. I did get the error message “Error while trying to show server startup warnings: user is not allowed to do action [getLog] on [admin.]” . Is that important?

Hey @Elazar_Katz_96030

That error you ca ignore and continue on

Hi @Elazar_Katz_96030,

You can safely ignore this error message. If you have any other issue, please feel free to get back to us.

Happy Learning :slight_smile:

Thanks,
Shubham Ranjan
Curriculum Support Engineer