MongoError: no mongos proxy available, after upgrading from 4.1.2 to 4.4.6
See original GitHub issueAfter upgrading from 4.1.2 to 4.4.6 we are randomly getting MongoError: no mongos proxy available
.
Downgrading to 4.1.2 makes it work stable.
MongoDB cluster with 6 shards (Primary/Secondary/Arbiter each), 2 mongos and 3 config servers MongoDB v3.0.9 Node.js v0.10.24
Options
options.server = {
auto_reconnect: true,
poolSize: 5,
socketOptions: { keepAlive: 1, connectTimeoutMS: 30000 },
reconnectTries: 3000
};
options.replset = {
auto_reconnect: true,
poolSize: 5,
socketOptions: { keepAlive: 1, connectTimeoutMS : 30000 },
reconnectTries: 3000
};
options.mongos = true;
The connection string is something like this:
var uri = "mongodb://mongodb-streaming-mongos01.mymongo.com:15000,mongodb-streaming-mongos02.mymongo.com:15000/dbname";
var db = mongoose.createConnection(uri, options);
Stack trace
MongoError: no mongos proxy available
MongoError: no mongos proxy available
at [object Object].State.pickServer (/data/home/socialb/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js:192:33)
at [object Object].Mongos.command (/data/home/socialb/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/lib/topologies/mongos.js:595:33)
at [object Object].Mongos.command (/data/home/socialb/node_modules/mongoose/node_modules/mongodb/lib/mongos.js:342:17)
at executeCommand (/data/home/socialb/node_modules/mongoose/node_modules/mongodb/lib/db.js:298:19)
at [object Object].Db.command (/data/home/socialb/node_modules/mongoose/node_modules/mongodb/lib/db.js:322:44)
at [object Object].wrapped (/data/home/socialb/node_modules/newrelic/lib/instrumentation/mongodb.js:185:25)
at count (/data/home/socialb/node_modules/mongoose/node_modules/mongodb/lib/collection.js:1963:13)
at [object Object].Collection.count (/data/home/socialb/node_modules/mongoose/node_modules/mongodb/lib/collection.js:1923:44)
at [object Object].wrapped (/data/home/socialb/node_modules/newrelic/lib/transaction/tracer/index.js:155:28)
at [object Object].wrappedQuery (/data/home/socialb/node_modules/newrelic/lib/instrumentation/mongodb.js:218:53)
at [object Object].wrapped [as count] (/data/home/socialb/node_modules/newrelic/lib/instrumentation/mongodb.js:188:22)
at NativeCollection.(anonymous function) [as count] (/data/home/socialb/node_modules/mongoose/lib/drivers/node-mongodb-native/collection.js:124:26)
at NodeCollection.count (/data/home/socialb/node_modules/mongoose/node_modules/mquery/lib/collection/node.js:46:19)
at Query._count (/data/home/socialb/node_modules/mongoose/lib/query.js:1276:20)
at /data/home/socialb/node_modules/mongoose/node_modules/kareem/index.js:156:8
at /data/home/socialb/node_modules/mongoose/node_modules/kareem/index.js:18:7
at wrapped (/data/home/socialb/node_modules/newrelic/lib/transaction/tracer/index.js:155:28)
at process._tickDomainCallback (node.js:459:13)
at process.wrappedFunction (/data/home/socialb/node_modules/newrelic/lib/transaction/tracer/index.js:245:51)
Given the complexity of the topology and the random nature of the error we can’t provide a test case.
Issue Analytics
- State:
- Created 8 years ago
- Reactions:3
- Comments:15
Top Results From Across the Web
no mongos proxy available" when connecting to Replica Set ...
I was constantly getting the "MongoError: no mongos proxy available" error. ... To solve it, upgrade your Node.js runtime to 0.12 or newer....
Read more >[NODE-1401] No mongos proxy available - MongoDB Jira
I get a "no mongos proxy available when i try connecting". mongo version = 3.4.10. Mongo Node driver Version = ^2.2.34. MY CONNECTION...
Read more >Package List — Spack 0.20.0.dev0 documentation
A package universe and a request to install, remove, or upgrade packages have to ... of communication-intensive proxy applications that mimic commonly found...
Read more >Spring Data Commons - Reference Documentation
it must not be a non-static inner class. it must not be a CGLib proxy class. the constructor to be used by Spring...
Read more >Implementation of a Portal Dedicated to Higgs Bosons for ...
to ethical principles when elaborating an academic final thesis. ... 4.1.2 Non-functional requirements . ... 4.4.6 Flask .
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
mongodb-core issue: https://github.com/christkv/mongodb-core/issues/88 A new version was just released which should in theory solve this https://github.com/christkv/mongodb-core/commit/2b4ebbbe5ff77af582fca8ef78c7938ce1c9a79d
@vkarpov15 would you like a pull request to update the mongodb-core version that mongoose depends on?
There is, just upgraded to mongodb driver 2.1.14 yesterday