Compass Connection [Solution]

Discussion about Chapter 1- Basic Queries, Connection Problems, Compass Related Queries

Compass Installation

Just wanted to underline that for this course you will need the Compass Stable version (Download from here ), which you can try out for free. The Compass Community versions lack specific functionality that is used in some of the lessons.
Again, MongoDB Compass Enterprise (Stable) is free of charge for evaluation purposes.

Compass Connection, [Solution] Could not connect to MongoDB on the provided host and port

If you are unable to Connect with Compass, please ensure the following:

  • Parameters:
Username: m001-student
Password: m001-mongodb-basics
Replica Set Name: Cluster0-shard-0
Read Preference: Primary Prefered
  • You have filled in all fields and are not relying on the auto-filed fields.
  • There are no whitespaces copied in the fields.
  • Try to switch off SRV Record (incase it was switched on)
  • Generally, if you are unable to connect to the Mongo server after filling everything correctly or following the above steps, it is primarily because the network is blocking your requests to the Atlas server. So, to resolve this problem, you should do the following:

~$ telnet 27017
Connected to

  • Also, can you go to your browser and try . The output should be:
    It looks like you are trying to access MongoDB over HTTP on the native driver port.
    If you get the above message, then that means you can access Atlas.
  • Incase, your network is blocking the request, it would be advisable to work with your network admin to unblock the request or try from your home network.

Compass Connection: [Solution]An error occurred while loading navigation: ‘not master and slaveOk=false’

Please ensure the following:

  1. Make sure it is MongoDB Compass Stable version: Download here
  2. Ensure that you have written all the parameter names correctly. No whitespace should be trailing in the cluster name.
  3. Try to switch off SRV Record (incase it was switched on)
    If the above points don’t resolve your issue, then quit Compass, klll The MongoDB GUI process and start Compass. Ensure all the above points are met and connect.

If the above step still does not solve your problem, then please follow the above point of quitting Compass, killing the process and re-install Compass.

If you are having any trouble during this chapter, please do not hesitate to post those issues to this forum and we’ll try to help.

We hope you enjoy your time with us and learn lots about MongoDB.