MongoDB Service Fails to Start After Enabling Replica Set and Restarting System

Hi all,

I’m experiencing an issue with MongoDB after enabling replica set configuration.

Environment:
MongoDB version: 8.0.6
OS: Window server 2016
Deployment: Single-node replica set (local development/testing)

Steps to reproduce the issue:

  1. Start the MongoDB service
  2. Create an admin and normal user using MongoShell
  3. Stop the MongoDB service
  4. Edited mongod.conf to add:
    replication:
    replSetName: rs0
  5. Restart the MongoDB service and It will work fine for first time
  6. Initiated the replica set using:
    rs.initiate()
    At this point, everything worked fine.
  7. But after I restarted the entire system, MongoDB service fails to start with errors.
    {“t”:{“$date”:“2025-04-08T15:06:30.518+02:00”},“s”:“I”, “c”:“CONTROL”, “id”:23132, “ctx”:“initandlisten”,“msg”:“Writing minidump diagnostic file”,“attr”:{“dumpName”:“C:\Program Files\MongoDB\Server\8.0\bin\mongod.2025-04-08T13-06-30.mdmp”}}
    {“t”:{“$date”:“2025-04-08T15:06:30.693+02:00”},“s”:“F”, “c”:“CONTROL”, “id”:23137, “ctx”:“initandlisten”,“msg”:“*** immediate exit due to unhandled exception”}

I have installed a lower version of 7.0.16 and enabled the replica set; it worked for me. I am not sure why the replica set is not worked for 8.0.6 version in VM machine