Hi there,
I have noticed that other participants are already commenting about this, but I am on MongoDB Atlas, not mLab, and since yesterday I also have problems reconnecting to this service! What causes this? Maybe as a free service they are not providing this for more than 2 days?
Can I just leave Mondo DB Atlas, and move this part of the project to AWS too? Is it very expensive to do so, or included in the price we are now paying anyway? Maybe some guide would be nice on this topic. Or maybe just a link referencing a guide elsewhere.
Also I have got this error message:
Error"
: Could not tear down the ORM hook. Error details: Error: Consistency violation: Attempting to tear down a datastore (`default`) which is not currently registered with this adapter. This is usually due to a race condition in userland code (e.g. attempting to tear down the same ORM instance more than once), or it could be due to a bug in this adapter. (If you get stumped, reach out at http://sailsjs.com/support.)"
I have noticed, that i have -- adapter: "connect.mongo" -- on session.js, but -- adapter: "sails-mongo" -- in datastore.js
later part of the Error: " /Users/gergelykovacs/Dev/fullstack_social_lbta/web_social/node_modules/mongodb/lib/mongo_client.js:421
throw err
^
Error [MongoError]: connection 3 to cluster0-shard-00-01.iqbm6.mongodb.net:27017 closed
at Function.MongoError.create (/Users/gergelykovacs/Dev/fullstack_social_lbta/web_social/node_modules/mongodb-core/lib/error.js:29:11)
at TLSSocket.<anonymous> (/Users/gergelykovacs/Dev/fullstack_social_lbta/web_social/node_modules/mongodb-core/lib/connection/connection.js:214:22) "
Thanks, Greg
I have deleted the cluster, created a brand new one. Nodemon is still crashing.
Is this what you meant by a new instance, or to rewrite the app? The app worked until like two days ago, after which I didn't touch it, but started crashing. (Happened first time, when I tried to demo to a client.) Your downloaded material runs fine with your settings and db though. I could try to diff out every file, but Compass still cannot connect to this new cluster either. So the problem is lying somewhere around the mongo connection.
Error:
Users/gergelykovacs/Dev/fullstack_social_lbta/web_social/node_modules/mongodb/lib/mongo_client.js:421
throw err
^
Error [MongoError]: connection 3 to fullstack-greg-shard-00-02.iqbm6.mongodb.net:27017 closed
at Function.MongoError.create (/Users/gergelykovacs/Dev/fullstack_social_lbta/web_social/node_modules/mongodb-core/lib/error.js:29:11)
at TLSSocket.<anonymous> (/Users/gergelykovacs/Dev/fullstack_social_lbta/web_social/node_modules/mongodb-core/lib/connection/connection.js:214:22)
at Object.onceWrapper (events.js:417:26)
at TLSSocket.emit (events.js:322:22)
at net.js:672:12
at Socket.done (_tls_wrap.js:557:7)
at Object.onceWrapper (events.js:417:26)
at Socket.emit (events.js:310:20)
at TCP.<anonymous> (net.js:672:12)
[nodemon] app crashed - waiting for file changes before starting...
Ok, finally I was able to connect to Mongo Atlas, then lift the app. The mistake I was doing __after creating the new cluster__ , that I added my login-password in the URL. Instead I should have added the password I was using with the deleted cluster. Not sure why and, where to set the passwords for the clusters. (maybe for database users rather).
Also not clear why the closing of the previous cluster happened, and how long the new one gonna last!
But at least I can continue the course now!
Thanks for the support!