MongoError: topology was destroyed by sailsjs

When you try to create this error, it appears:

Error (E_UNKNOWN) :: An unexpected MongoError error was detected: the topology was corrupted on Server.insert (/ Users / oscargallon / Documents / developer / sails / reyesmagoswebpae / node_modules / sails-mongo / node_modules / mongodb / node_modules / mongodb-core / lib topologies / server.js: 797: 49)

here is my model

module.exports = { attributes: { name: { type: 'string', required: true }, email: { type: 'String', required: true }, description: { type: 'string', required: true }, phonenumber: { type: 'string', required: true }, mobile: { type: 'string', required: true } } }; 
+7
javascript mongodb
source share
3 answers

I also ran into this problem today - I changed the version of sail-mongo from "sail-mongo": "^ 0.10.7" to "sail-mongo": "^ 0.10.6" in package.json in sails and ran $ sudo npm install, then the sails were raised, it worked fine, I think there is some error in npm

+6
source share

Sails-mongo v0.10.7 introduced a split change and does not support mongo <= 2.4. The modified change was canceled, and v0.10.8 was published, restoring compatibility with mongo <= 2.4. Meanwhile, v0.10.7 is deprecated.

V0.11 was released at the same time, which is compatible with mongo> = 2.6.

For those using mongo <= 2.4 , do not upgrade to 0.11.x.

UPDATE: some users reported problems with Mongo 3.0 and, using v0.10.8, apparently fixed the problem for them: more .

UPDATE 2: The problem with v0.10.7 and v0.11.0-1 has been traced back to inappropriate connection configurations ( PR # 277 ). This can be sails/config/connections.js locally by configuring the connection configuration ( sails/config/connections.js file for sails users):

 devMongodbServer: { // connection name port: 27017, database: 'dev-mongodb-server', poolSize: 5, socketOptions: { noDelay: true, connectTimeoutMS: 0, socketTimeoutMS: 0 } } 

v0.11.2 will be released with this default connection configuration.

Read more about https://github.com/balderdashy/sails-mongo/issues/266

+2
source share

As Anandapriyan mentioned, this caused a 0.10.7 sail-mongo. The solution does not work for me, but it inspired me. I am reinstalling a Mongo sail with an older build. and it works.

 sudo npm install sails-mongo@0.10.6 --save 

I tried 0.10.4, but I got another error. So just user 0.10.6

 error: A hook (`orm`) failed to load! 
+1
source share

All Articles