Closed PhilippKrone closed 9 years ago
Hmm can you confirm which version of mongoose you're using? Can't quite find the corresponding line in the mongodb node driver.
@vkarpov15 I think its not directly in mongoose but in mongodb itself:
node_modules/mongoose/node_modules/mongodb/lib/cursor.js:
I just ran across this same issue when trying to connect to a Mongo cluster set up by Google Cloud Platform. Is there something that I can do to get around this issue? Downgrade a version or something?
I went into my installed mongoose in node_modules and upgraded from mongodb@2.0.40 to mongodb@2.0.42 and it seems to have fixed it.
I don't know what the solution for this would be, maybe release a bugfix for mongoose that requires a minimum of mongodb@2.0.24?
@PhilippKrone Yeah but telling me the exact version of mongoose also tells me the exact versions of the mongodb driver and mongodb-core, which makes debugging much easier :)
Sure, there we go:
"name": "mongoose", "description": "Mongoose MongoDB ODM", "version": "4.1.1-pre", "homepage": "http://mongoosejs.com", "browser": "lib/browser.js", "gitHead": "97424bbe687f643280946ef1d8738c2dbe006a00", "_id": "mongoose@4.1.1-pre", "_shasum": "c019132f96bb72343292082cef7c98c299d148e7", "_from": "git+https://github.com/Automattic/mongoose", "_resolved": "git+https://github.com/Automattic/mongoose#97424bbe687f643280946ef1d8738c2dbe006a00"
On 25 Aug 2015, at 18:18, Valeri Karpov notifications@github.com wrote:
@PhilippKrone https://github.com/PhilippKrone Yeah but telling me the exact version of mongoose also tells me the exact versions of the mongodb driver and mongodb-core, which makes debugging much easier :)
— Reply to this email directly or view it on GitHub https://github.com/Automattic/mongoose/issues/3224#issuecomment-134657289.
I'm getting this issue with these versions of mongoose & mongodb :
│ ├─┬ mongoose@4.1.3
│ │ ├── async@0.9.0
│ │ ├── bson@0.4.11
│ │ ├── hooks-fixed@1.1.0
│ │ ├── kareem@1.0.1
│ │ ├─┬ mongodb@2.0.40
│ │ │ ├── es6-promise@2.1.1
│ │ │ ├─┬ mongodb-core@1.2.9
│ │ │ │ └─┬ kerberos@0.0.12
│ │ │ │ └── nan@1.8.4
│ │ │ └─┬ readable-stream@1.0.31
│ │ │ ├── core-util-is@1.0.1
│ │ │ ├── inherits@2.0.1
│ │ │ ├── isarray@0.0.1
│ │ │ └── string_decoder@0.10.31
So we upgraded the node driver, according to @PhilippKrone this should work. I haven't been able to reproduce this issue though... @mansona do you have any ideas on how to reproduce this?
@vkarpov15 unfortunately i don't know how to bring this on, All I know is that i was connecting to a mongo cluster with 2 nodes and an arbiter and it would randomly happen. manually going into mongoose node_modules folder and updating mongodb to mongo@2.0.42 would solve it to me so this should fix my issues
When using the option
randomly the following error occurs:
Up to now, I was not able to figure out any specific reason, but it happens only if the above mentioned option is set. However, there seems to be no connection to whether there is actually a primary available or not.