Can't see data on the Secondary Nodes

Hello everyone,

Passing the M201 “Chapter 5: Performance on Clusters” and faced an issue with the reading of data from the secondary node of my replica set, whereas I can’t find whether my collection is present on my SECONDARY node. Please suggest how to check this in any way.
image

Regards.

Here is what I would do to check:
Could you show what is on the primary (show dbs), also is this a sharded cluster?

  1. From the primary I would do these two commands
    rs.status() and look if you can see the secondaries are listed and what “state” they are in.
  2. If the nodes show up and are health then run:
    rs.printSecondaryReplicationInfo() – this will show you if the nodes are replicating and if there is any lag.

did you connect with an admin or an account with sufficient privileges?

Hello everyone,

Thanks for the comments. In order to properly use the rs.slaveOk() command, you should log in to that particular SECONDARY node with an appropriate privilege and authentication.

Regards.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.