Stuck in REMOVED state after change member hostname of a single member replica set

I setup a single member replica set with bindIp: localhost,m.xxx.com. I got member[0].host = 127.0.0.1:27017. Then I changed member[0].host to “m.xxx.com:27017” by rs.reconf().

After that, I’m stuck in REMOVED state. rs.conf() is OK, but rs.status() returns error: MongoServerError: Our replica set config is invalid or we are not a member of it.

I found some logs:

isSelf could not authenticate internal user
"code":74,"codeName":"NodeNotFound","errmsg":"No host described in new configuration with {version: 2, term: 7} for replica set rs0 maps to this node"}

How can I fix it?

Could somebody help? It’s easy to reproduce.

I see the article about converting replica set to standalone.

Could anyone confirm is there risk of data loss doing so ?

I added the self IP into clusterIpSourceAllowlist, then converted the rs to standalone, then converted it to rs. After that, it’s fixed.

1 Like

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