Skip to content

Connect to MongoDB atlas #14

@prasgema

Description

@prasgema

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:

  1. 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.
  2. 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 my datasource.json file:
{
  "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"
  }
}```


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions