-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parse server is sometimes unable to handle voting in mongo replicaset #2544
Comments
I also have similar issue but with mongos! althought I have 3 Mongos but when one of them is not available or a member of one of the replicaSet of one of the mongos goes down or one of the 3 replicaset enter an election stat, Parse stop working and throw error |
@benishak what is the error that is thrown? |
I can confirm that there is an issue, but for us we get a "not master, slaveOk=false;." exception. |
@jeacott1 what version are you running? We added in 2.2.17 a recovery for exceptions in the mongo driver. If that's not effective for your use case, we shall invesitgate what error is triggered and clean up the pending connections while the election is occurring. |
As far as I remember, something like this |
Just a brief update, we've seen the same issue even with versions > 2.2.20 |
The same happens for us. "not master and slaveOk=false" is the error and our server is completely unavailable until I restart it. we are running version 2.3.1
|
Just hit that again today, the moment mongo replica set changes PRIMARY the parse-server looses mongo connection and is not able to get it back until restarted. This is on parse 2.3.2. Parse Server
|
Closing as the mongodb driver was updated many times in between. On a side note, we pass the DB URL provided right into the nodejs mongodb client. I believe the server that very little to do with those issues. I've experienced a few failover over the past 6 months on our setup and parse-server seems to have responded very well to all of those. |
Issue Description
Describe your issue in as much detail as possible.
I have a parse server running dockerized on ubuntu 14.04 on digital ocean, connected to MongoDB 3.0 replicaset with rocksdb engine. When a network issue happens at digital ocean and cluster undergoes voting parse server ends up in unrecoverable state complaining about closed sockets on original primary of the replicaset.
Steps to reproduce
Please include a detailed list of steps that reproduce the issue. Include curl commands when applicable.
Expected Results
Parse to fail over to new primary
Actual Outcome
Parse server hanging
Environment Setup
Logs/Trace
You can turn on additional logging by configuring VERBOSE=1 in your environment.
Aug 17 22:06:10 : message: 'server db-1.######.com:27017 sockets closed' } MongoError: server db-1.######.com:27017 sockets closed
Aug 17 22:06:10 : at Server.destroy (/parse/node_modules/mongodb-core/lib/topologies/server.js:1075:47)
Aug 17 22:06:10 : at /parse/node_modules/mongodb-core/lib/topologies/replset.js:1267:20
Aug 17 22:06:10 : at commandCallback (/parse/node_modules/mongodb-core/lib/topologies/server.js:1194:9)
Aug 17 22:06:10 : at Callbacks.emit (/parse/node_modules/mongodb-core/lib/topologies/server.js:119:3)
Aug 17 22:06:10 : at .messageHandler (/parse/node_modules/mongodb-core/lib/topologies/server.js:358:23)
Aug 17 22:06:10 : at TLSSocket. (/parse/node_modules/mongodb-core/lib/connection/connection.js:292:22)
Aug 17 22:06:10 : at emitOne (events.js:96:13)
Aug 17 22:06:10 : at TLSSocket.emit (events.js:188:7)
Aug 17 22:06:10 : at readableAddChunk (_stream_readable.js:172:18)
Aug 17 22:06:10 : at TLSSocket.Readable.push (_stream_readable.js:130:10)
Aug 17 22:06:10 : #33[31merror#033[39m: error getting auth for sessionToken MongoError: server db-1.####.com:27017 sockets closed
Aug 17 22:06:10 : at Server.destroy (/parse/node_modules/mongodb-core/lib/topologies/server.js:1075:47)
Aug 17 22:06:10 : at /parse/node_modules/mongodb-core/lib/topologies/replset.js:1267:20
Aug 17 22:06:10 : at commandCallback (/parse/node_modules/mongodb-core/lib/topologies/server.js:1194:9)
Aug 17 22:06:10 : at Callbacks.emit (/parse/node_modules/mongodb-core/lib/topologies/server.js:119:3)
Aug 17 22:06:10 : at .messageHandler (/parse/node_modules/mongodb-core/lib/topologies/server.js:358:23)
Aug 17 22:06:10 : at TLSSocket. (/parse/node_modules/mongodb-core/lib/connection/connection.js:292:22)
Aug 17 22:06:10 : at emitOne (events.js:96:13)
Aug 17 22:06:10 : at TLSSocket.emit (events.js:188:7)
Aug 17 22:06:10 : at readableAddChunk (_stream_readable.js:172:18)
Aug 17 22:06:10 : at TLSSocket.Readable.push (_stream_readable.js:130:10)
Aug 20 05:16:33 : Uncaught internal server error. { MongoError: no valid seed servers in list
Aug 20 05:16:33 : at . (/parse/node_modules/mongodb-core/lib/topologies/replset.js:1415:39)
Aug 20 05:16:33 : at g (events.js:286:16)
Aug 20 05:16:33 : at emitTwo (events.js:106:13)
Aug 20 05:16:33 : at emit (events.js:191:7)
Aug 20 05:16:33 : at . (/parse/node_modules/mongodb-core/lib/topologies/server.js:177:12)
Aug 20 05:16:33 : at g (events.js:286:16)
Aug 20 05:16:33 : at emitTwo (events.js:106:13)
Aug 20 05:16:33 : at emit (events.js:191:7)
Aug 20 05:16:33 : at . (/parse/node_modules/mongodb-core/lib/connection/pool.js:119:12)
Aug 20 05:16:33 : at g (events.js:286:16) name: 'MongoError', message: 'no valid seed servers in list' } MongoError: no valid seed servers in list
Aug 20 05:16:33 : at . (/parse/node_modules/mongodb-core/lib/topologies/replset.js:1415:39)
Aug 20 05:16:33 : at g (events.js:286:16)
Aug 20 05:16:33 : at emitTwo (events.js:106:13)
Aug 20 05:16:33 : at emit (events.js:191:7)
Aug 20 05:16:33 : at . (/parse/node_modules/mongodb-core/lib/topologies/server.js:177:12)
Aug 20 05:16:33 : at g (events.js:286:16)
Aug 20 05:16:33 : at emitTwo (events.js:106:13)
Aug 20 05:16:33 : at emit (events.js:191:7)
Aug 20 05:16:33 : at . (/parse/node_modules/mongodb-core/lib/connection/pool.js:119:12)
Aug 20 05:16:33 : at g (events.js:286:16)
the exception repeatedly thrown by parse even when mongo replicaset is back online and finished voting
similar issue is referenced in issue: #2446 by @jeacott1
The text was updated successfully, but these errors were encountered: