Unable to search collections

I receive the attached message each time I access the cluster. Please let me know how to resolve this.

I saw an earlier thread with a similar issue. do i have to change permissions to “atlasAdmin”?
EDIT: i made the change and tried another search. is this the same error?

Huh, this is odd… While part of the cluster is being reached, not everything seems to be reachable. That’s pretty odd.

@Kanika, any ideas?

@Aaron_30116 I don’t think its specific to collections, it looks like the cluster the shell was connected to became unavailable for some reason and it couldn’t fail over. I can see in the shell where you successfully connected and issued command. I don’t believe its a permission issue, I saw something similar yesterday, and eventually I was able to connect. Make sure your computer is awake all the way or isn’t having any other network issues.

You can also confirm by launching Compass to see if its specific to shell or a general connectivity issue on Mongo’s end of things.

You could also try connecting to the sandbox cluster and see if that is successful, maybe it was just an issue with that cluster.

Was there any significant time between the last successful commands in this session and when you did the next one? If so, maybe the connection dropped but the mongo shell was still awake?


1 Like

Great point! This is something I will have to add to the common errors thread!


Compass works but periodically drops connection. I tested the shell a few times and made sure not to wait too long between commands. Im unable to access data in the sandbox cluster, also. I checked with my network admin and he advised its not a network issue. should I try uninstalling and reinstalling?

EDIT: I havent been able to reach data in clusters, using shell, at any point. I can, however, access data in clusters on compass. Thanks for helping!

1 Like

@Aaron_30116 Glad to hear compass is working!

It looks like from the messages the 2nd node in the cluster was having some issues, there is a socket timeout exception in the 2nd window. Perhaps some options that can be specified via Compass are allowing the connection to work properly in the event of some cluster/connection issue.

One thing that might provide some debug, in the mongo shell, type “rs.Status()”. In my case cluster0-shard-00-02-jxeqq.mongodb shows as PRIMARY. So I’m >guessing< that in your case if that should also be marked as PRIMARY but due to the issues you’re seeing since its not reachable it , if the 3rd node is down for some reason its not failing over, there might be a way to force it to connect to one of the other members first? But these could just be superfluous errors to your issue, see below.

Another thing I just noticed, is that in each of the queries you are using the name of the database rather than the collection, which results in the syntax error immediately following it. For example


should be


So there network issues may just be errors unrelated to your queries, and the reason Compass works is because you pick the database and collection, and its not included in your filter because its implied, etc…



Hi @Aaron_30116,

As @Mike_67094 said, Glad you got Compass working! I have always seen issues otherwise.

If you are unable to connect through command line. I would request you to try again and let me know exactly what issues you are having.

I can see that you were able to connect to the cluster “Successfully connected to…” means that you are connected and in the Mongo shell.

But if you suppose started working elsewhere and then comes back to the shell, there might be a chance for the connection to lose.

I would recommend, quit the shell, try connecting to it again if this happens or you see a log message like “Connection to ___ lost” or “Network Timeout” etc.

Let me know more about the shell errors and we will figure it out!


1 Like