Skip to content

Does not support standard Mongo connection string #126

@satyavh

Description

@satyavh

The standard Mongo connection-string is described here:
https://docs.mongodb.com/manual/reference/connection-string/

However, if you pass a connection string to MONGO_URL of this format:
mongodb://user:pass@host:port,host:port/database?replicaSet=name

This will result in:

> [0] Error: double colon in host identifier
> [0]     at module.exports (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/url_parser.js:90:13)
> [0]     at connect (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongo_client.js:486:16)
> [0]     at Function.MongoClient.connect (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongo_client.js:250:3)
> [0]     at new MongoConnection (packages/mongo/mongo_driver.js:168:11)
> [0]     at new MongoInternals.RemoteCollectionDriver (packages/mongo/remote_collection_driver.js:4:16)
> [0]     at Object.<anonymous> (packages/mongo/remote_collection_driver.js:38:10)
> [0]     at Object.defaultRemoteCollectionDriver (packages/underscore.js:784:19)
> [0]     at new AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
> [0]     at new AccountsServer (packages/accounts-base/accounts_server.js:18:5)

This refers to the host:port,host:port part of the above connection string

You can try this out by creating a mlab.com replica set and use the provided connecting-string. It will not work. As such this package currently does not work with mLab.

FYI:
the exact same connection string works fine with Meteor-up and Galaxy. I wanted to try this package out because I love Now.sh, but unfortunately I got stuck here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions