[SERVER-10424] Single member replica set will not shutdown Created: 03/Aug/13  Updated: 11/Jul/16  Resolved: 03/Aug/13

Status: Closed
Project: Core Server
Component/s: Admin, Replication
Affects Version/s: None
Fix Version/s: 2.5.2

Type: Question Priority: Minor - P4
Reporter: Thomas Boyd Assignee: Scott Hernandez (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Linux, MongoDB 2.4.5


Participants:

 Description   

Single member replica set will fails to shutdown.

Not a common production config, but there are times (esp in development where oplog is involved) where single member replica sets are useful.

replA:PRIMARY> rs.config()
{
	"_id" : "replA",
	"version" : 4,
	"members" : [
		{
			"_id" : 0,
			"host" : "ec2-184-73-73-159.compute-1.amazonaws.com:27017"
		}
	]
}
replA:PRIMARY> db.shutdownServer()
assert failed : unexpected error: "shutdownServer failed: no secondaries within 10 seconds of my optime"
Error: Printing Stack Trace
    at printStackTrace (src/mongo/shell/utils.js:37:15)
    at doassert (src/mongo/shell/assert.js:6:5)
    at assert (src/mongo/shell/assert.js:14:5)
    at DB.shutdownServer (src/mongo/shell/db.js:346:9)
    at (shell):1:4
Sat Aug  3 17:13:39.839 JavaScript execution failed: assert failed : unexpected error: "shutdownServer failed: no secondaries within 10 seconds of my optime" at src/mongo/shell/assert.js:L7



 Comments   
Comment by auto [ 03/Aug/13 ]

Author:

{u'username': u'scotthernandez', u'name': u'Scott Hernandez', u'email': u'scotthernandez@gmail.com'}

Message: SERVER-10424: if the only member don't wait for other replicas on shutdown
Branch: master
https://github.com/mongodb/mongo/commit/4ae9434714b4f060953fa200a0ad1e99b70eecad

Comment by Scott Hernandez (Inactive) [ 03/Aug/13 ]

You can use pass {{

{force: true}

}} to avoid this.

use admin; db.shutdownServer({force:true})

Generated at Thu Feb 08 03:23:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.