Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-714

replication not switched to primary in nodejs

    • Type: Icon: Task Task
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.2.0
    • Affects Version/s: 2.1.8
    • Component/s: MongoDB 3.2
    • Environment:
      production

      Hi,
      I setup replication in mongo and everything works perfect in command line.
      I ran the node with the configure of the replication and in the beginning everything is looks good.

      But when i turned off the master and the slave changed to primary, the call back function in the node stop working and the app is stack.

      It is look that there is some bug with the switching.

      Please let me know what to do.

      My config in the node is:

      MongoClient.connect(global.connectMongo,{}, function(err, db)

      { if(err) throw err; }

      );

      I also tried to add the options:
      {server: { socketOptions:

      { keepAlive: 1, connectTimeoutMS: 30000 }

      It also not solved the problem.

      FYI.

            Assignee:
            christkv Christian Amor Kvalheim
            Reporter:
            royMongo roy sabah [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: