"Failed to retrieve Oplog last entry timestamp on secondary node": A MongoDB snapshot backup operation fails

Article ID: 64536

Article Type: Troubleshooting

Last Modified:

A MongoDB snapshot backup operation fails with errors.

Symptoms

A MongoDB snapshot backup operation fails with the following errors in the MongoDBCtrl.log file on the secondary node:

6372  1ba0  01/21 13:49:13 455532 MongoDbIDA::MongoDbSnapBackup::UnQuiesceDB(428) - Failed to retrieve Oplog last entry timestamp for host [apple], port [27018]

Causes

  1. The MongoDB server might be inaccessible or unavailable.
  2. The lastCommittedOpTime value might be 0. The value is 0 in the following cases:
    • Journaling is disabled
    • The protocol version is 0, and not 1

Resolution

  1. Verify that the MongoDB server is on and accessible. If not, turn on the server and run the snapshot backup operation again.
  2. If the lastCommittedOpTime value is 0, complete the following steps:
    • Enable journaling on the MongoDB server, and then run the backup operation again. If the oplog timestamp must be collected for incremental backups, then journaling is required. If incremental backups are not required, then disable journaling and add the bEnableMongoOpLogDumps additional setting as explained in the following documentation page: https://documentation.commvault.com/commvault/v11_sp20/article?p=109482.htm After you add the additional setting, run a full snapshot backup operation.

    • Change the protocol version on the MongoDB server from 0 to 1. For example, run the following commands on the primary node of  the replica set:

      cfg = rs.conf()
      cfg._id = "replica_set name"
      cfg.protocolVersion = 1
      cfg.members[0].priority = 1
      cfg.members[1].priority = 1
      cfg.members[2].priority = 1
      cfg.members[0]._id = 0
      cfg.members[1]._id = 1
      cfg.members[2]._id = 2
      cfg.members[0].host = "hostname_1:port_number_1"
      cfg.members[1].host = "hostname_1:port_number_1"
      cfg.members[2].host = "hostname_1:port_number_1"
      rs.reconfig(cfg)

1 Commvault Way, Tinton Falls, NJ 07724 Sitemap | Legal Notices | Trademarks | Privacy Policy
Copyright © Commvault | All Rights Reserved.