IllegalOperation: Transaction numbers are only allowed on a replica set member or mongos

Hello,

Iam getting error when shard collection. Can you help me?

This my error

{"t":{"$date":"2020-11-23T15:11:05.331+07:00"},"s":"I", "c":"MIGRATE", "id":23893, "ctx":"MoveChunk","msg":"MigrationCoordinator delivering decision to self and to recipient","attr":{"decision":"aborted","migrationId":{"uuid":{"$uuid":"0d05a912-9ca1-4bf6-ba94-b9656b01da4d"}}}}
{"t":{"$date":"2020-11-23T15:11:05.332+07:00"},"s":"W", "c":"MIGRATE", "id":22022, "ctx":"MoveChunk","msg":"Failed to clean up migration","attr":{"chunkMigrationRequestParameters":"ns: exampleDB.exampleCollection, [{ _id: MinKey }, { _id: -4611686018427387902 }), fromShard: shard0000, toShard: shard0002","error":"InterruptedDueToReplStateChange: Stepped down while persist migrate abort decision","migrationId":{"uuid":{"$uuid":"0d05a912-9ca1-4bf6-ba94-b9656b01da4d"}}}}
{"t":{"$date":"2020-11-23T15:11:05.332+07:00"},"s":"W", "c":"SHARDING", "id":23777, "ctx":"MoveChunk","msg":"Error while doing moveChunk","attr":{"error":"IllegalOperation: Transaction numbers are only allowed on a replica set member or mongos"}}
{"t":{"$date":"2020-11-23T15:11:05.332+07:00"},"s":"I", "c":"SHARDING", "id":22080, "ctx":"MoveChunk","msg":"About to log metadata event","attr":{"namespace":"changelog","event":{"_id":"mongodb-shard:27017-2020-11-23T15:11:05.332+07:00-5fbb6e993cfb07ec322470fd","server":"mongodb-shard:27017","shard":"shard0000","clientAddr":"","time":{"$date":"2020-11-23T08:11:05.332Z"},"what":"moveChunk.from","ns":"exampleDB.exampleCollection","details":{"min":{"_id":{"$minKey":1}},"max":{"_id":-4611686018427387902},"step 1 of 6":0,"step 2 of 6":2,"to":"shard0002","from":"shard0000","note":"aborted"}}}}

1 Reply

I have not personally run into this, but I did some digging around online for you and found the following page on Stack Overflow:

MongoError: Transaction numbers are only allowed on a replica set member or mongos

The gist of the article starts that you need a Mongo replica set, and it gives instructions on how to accomplish this.

I hope this is helpful - please let me know if this works for you!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct