oe-cloud
oe-cloud copied to clipboard
Connect to MongoDB atlas
Hi! I'm currently experimenting oeCloud for our internal operation to completely replace existing workflow application.
Currently we're stuck in how to connect our database to cloud-based MongoDB atlas under 2 reasons:
- It seemed that oecloud needs the database user as an admin, which is not really applicable in production environment. I'd like to know if there's manual override to this.
- I keep getting this
Connection fails: { MongoError: no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.name: 'MongoError', message: 'no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.', ok: 0, errmsg: 'no SNI name sent, make sure using a MongoDB 3.4+ driver/shell.', code: 8000, codeName: 'AtlasError' }This is mydatasource.jsonfile:
{
"db": {
"host": "vti-oecloud-test-shard-00-00-qoacp.mongodb.net",
"port": 27017,
"url": "mongodb://vti-oecloud-test-shard-00-00-qoacp.mongodb.net:27017,vti-oecloud-test-shard-00-01-qoacp.mongodb.net:27017,vti-oecloud-test-shard-00-02-qoacp.mongodb.net:27017/test?ssl=true&replicaSet=vti-oecloud-test-shard-0&authSource=admin&retryWrites=true",
"database": "atlas-db",
"user": "<username>",
"password": "<password>",
"name": "db",
"connector": "mongodb"
},
"appdb": {
"host": "vti-oecloud-test-shard-00-00-qoacp.mongodb.net",
"port": 27017,
"url": "mongodb://vti-oecloud-test-shard-00-00-qoacp.mongodb.net:27017,vti-oecloud-test-shard-00-01-qoacp.mongodb.net:27017,vti-oecloud-test-shard-00-02-qoacp.mongodb.net:27017/test?ssl=true&replicaSet=vti-oecloud-test-shard-0&authSource=admin&retryWrites=true",
"database": "atlas-appdb",
"user": "<username>",
"password": "<password>",
"name": "appdb",
"connector": "mongodb"
},
"gridfs_db": {
"host": "vti-oecloud-test-shard-00-00-qoacp.mongodb.net",
"port": 27017,
"url": "mongodb://vti-oecloud-test-shard-00-00-qoacp.mongodb.net:27017,vti-oecloud-test-shard-00-01-qoacp.mongodb.net:27017,vti-oecloud-test-shard-00-02-qoacp.mongodb.net:27017/test?ssl=true&replicaSet=vti-oecloud-test-shard-0&authSource=admin&retryWrites=true",
"database": "atlas-gridfs_db",
"user": "<username>",
"password": "<password>",
"name": "gridfs_db",
"connector": "loopback-component-storage-mongo"
}
}```
Can you mention the version of mongodb that got downloaded on npm install...it must be in your package-lock.json file.
It was originally mongodb 2.2.22 and mongodb-core 2.1.7
I tried upgrading it to latest mongodb 3.1.4 and mongodb-core 3.1.3 still throwing the same error