-
Notifications
You must be signed in to change notification settings - Fork 973
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
MongoDB issues when hosting externally #124
Comments
Mongoskin is not helping with the issue either, since it's not even maintained anymore. Even defining replica sets separately in the config result in: |
In most cases this should not be an issue, because Countly provides mongoskin version which has older mongodb driver with it and you should be able to connect to same mongodb by using older url scheme (without mongodb:// protocol), which should look like this:
Have a test server set up which works with Mongodb 2.6.6 But it most probably won't work with multiple hosts The other option is to upgrade mongoskin to higher than 1.3.20 (I think the latest one is 1.4.4) that will also upgrade mongodb driver and ability to use new connections urls. I'm now testing on test server and it seems to be working ok, only changes needed to be made is using new url scheme in both countly configs:
And only difference seems to be that SkinClass does not have ObjectID method, so need to add little hack to /api/utils/common.js after
and in /frontend/express/app.js after
So far it seems to be working and we could switch to new driver in new release |
Thank you for the testing and the patches! I'm very much looking forward to proper multi-host connection string support, and I'm sure that a lot of others are as well. |
Hmm, but using replSets also seem to work, if you do not use db name in each server like:
|
That's what I tried in the second comment, but I additionally had to add a username & password. I tried setting the database name with the URL and without it in the URL but in the db variable instead, neither worked and produced the warning in comment number 2. |
I'm trying to use Compose.io again as the DB host. What roles does Countly require from the database user? assertion 13 not authorized for query on countly.members ns:countly.members query:{ api_key: "" } |
Yeah, it's not a permission issue, it's an issue with Countly/MongoDB driver. |
New MongoDB driver (including new connection string format) is used in b657d76 |
Essentially, the MongoDB connector that Countly uses is incompatible with certain MongoDB hosting providers, compose.io in my case.
What ends up happening is that the following connection URLs do not work: mongodb://foo:[email protected]:39530,d2.mongolab.com:39530/helloworld
More on the issue itself here: pilwon/ultimate-seed#128
The text was updated successfully, but these errors were encountered: