Retry MongoDB connection when configuring replicaset in case the journal is being built.