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: double colon in host identifier] #1002

Closed
3 tasks done
okaris opened this issue Mar 12, 2016 · 8 comments
Closed
3 tasks done

[Error: double colon in host identifier] #1002

okaris opened this issue Mar 12, 2016 · 8 comments

Comments

@okaris
Copy link

okaris commented Mar 12, 2016

Make sure these boxes are checked before submitting your issue -- thanks for reporting issues back to Parse Server!

Environment Setup

parse-server-example 2.1.4 running on Heroku
database running on mLab shared cluster

Steps to reproduce

MONGOLAB_URI : mongodb://:@ds059645-a0.mongolab.com:59645,ds059645-a1.mongolab.com:59645/?replicaSet=rs-ds059645

#855
@gfosco

Logs/Trace

2016-03-12T17:21:07.174007+00:00 heroku[web.1]: Starting process with commandnpm start 2016-03-12T17:21:08.712950+00:00 app[web.1]: 2016-03-12T17:21:08.712960+00:00 app[web.1]: > parse-server-example@1.2.0 start /app 2016-03-12T17:21:08.712961+00:00 app[web.1]: > node index.js 2016-03-12T17:21:08.712961+00:00 app[web.1]: 2016-03-12T17:21:10.105043+00:00 app[web.1]: parse-server-example running on port 27750. 2016-03-12T17:21:10.573179+00:00 heroku[web.1]: State changed from starting to up 2016-03-12T17:21:26.759620+00:00 app[web.1]: [Error: double colon in host identifier] 2016-03-12T17:21:56.747283+00:00 heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/parse/classes/Waves" host=coralline.herokuapp.com request_id=d94cfa43-8644-4d30-a684-71fdef946cc8 fwd="178.240.162.250" dyno=web.1 connect=1ms service=30205ms status=503 bytes=0

@flovilmart
Copy link
Contributor

It seems that you have 2 servers specified in your MONGOLAB_URI, is that one purpose?

@okaris
Copy link
Author

okaris commented Mar 12, 2016

@flovilmart Yes it's a replica set on mLab. I took the connection string directly form them. I also tried using only one of the database url's, but I still have the same problem. If you check out the issue i referred there is a bug in the mongo driver actually but it is strange that no one else is having the same problem.

@flovilmart
Copy link
Contributor

can you test on that branch about to be merged? #986

@okaris
Copy link
Author

okaris commented Mar 12, 2016

I'm not sure how I can use that branch on parse-server since the driver is added as an npm dependency. If you can point me in a direction of how to, I'd be glad.

@flovilmart
Copy link
Contributor

if this is a mongo driver problem, please post the issue to the mongo people :)

@okaris
Copy link
Author

okaris commented Mar 13, 2016

@flovilmart I tried to use that branch you offered by changing the dependency in parse-server-example package.json to
"parse-server": "git+https://github.com/ParsePlatform/parse-server.git#mongo-uri-encode-auth"

All I get is
Error: Cannot find module 'parse-server'

Can you help me build with that branch please?

@okaris
Copy link
Author

okaris commented Mar 14, 2016

The branch at #986 seems to help. It appears that mongo driver can't parse a password with a column ',' in it. This branch seems to fix it or another option is to avoid '@,:' in your database username or password.

Also mongo driver doesn't accept replica set connection strings obtained from mLab. The connection string needs to have only one database url in it.

This issue and related issue #855 can be closed now.

@gfosco gfosco closed this as completed Mar 15, 2016
@kartheeknagasuri
Copy link

hello, i am still facing this issue, any suggestions?

my DB connection string is

mongodb://username:password@7163360509808/iad2-c5-1.mongo.objectrocket.com:port/preprod

at new Promise (/var/app/current/node_modules/parse-server/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:191:7)
at Function.MongoClient.connect (/var/app/current/node_modules/parse-server/node_modules/mongodb/lib/mongo_client.js:104:12)
at MongoStorageAdapter.connect (/var/app/current/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:128:44)
at MongoStorageAdapter._schemaCollection (/var/app/current/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:163:19)
at MongoStorageAdapter.getAllClasses (/var/app/current/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:312:19)
at /var/app/current/node_modules/parse-server/lib/Controllers/SchemaController.js:354:34
at run (/var/app/current/node_modules/parse-server/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:87:22)
ESC[33mwarnESC[39m: Unable to ensure uniqueness for user email addresses: Error: double colon in host identifier
at module.exports (/var/app/current/node_modules/parse-server/node_modules/mongodb/lib/url_parser.js:91:13)
at connect (/var/app/current/node_modules/parse-server/node_modules/mongodb/lib/mongo_client.js:266:16)
at /var/app/current/node_modules/parse-server/node_modules/mongodb/lib/mongo_client.js:105:7
at new Promise (/var/app/current/node_modules/parse-server/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:191:7)
at Function.MongoClient.connect (/var/app/current/node_modules/parse-server/node_modules/mongodb/lib/mongo_client.js:104:12)
at MongoStorageAdapter.connect (/var/app/current/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:128:44)
at MongoStorageAdapter._schemaCollection (/var/app/current/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:163:19)
at MongoStorageAdapter.getAllClasses (/var/app/current/node_modules/parse-server/lib/Adapters/Storage/Mongo/MongoStorageAdapter.js:312:19)
at /var/app/current/node_modules/parse-server/lib/Controllers/SchemaController.js:354:34
at run (/var/app/current/node_modules/parse-server/node_modules/babel-polyfill/node_modules/core-js/modules/es6.promise.js:87:22)
parse-server-example running on port 8081.

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