Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: Slash in host identifier #113

Open
CaptainN opened this issue Jun 21, 2018 · 6 comments
Open

Error: Slash in host identifier #113

CaptainN opened this issue Jun 21, 2018 · 6 comments

Comments

@CaptainN
Copy link

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:XXXXXXXXX@ds251240.mlab.com: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.

@CaptainN
Copy link
Author

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)

@AshHimself
Copy link

@CaptainN - not sure if this is your issue but I define the MONGO_URL before meteor-now

MONGO_URL=mongodb://user:pass@000000.mlab.com:13004/db meteor run --port 4000 --settings production.settings.json

@CaptainN
Copy link
Author

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.

@CaptainN
Copy link
Author

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?

@lmachens
Copy link
Contributor

This depends on your OS.
On Windows you have to escape special characters different than on Linux.

@jkrup
Copy link
Owner

jkrup commented Jun 21, 2018

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants