I get a replica set: a primary + an arbiter + a secondary.
I got a full disk on the secondary so it crashed and I wanted to take that opportunity to upgrade to version 4.
In fact, I realized that I should first recover the whole replica set in 3.6.
on primary: I get.
rsamv:PRIMARY> db.adminCommand( { getParameter: 1, featureCompatibilityVersion: 1 } )
{
"featureCompatibilityVersion" : {
"version" : "3.4",
"targetVersion" : "3.6"
},
"ok" : 1
}
on secondary when I try to start the server I get:
2018-10-09T13:45:45.377+0000 I REPL [replexec-1] Member localhost:27017 is now in state PRIMARY
2018-10-09T13:45:45.377+0000 I REPL [replexec-2] Member localhost:27018 is now in state ARBITER
2018-10-09T13:45:46.055+0000 I NETWORK [listener] connection accepted from
127.0.0.1:49112 #1 (1 connection now open)
2018-10-09T13:45:46.071+0000 I NETWORK [conn1] received client metadata from
127.0.0.1:49112 conn1: { driver: { name: "NetworkInterfaceASIO-Replication", version: "3.6.2" }, os: { type: "Linux", name: "Ubuntu", architecture: "x86_64", version: "17.10" } }
2018-10-09T13:45:46.402+0000 I REPL [replication-1] sync source candidate: localhost:27017
2018-10-09T13:45:46.402+0000 I STORAGE [replication-1] dropAllDatabasesExceptLocal 1
2018-10-09T13:45:46.403+0000 I ASIO [NetworkInterfaceASIO-RS-0] Connecting to localhost:27017
2018-10-09T13:45:46.436+0000 I ASIO [NetworkInterfaceASIO-RS-0] Successfully connected to localhost:27017, took 33ms (1 connections now open to localhost:27017)
2018-10-09T13:45:46.488+0000 I REPL [replication-0] Initial sync attempt finishing up.
2018-10-09T13:45:46.488+0000 I REPL [replication-0] Initial Sync Attempt Statistics: { failedInitialSyncAttempts: 0, maxFailedInitialSyncAttempts: 10, initialSyncStart: new Date(1539092745369), initialSyncAttempts: [] }
2018-10-09T13:45:46.488+0000 E REPL [replication-0] Initial sync attempt failed -- attempts left: 9 cause: IncompatibleServerVersion: Sync source had unsafe feature compatibility version: upgrading to 3.6
after several attempts of server version... it fails and stops.
I tried the command db.adminCommand( { setFeatureCompatibilityVersion: "3.4" } ) on the primary... but the command hangs and doesn't return. and there is nothing reported on the log.
the database is about 150 GB large.
how to fix this issue to recover the replicaset and to upgrade it to the latest version ?
I tried to find the same issue reported on the forums... but I still didn't see the same situation.
Thanks,
Olivier