MongoLab MongoDB login failed error - mongodb

I'm getting this error when trying to login to MongoLab database via command line in Ubuntu
> 2015-07-02T13:44:05.682-0400 I NETWORK DBClientCursor::init call() failed
>2015-07-02T13:44:05.694-0400 E QUERY Error: error doing query: failed
at DBQuery._exec (src/mongo/shell/query.js:83:36)
at DBQuery.hasNext (src/mongo/shell/query.js:240:10)
at DBCollection.findOne (src/mongo/shell/collection.js:187:19)
at DB.runCommand (src/mongo/shell/db.js:58:41)
at DB.isMaster (src/mongo/shell/db.js:680:51)
at DB._getDefaultAuthenticationMechanism (src/mongo/shell/db.js:1227:27)
at DB._authOrThrow (src/mongo/shell/db.js:1252:33)
at (auth):6:8
at (auth):7:2 at src/mongo/shell/query.js:83
exception: login failed

Double-check that your client supports the version of MongoDB your server is running. If you're using one of our experimental databases, they were recently upgraded to MongoDB version 3.0 an its new SCRAM-SHA-1 authentication mechanism. Connecting to these databases now requires the 3.0 Mongo shell or a driver that supports SCRAM-SHA-1.
http://docs.mongodb.org/manual/release-notes/3.0-scram/#upgrade-drivers
If you have any questions, feel free to contact us at support#mongolab.com and we'd be happy to help.
Regards,
Jared

Related

Query failed with error code 59 and error message 'command not found' on MongoDB Cluster

I have a MongoDB cluster running MongoDB 3.4.14 in MongoDB Atlas. My application is successfully connected with this cluster and can read and write. I can connect with the shell to this cluster also.
When I try to connect with Studio3t (Version 2018.2.5) everything works fine as well. But when I try to view an available collection I get the following error:
Failed to retrieve documents
[somedatabase.somecollection#SomeCluster [replica set]] Database error!
Stacktrace:
|_/ java.lang.Exception: [somedatabase.somecollection#SomeCluster [replica
set]] Database error!
|____/ Mongo Server error (MongoQueryException): Query failed with error code 59 and error message 'command not found' on server cluster0-shard-00-00-*****.mongodb.net:27017
I'm not sure if this is a problem with the cluster configuration or with Studio3t itself.
If I can provide you with more information that would help to solve the problem just let me know.

Assertion failure _setName.size on URI auth

I tried to much posibilities that I found searching for this error without success.
I can connect to my mongo with the CLI typing mongo --port myPort -u myUser ...
But I need to connect my app (in the same host) by URI.
This is what I get:
mongo mongodb://username:password#localhost:myPort/myDb
MongoDB shell version: 2.6.10
connecting to: mongodb://username:password#localhost:myPort/myDb
2017-05-19T23:34:33.568+0200 Assertion failure _setName.size() src/mongo/client/dbclientinterface.h 231
2017-05-19T23:34:33.569+0200 0x6b75c9 0x659e9f 0x636a32 0x5013b8 0x4fa7f1 0x6006fd 0x5eb869 0x7fdcdff35d76 0x1ebf47506362
mongo(_ZN5mongo15printStackTraceERSo+0x39) [0x6b75c9]
mongo(_ZN5mongo10logContextEPKc+0x21f) [0x659e9f]
mongo(_ZN5mongo12verifyFailedEPKcS1_j+0x142) [0x636a32]
mongo(_ZN5mongo16ConnectionStringC1ENS0_14ConnectionTypeERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES9_+0x208) [0x5013b8]
mongo(_ZN5mongo16ConnectionString5parseERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERS6_+0x201) [0x4fa7f1]
mongo(_ZN5mongo17mongoConsExternalEPNS_7V8ScopeERKN2v89ArgumentsE+0x11d) [0x6006fd]
mongo(_ZN5mongo7V8Scope10v8CallbackERKN2v89ArgumentsE+0xa9) [0x5eb869]
/usr/lib/libv8.so.3.14.5(+0x99d76) [0x7fdcdff35d76]
[0x1ebf47506362]
2017-05-19T23:34:33.570+0200 Error: assertion src/mongo/client/dbclientinterface.h:231 at src/mongo/shell/mongo.js:148
exception: connect failed
Any idea? :\ Thanks
Solved upgrading mongod from 2.6 to 3.0.15
If you don't want to upgrade to a newer version of MongoDB you can also just drop the mongodb:// from the beginning. For example change:
mongo mongodb://username:password#localhost:myPort/myDb
to:
mongo username:password#localhost:myPort/myDb
Ref: https://jira.mongodb.org/browse/SERVER-15739?focusedCommentId=1000536&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1000536

parse server migration cannot connect to mongo

This is related to migration to parse server from api.parse.com.
On windows server, installed mongo db and nodeJS.
Installed Python.
Installed Parse Server.
Getting following error messages.
StyleChat is the name of the app.
http://localhost:1337/stylechat
parse-server-example running on port 1337. info: Parse LiveQuery
Server starts running warn: Unable to ensure uniqueness for usernames:
Error: read ECONNRESET
at exports._errnoException (util.js:1036:11)
at TCP.onread (net.js:564:26) warn: Unable to ensure uniqueness for user email addresses: Error: read ECONNRESET
at exports._errnoException (util.js:1036:11)
at TCP.onread (net.js:564:26) (node:252160) UnhandledPromiseRejectionWarning: Unhandled promise rejection
(rejection id: 4): MongoError: read ECONNRESET (node:252160)
UnhandledPromiseRej
if you run nodejs on window, you should use iisnode to run nodejs on iis.
i found this here
have fun.

Error in connecting to mongodb (mongodb-linux-x86_64-2.8.0-rc5) : auth failed, when starting nodejs appserver

I am new to mongodb, I am able to get my nodejs appserver started with mongodb 2.4 and 2.6. I have a requirement to test the latest mongodb, which is 2.8 with our app. I am able to start the mongodb 2.8 but when I try to start my nodejs appserver, I get following error.
2015-01-16T18:43:51.115Z <warn> globals.js:45 () MONGO URI = mongodb://myuser:password#localhost:27017/test
2015-01-16T18:43:51.178Z <error> globals.js:45 () #### Error in connecting to mongodb
2015-01-16T18:43:51.180Z <error> globals.js:45 () { [MongoError: auth failed] name: 'MongoError', ok: 0, errmsg: 'auth failed', code: 18 }
2015-01-16T18:43:51.182Z <error> globals.js:45 () MongoError: auth failed
.........
Also, I have created myuser in the test db and authenticated it successfully. Please help, I have tried all possible ways and with no success. Thank you very much in advance. (my environment is Ubantu Linux 14.04, virtualbox) One more thing that I forgot to mention is that I am using wiredTiger storageEngine. I tried with MMAPv1 as well and same result.
I had the same issue. It worked for me on Mac, but on Linux I hit this failure until I upgraded module mongoose from 3.6.x to 3.8.x (3.8.25). That solved the problem for me. You might consider doing the same, at least to rule out this problem.

Error connecting meteor to external mongodb

I have a meteor web app that connects to a mongohq database. It's working correctly on heroku, but I can't get it to work on my localhost. It was working on localhost yesterday, but not today.
To be certain, I just ran a git clone in a new folder. Even this clone is throwing errors on localhost. Here's my terminal (FYI, I'm on a windows 8.1 machine that is running an Ubuntu virtual box; also, I've removed the username / password from the log, below):
adam#adam-VirtualBox:~/resSingleTestV2/faze1tables$ export MONGO_URL=mongodb://<username>:<password>#oceanic.mongohq.com:10033/test_db
adam#adam-VirtualBox:~/resSingleTestV2/faze1tables$ meteor
[[[[[ ~/resSingleTestV2/faze1tables ]]]]]
=> Started proxy.
=> Started your app.
=> App running at: http://localhost:3000/
I20140511-12:53:43.438(-4)? Exception in callback of async function: Error: failed to connect to [oceanic.mongohq.com:10033]
I20140511-12:53:43.637(-4)? at null.<anonymous> (/home/adam/.meteor/packages/mongo-livedata/0120179b5c/npm/node_modules/mongodb/lib/mongodb/connection/server.js:536:74)
I20140511-12:53:43.640(-4)? at EventEmitter.emit (events.js:106:17)
I20140511-12:53:43.641(-4)? at null.<anonymous> (/home/adam/.meteor/packages/mongo-livedata/0120179b5c/npm/node_modules/mongodb/lib/mongodb/connection/connection_pool.js:150:15)
I20140511-12:53:43.641(-4)? at EventEmitter.emit (events.js:98:17)
I20140511-12:53:43.643(-4)? at Socket.<anonymous> (/home/adam/.meteor/packages/mongo-livedata/0120179b5c/npm/node_modules/mongodb/lib/mongodb/connection/connection.js:516:10)
I20140511-12:53:43.643(-4)? at Socket.EventEmitter.emit (events.js:95:17)
I20140511-12:53:43.644(-4)? at net.js:440:14
I20140511-12:53:43.644(-4)? at process._tickCallback (node.js:415:13)
Any help appreciated. Thanks.
I'm connecting via my school's wifi. Turns out they must've done something to prevent me from connecting to mongoHQ because I'm able to connect via other networks.
Strange that it worked for a day or two and then stopped.