Domanda

I have a problem doing backups of replica set mongodump. Validated the same problem with mongoexport just out of curiosity.

Here is my setup:

  • mongodb-linux-x86_64-static-legacy-2.2.0
  • 3 nodes replica set (as of time being healthy)
PRIMARY> rs.status() {
        "set" : "eu-int",
        "date" : ISODate("2013-03-01T09:54:06Z"),
        "myState" : 1,
        "members" : [
                {
                        "_id" : 0,
                        "name" : "ldnpsr1971:27017",
                        "health" : 1,
                        "state" : 1,
                        "stateStr" : "PRIMARY",
                        "uptime" : 26646,
                        "optime" : {
                                "t" : 1362131645000,
                                "i" : 11
                        },
                        "optimeDate" : ISODate("2013-03-01T09:54:05Z"),
                        "maintenanceMode" : -1,
                        "self" : true
                },
                {
                        "_id" : 1,
                        "name" : "ldnpsr1723:27017",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 26646,
                        "optime" : {
                                "t" : 1362131645000,
                                "i" : 8
                        },
                        "optimeDate" : ISODate("2013-03-01T09:54:05Z"),
                        "lastHeartbeat" : ISODate("2013-03-01T09:54:05Z"),
                        "pingMs" : 0
                },
                {
                        "_id" : 2,
                        "name" : "ldnpsr2114:27017",
                        "health" : 1,
                        "state" : 2,
                        "stateStr" : "SECONDARY",
                        "uptime" : 26641,
                        "optime" : {
                                "t" : 1362131645000,
                                "i" : 11
                        },
                        "optimeDate" : ISODate("2013-03-01T09:54:05Z"),
                        "lastHeartbeat" : ISODate("2013-03-01T09:54:06Z"),
                        "pingMs" : 0
                }
        ],
        "ok" : 1 }

Now I'm doing my export:

~/mongo/bin/mongodump --host "eu-int/ldnpsr1971:27017,ldnpsr1723:27017,ldnpsr2114:27017" --db msgstore --collection forJames --out ~/data/mongo-backup/eu-int/20130301

Which dies with:

Fri Mar  1 09:55:55 starting new replica set monitor for replica set eu-int with seed of ldnpsr1971:27017,ldnpsr1723:27017,ldnpsr2114:27017
Fri Mar  1 09:55:55 successfully connected to seed ldnpsr1971:27017 for replica set eu-int
Fri Mar  1 09:55:55 changing hosts to { 0: "ldnpsr1971:27017", 1: "ldnpsr2114:27017", 2: "ldnpsr1723:27017" } from eu-int/
Fri Mar  1 09:55:55 trying to add new host ldnpsr1723:27017 to replica set eu-int
Fri Mar  1 09:55:55 successfully connected to new host ldnpsr1723:27017 in replica set eu-int
Fri Mar  1 09:55:55 trying to add new host ldnpsr1971:27017 to replica set eu-int
Fri Mar  1 09:55:55 successfully connected to new host ldnpsr1971:27017 in replica set eu-int
Fri Mar  1 09:55:55 trying to add new host ldnpsr2114:27017 to replica set eu-int
Fri Mar  1 09:55:55 successfully connected to new host ldnpsr2114:27017 in replica set eu-int
Fri Mar  1 09:55:55 Primary for replica set eu-int changed to ldnpsr1971:27017
Fri Mar  1 09:55:55 replica set monitor for replica set eu-int started, address is eu-int/ldnpsr1723:27017,ldnpsr1971:27017,ldnpsr2114:27017
Fri Mar  1 09:55:55 [ReplicaSetMonitorWatcher] starting
connected to: eu-int/ldnpsr1971:27017,ldnpsr1723:27017,ldnpsr2114:27017
Fri Mar  1 09:55:55 DATABASE: msgstore   to     /home/ldnlmxi/data/mongo-backup/eu-int/20130301/msgstore
Illegal instruction (core dumped)

Performing the same command with specifying only a single node (PRIMARY node of the replica set) creates the dump successfully.

Please anyone knows what I'm doing wrong?

È stato utile?

Soluzione

You are running into MongoDB bug https://jira.mongodb.org/browse/SERVER-7006 which happened in 2.2.0 but was fixed for 2.2.3 (latest production version).

Upgrading should fix the problem.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top