-
Notifications
You must be signed in to change notification settings - Fork 109
Unable to connect to MongoDB instance in MongoHQ hosting #42
Comments
Hi, I use a MongoLab account to test secured access to remote Mongo server and it works fine. Cheers, David |
This trace might also help you:
It looks to me that in your connectAndReturnServerVersion you are requesting something for which a normal user of this cloud service do not have authorization. It might be enough controlling that exception. If I have a time I'll have a look to your source code Cheers, |
Hi, actually, I look for the server version.
Indeed, the aggregation feature is only available from mongo 2.2. In that case, aggregation query panel is displayed instead of a simple query panel. However the mongo terminal only uses the executable defined in your path and all parameters are passed in the command line according to the man documentation. So, I think you may have an authentication issue with your remote mongo server. Cheers, David |
Hi, Sorry for the last response. There is a bug when you want to use the console. It does not pass the database parameter. Here below the behavior: |
Hi, A snapshot is available on the home page of the project and fix the above bug found whenever you want to use the console. I am not sure if it fixes the pb you described at the begining of this conversation. Tell me if you have more info about it. Regards, David |
Still no luck. This is the only MongoDB client that I cannot use to connect to my DB instance in MongoHQ. I connect with MongoVUE with no issues whatsoever:
|
Hi Alex, I see a kind of IP address in the mongo URL : alex.mongohq.com/ 23.22.16.107 :10029 I am not sure to understand this. Do you have any info about it? Thanks, David |
I've tried to use the new snapshot but the problem with default connection to "test" database still occur. I think the problem is in the org.codinjutsu.tools.mongo.logic.MongoManager. The "createMongoClient" should get the third parameter i.e. "String userDatabase" and the "textURI" variable inside that method should take into account this parameter: String textURI = String.format("mongodb://%s:%s%s", serverName, serverPort, Any "createMongoClient" call should be also updated. |
Hi, Thanks for reporting that. Actually, MongoLab allows to connect to your account without specifiying the database. So I did in that way and make the authentication to the user database after. I suppose MongoHQ only allows full mongo URI. I will update the code. A snapshot should be available in a couple of hours. Regards, David |
Hi, Please download the latest snapshot and tell me if it works. Regards, David |
Unfortunately the problem seems to be deeper. I still have the same "unauthorised" exception: Error when accessing Mongo server: command failed [$eval]: { "serverUsed" : "localhost/127.0.0.1:27017" , "ok" : 0.0 , "errmsg" : "unauthorized"} On the MongoDB side I've got: Wed Jun 12 13:46:00.664 [initandlisten] connection accepted from 127.0.0.1:49703 #28 (1 connection now open) |
Hi,
I read Bad database name (BadValue) Any idea of that? David |
A snapshot is available. Please tell me if it is ok before I officially release 0.4.3 |
I think it's OK. The new snapshot works well with my IntelliJ IDEA 12.1.4. |
I forgot to reply to this. It works fine now with the latest version. Thanks so much. |
The error I am getting varies depending whether I try to test the connection, where I get this error message:
10:10:05 PM CommandFailure: Error when accessing Mongo server: command failed [$eval]: { "serverUsed" : "alex.mongohq.com/23.22.16.107:10040" , "ok" : 0.0 , "errmsg" : "unauthorized"}
or if I am trying to open the console, where I get this other error message:
connecting to: alex.mongohq.com:10040/test
exception: login failed
Wed May 22 22:14:14.907 JavaScript execution failed: Error: 18 { ok: 0.0, errmsg: "auth fails" } at src/mongo/shell/db.js:L228
why is trying to use the test db name? I can assure you the username and password is correct, so I don't understand that error message. On the other hand I am able to connect using the mongo command line client without any issue.
Cheers,
Angel.
The text was updated successfully, but these errors were encountered: