Azure DocumentDB and Meteor Accounts - mongodb

My Meteor app is connected to a DocumentDB database, I try to create a Meteor Accounts using Accounts.createUser({}) , but I can't login to the user because I have been logged out automatically. and the resume.TokenLogin are not removed from the database.
I try to compare that behavior with the local MongoDB one, I found that in local MongoDB some collections are created: users,
meteor_accounts_loginServiceConfiguration and system.indexes but in the docuementDB just users and meteor_accounts_loginServiceConfiguration are created.
I don't khnow if the problem is related with the collection system.indexes or if I need to add somethings to not been logged out automatically after each authentification !

Related

how to export current app users from mongo realm application?

My question is a simple query regarding mongo realm application. How can we export the current app users from mongo realm application.
I am trying to clone an existing mongo realm application
I have successfully exported the mongo atlas db dump as well as the mongo realm application
I have successfully created new mongo realm application and imported all the previous existing setup
I am able to see the users collection in my mongo altas collection but when trying to login with there cred it shows user not exists
Please also note I am using default authentication i.e., "Email/Password"

Clone mongoDB collections

I have different servers with mongoDB in it.
What is the best way to clone one collection from one server to another ?
I did use mongodump (using Studio 3T) and create a BSON archive of the collection I want to copy on the another server.
To do so I did log in as admin of the mongoDB server to copy and created the BSON archive.
Then I did login in the other server as admin as well and tried to import the BSON archive but is always end up with : error reading database: not authorized on to execute command.
I did add the admin credential of the first server on the second server as well and logged in with the same credentials.
What would be the correct way to clone/duplicate a collection from one server to another ?
Thanks
I was finally able to clone a db between two servers. Had to play with some user roles, granting roles before not assigned to the user from who created the system. So at least this is solved, now I'm working to actually be able to use the cloned db. Thanks

Mongodbd login with Mongoose to new database

I use mongoDB in Atlas cloud but now I want to movie to a local database. I installed MongoDB and created a admin user. Now I connect with mongoose to :
mongodb://login:pass#db.myserver.com:27017/admin
Works well. Now I create a new development database "develop".
I try to connect
mongodb://login:pass#db.myserver.com:27017/develop
This failed to login. OK, I understand that the admin database is the "/admin" one and that user is authenticated to this database but I thought that an admin can access all databases in a mongodb server?
In Atlas I just created the develop database and connected to it without any problem.
How I can well connect with mongoose to the new develop database? Do I need to create a second admin for this database?
Ok, I found out that I have to name the auth database in my connection string.
mongodb://login:pass#db.myserver.com:27017/develop?authSource=admin

not able to connect to mongodb because of unauthorized lock type

I am trying to connect to my mongodb deployed in jelastic cloud
If i try to use the test database already provided in the mongodb node in jelastic..it works fine.But if i create my own database and try to access the collections created in it ..i get the following exception
com.mongodb.MongoException: unauthorized db:appdb lock type:-1 client:192.168.1.53
Why is this happening?how can i resolve it?
I am reading the configuration from a file mydb.cfg
host=mongodb-***.jelastic.servint.net
dbname=appdb
user=admin
password=*****
When in Rock Mongo web interface pick the targeted db and go for 'More' in config panel.
This has to show you the list of users having rights for DB.
Did you set the user and rights for your custom collection?
Try to check the configuration under 'Authentication' section?
Anyway, supposedly admin user should have rights to all DBs. You can try to figure this issue out at Jelastic community
I had the same issue when connection to mongodb custom named database.
In order to succeed with the connection, I have created an user for my custom named database.
(I added the provided admin user with its password to the authorized users as the image shown).

Connect to Mongo DB on MongoLab without Authorization?

My Question:
Is there any way to connect to Mongo DB (hosted on MongoLab) without username and password ?
My Case:
I have created a free MongoLab account (https://mongolab.com) and also create new database -> collection -> document in it.
When I connect to Mongo DB (on Mongo Lab) without username and password, I was able to connect, but when I try to retrieve any data it gives me "unauthorized db:testing lock type:-1 client:...." error.
So I have created a DB User in MongLab as well and provide username and password at the time of connection. After that I am able to connect and retrieve data from Mongo DB.
MongoLab's multi-tenant database plans are on shared servers. We cannot give you the choice to forgo authentication. Even if you were ok with others seeing you data, the other tenants on the server you share would still not want you to see their data.
We have dedicated server plans where you have your own server. On those we could turn off authentication for you. Email us at support#mongolab.com.
As for your benchmarks - auth will not slow things down. The drivers do not authentication on each request, just each connection. If you use the driver properly it should all work well.
-will (MongoLab)