2017-07-07 2 views
-1

Nous essayons de passer de mongo 2.4.9 à 3.4, nous avons beaucoup de données, donc nous avons essayé de définir la réplication et d'attendre que les données soient synchronisées, puis d'échanger des données primaires. Configurations fait, mais lorsque la réplication est initiée nouveau serveur ne peux pas stabiliser la réplication:Mongodb La réplication ne démarre pas

017-07-07T12:07:22.492+0000 I REPL  [replication-1] Starting initial sync (attempt 10 of 10) 
2017-07-07T12:07:22.501+0000 I REPL  [replication-1] sync source candidate: mongo-2.blabla.com:27017 
2017-07-07T12:07:22.501+0000 I STORAGE [replication-1] dropAllDatabasesExceptLocal 1 
2017-07-07T12:07:22.501+0000 I REPL  [replication-1] ****** 
2017-07-07T12:07:22.501+0000 I REPL  [replication-1] creating replication oplog of size: 6548MB... 
2017-07-07T12:07:22.504+0000 I STORAGE [replication-1] WiredTigerRecordStoreThread local.oplog.rs already started 
2017-07-07T12:07:22.505+0000 I STORAGE [replication-1] The size storer reports that the oplog contains 0 records totaling to 0 bytes 
2017-07-07T12:07:22.505+0000 I STORAGE [replication-1] Scanning the oplog to determine where to place markers for truncation 
2017-07-07T12:07:22.519+0000 I REPL  [replication-1] ****** 
2017-07-07T12:07:22.521+0000 I REPL  [replication-1] Initial sync attempt finishing up. 
2017-07-07T12:07:22.521+0000 I REPL  [replication-1] Initial Sync Attempt Statistics: { failedInitialSyncAttempts: 9, maxFailedInitialSyncAttempts: 10, initialSyncStart: new Date(1499429233163), initialSyncAttempts: [ { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" }, { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" }, { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" }, { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" }, { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" }, { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" }, { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" }, { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" }, { durationMillis: 0, status: "CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find", syncSource: "mongo-2.blabla.com:27017" } ] } 
2017-07-07T12:07:22.521+0000 E REPL  [replication-1] Initial sync attempt 
failed -- attempts left: 0 cause: CommandNotFound: error while getting last 
oplog entry for begin timestamp: no such cmd: find 
2017-07-07T12:07:22.521+0000 F REPL  [replication-1] The maximum number 
of retries have been exhausted for initial sync. 
2017-07-07T12:07:22.522+0000 E REPL  [replication-0] Initial sync failed, 

shutting down now. Restart the server to attempt a new initial sync. 
2017-07-07T12:07:22.522+0000 I -  [replication-0] Fatal assertion 40088 CommandNotFound: error while getting last oplog entry for begin timestamp: no such cmd: find at src/mongo/db/repl/replication_coordinator_impl.cpp 632 

gars assits vous plaît, puisque nous avons plus de 100 g de données, de sorte dump et restore prendra beaucoup de temps d'arrêt

Configurations: 3.4.5 nouvelle machine:

storage: 
    dbPath: /mnt/dbpath 
    journal: 
    enabled: true 
    engine: wiredTiger 
    systemLog: 
    destination: file 
    logAppend: true 
    path: /var/log/mongodb/mongod.log 
    net: 
    port: 27017 
    replication: 
    replSetName: prodTest 

2.4.9 vieille machine avec des données:

dbpath=/var/lib/mongodb 
logpath=/var/log/mongodb/mongodb.log 
logappend=true port = 27017 
+0

poster vos options de configuration de MongoDB –

+0

** 3.4.5 nouvelle machine: ** stockage: dbPath:/mnt/dbpath journal: activé: true moteur : wiredTiger SystemLog: destination: fichier LogAppend: vrai chemin : /var/log/mongodb/mongod.log net: Port: 27017 réplication: replSetName: prodTest ** 2.4.9 vieille machine avec des données: ** dbpath =/var/lib/MongoDB logpath =/var/log/mongodb/mongodb.log logappend = true port = 27017 –

+0

Il semble que vous essayiez de configurer un jeu de réplicas mixtes en utilisant MongoDB 2.4.x et 3.4.x pour mettre à niveau. Cela ne fonctionnera pas: la réplication mixte pour les mises à niveau n'est prise en charge que par les versions majeures adjacentes (2.4 => 2.6, 2.6 => 3.0). Pour connaître les approches prises en charge pour une mise à niveau réussie, consultez les [Notes de publication de MongoDB] (https://docs.mongodb.com/manual/release-notes/). Les questions sur la mise à niveau ou l'administration sont également plus abordées dans [DBA StackExchange] (https://dba.stackexchange.com/tags/mongodb). – Stennie

Répondre

0

la tâche ont été résolus de manière telle:

  1. maître-v2.4 réplique -create, 3-esclaves v2.6
  2. appli -stop, descendre maître
  3. -stop nouveau maître et mettre à jour la version mongo V3.0,
  4. maître de début et de mise à niveau des esclaves sequentually à 3,2 (fichiers db esclaves enlevé nouvelle version sur le moteur démarré wiredTiger)
  5. -Step vers le bas maître, mettre à jour tous les esclaves à 3,4

Ce processus est très rapide car la récupération de l'esclave réplique de 40 Go prend environ 30 mètres.