The connection opens successfully (with authentication). The Database and the collection are displayed. But if I open any shell I got this error:
Connection error. Uninitialized mongo scope.
The connection with the Mongo.exe and Java-Driver works fine. What does the error message mean? How to fix that?
I just removed the special character from the password and works now.
It seems to be a bug in RoboMongo; if the password contains an apostrophe, then you can connect OK but you get this error when you try to run a query.
I have logged it as an issue with the RoboMongo team: https://github.com/paralect/robomongo/issues/1300
Note: no other characters seem to cause this problem, only the apostrophe.
None of the above solutions work if you have recently upgraded to Robo 3T v1.3 and trying to connect to an older MongoDB version like <3.0. Apparently, Robo 3T removed some of the support for older versions and you get the same "Uninitialized mongo scope" error. Reverting to Robo 3T v1.2 is the only solution to this one.
This is not error message you need to reauthenticate( Remove connection and add new Connection) database connection.
Once you reauthenticate and connect with the database. All will work fine.
Related
hey there I don't know why the server refuse to connect to mongo local host and the same problem also for robomongo =[. I was looking for the same error in this site and others but no answer is relevant...I thought it might happened because robomongo is also running and I uninstalled it but...it didn't solve it...I'm using windows 10. tried to do from mongo's directory mongod.exe and it didn't work than mongo.exe but also didn't work...can someone help me?
run the MongoDB you need to open another command prompt and use the following command. “C:\Experiments\MongoDB\MongoDbServer\bin>mongo”. It will show the version of MongoDb and connected database, By default it is test. Other window will show one connection is open.
Read this Article
I'm using robomongo tool to access mongodb. When I connect into my db then
Show error details
How to fix it?
I had the same issue and was able to fix it by removing the full url (for example: mongodb://myuser:mypassword#mongodb-test.mydomain.com/my_database) in the connection tab and only putting in the mongodb server url: mongodb-test.mydomain.com.
Next, in the Authentication tab, I checked the Perform authentication checkbox, specified the Database, user name, password.
I also added the database in the Advanded tab just in case and I can now connect without error.
Try inserting only e.g: ds12345.mlab.com at address bar instead of full [http:// mongodb://<dbuser>:<dbpassword>#...] and create user to authenticate in mlab.com and then try connect to it. Something like this:
And then:
Whilst this answer is only partly related to the problem, I want to describe the solution in here.
I had this problem when trying to connect via Robo3T to a cluster of MongoDBs hosted on Atlas. They offer a connection string with the protocol in front (e.g. mongodb+srv://<USER>:<PASSWORD>#database-mongodb.net/admin). This was a combination of two problems:
Robo3T does not like the protocol mongodb+srv:// in the URI. You should use only the second part (after the #). Like: database-mongodb.net.
Robo3T does not like shards. At least I could not get to connect with it via that connection string. Fro what I understand, you need that protocol to connect to a shard. Since you can't use that kind of URI, you will need to connect directly to the primary shard. To do that, you need to build a new connection string with the URI of the primary shard. Like this: database-shard-00-00-vemhh.mongodb.net and provide the port to Robo3T. Also, you need to connect via SSL, if you're using MongoDB Atlas (a self-signed certificate configured directly in Robo3T worked for me).
Remove only [http://] worked for me
Get the newer version of the Robo3T client...it can import it automatically from +srv link
I was facing the same problem, but I can solve it by installing Robo 3T 1.3 and import connection details from MongoDB SRV connection string. See this:
Steps to connect remote DB from Robo 3T 1.3
Remember to replace the user in the connection string and the pass at Authentication Tab
The connection string in the picture is dummy by the way
I am in the process of migrating my app from Parse to MongoDB and IBM Bluemix, however I can't seem to reach the server when attempting the migration of data from Parse.
I've been following this tutorial tutorial, and I am currently on the step: Migrating data from Parse.com to your MongoDB instance
I am currently getting this error: No reachable servers when clicking 'Begin the migration'.
These are the connection strings in compose:
And I have tried entering various strings. I assumed this would work:
mongodb://username:password#aws-us-east-1-portal.7.dblayer.com:10803/mtcdatabase
But I get the same error. Obviously I'm changing username and password to my own credentials.
Anyone have any suggestions?
The issue ended up being that I was using the latest version of MongoDB, however Parse doesn't seem to support it. Therefore, I had to use MongoDB Classic version 3.0. Everything works great now.
I'm getting this error when I try to connect to my mongolab DB.
I saw some different topics talking about this issue, but solutions they gave was:
-Add mongoDB exception in my firewall. I done it without result
-Check if I was using the mongolab.com user and password instead of the user database. That's not the problem, even I created new users.
-Check if my version of mongoDB was older than the version used by mongolab (3.x). I also specified the auth system in the command to be sure.
I tried all those answers without success. I also checked the connection with the server, and it neither was the problem. I'm going crazy.
What could be the issue?
Thanks for your attention!
It was finally a network problem. I was lucky to discover it, cause I lost many hours.
I have a Mongo server running on an Ubuntu box, and I am trying to connect to it with pymongo using the usual syntax:
from pymongo import Connection
c = Connection('db.example.com', 27017)
This works just fine on a recent-model Intel mac (OS 10.6). However, the same code on an older G5 tower (10.5) throws this error:
pymongo.errors.AutoReconnect: [Errno 54] Connection reset by peer
The mongo output on the server reports:
connection accepted from oldmac.example:57681 #3
bad recv() len: 973078528
end connection oldmac.example:57681
I know that I cannot run the mongodb server from the PPC Mac, but it seems odd that I wouldn't be able to connect to the remote database. Or is something else at fault?
Looks like Mike Dirolf already answered your question in the MongoDB Google Group. But for people experiencing the same issue and find themselves on this page, the solution from Mike Dirolf:
Are you using the C extension? (try
pymongo.has_c()). I wouldn't think
that the C extension would even build
on PPC but if it did that is almost
certainly the reason this isn't
working. You can install w/o C with
python setup.py install --no_ext and
then I'd expect things to work.
-- Mike Dirolf
I was able to solve this same issue by using MongoClient instead of the deprecated Connection.
From the Python driver for MongoDB page
Warning DEPRECATED: Connection is deprecated. Please use MongoClient
instead.
For more information, see the new MongoClient documentation for Python.
I was facing the same issue with python3.8, i tried to upgrade and downgrade the pymongo but the result was same Connection reset by peer.
To overcome this problem uninstall the python3.8 and install python3.7 and it work fine. Now i am able to connect to the mongodb and able to perform query.