Cannot connect to Mongo Server Instance on Linux VM remotely using Compass

Nate Paulemon 6 Reputation points
2022-02-24T21:22:49.637+00:00

When I try running connecting with my connection string I get the error:

"Authentication failed"

This is the string i try to use:

mongodb://username:password@52.152.139.43/meteor

I use the address of my VM in the connection string, is that correct?

I created my user with the following roles:

{
"roles" : [
{
"role" : "readWrite",
"db" : "meteor"
}
]
}

My resource has port 27017 open for all communication from all locations

Also here are the contents of my mongod.conf:

// mongod.conf

// for documentation of all options, see:
// http://docs.mongodb.org/manual/reference/configuration-options/

// Where and how to store data.
storage:
dbPath: /var/lib/mongodb
journal:
enabled: true
// engine:
// mmapv1:
// wiredTiger:

// where to write logging data.
systemLog:
destination: file
logAppend: true
path: /var/log/mongodb/mongod.log

// network interfaces
net:
port: 27017
bindIp: 0.0.0.0

// how the process runs
processManagement:
timeZoneInfo: /usr/share/zoneinfo

//security:
// authorization: 'enabled'
//operationProfiling:

//replication:

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,072 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Nate Paulemon 6 Reputation points
    2022-02-24T21:37:57.31+00:00

    figured it out, had to append

    ?authSource=meteor

    to my connection string

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.