meteor-now
meteor-now copied to clipboard
Error: Slash in host identifier
Describe the bug I can't seem to get passed this error, even though I'm certain I've got all the deployment values set correctly. Is there a limit on having a slash after the user:pass@ part of the MONGO_URL?
To Reproduce I'm trying to deploy with this command:
meteor-now -e ROOT_URL=https://pixstori.npdev.io -e MONGO_URL=mongodb://pixstori:[email protected]:51240/pixstori-staging -e NODE_ENV=production
Expected behavior It seems like it should work... In fact, I'm pretty sure I had gotten it to work once before.
I also tried it quoted, no change
> [0] Error: Slash in host identifier
> [0] at parseConnectionString (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/url_parser.js:219:15)
> [0] at parseHandler (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/url_parser.js:129:14)
> [0] at module.exports (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/url_parser.js:25:12)
> [0] at connect (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongo_client.js:878:3)
> [0] at connectOp (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongo_client.js:268:3)
> [0] at executeOperation (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/utils.js:420:24)
> [0] at MongoClient.connect (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongo_client.js:259:10)
> [0] at Function.MongoClient.connect (/usr/src/app/bundle/programs/server/npm/node_modules/meteor/npm-mongo/node_modules/mongodb/lib/mongo_client.js:480:22)
> [0] at new MongoConnection (packages/mongo/mongo_driver.js:169:11)
> [0] throw(ex);
> [0] ^
> [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 Collection (packages/mongo/collection.js:97:40)
> [0] at new AccountsCommon (packages/accounts-base/accounts_common.js:23:18)
> [0] at new AccountsServer (packages/accounts-base/accounts_server.js:18:5)
> [0] at server_main.js (packages/accounts-base/server_main.js:9:12)
@CaptainN - not sure if this is your issue but I define the MONGO_URL before meteor-now
MONGO_URL=mongodb://user:[email protected]:13004/db meteor run --port 4000 --settings production.settings.json
It's a problem after deploying, I think. I'm defining it using the -e (environment) switch as described in the docs. Starting the app local is no problem, I just can't get it to work for deployment.
Okay, the problem was that I had a $ in my password. Is there a way to detect that and kick up a better error message?
This depends on your OS. On Windows you have to escape special characters different than on Linux.
@CaptainN Unfortunately I think the $ causing an issue is a local issue from which terminal application you use bash/fish/sh. In the README perhaps we can more clearly recommend using secrets https://github.com/jkrup/meteor-now#using-meteor_settings