Skip to content
This repository has been archived by the owner on Jul 5, 2023. It is now read-only.

Cant access MongoLab Instances #74

Closed
SeriousM opened this issue Jan 22, 2013 · 6 comments
Closed

Cant access MongoLab Instances #74

SeriousM opened this issue Jan 22, 2013 · 6 comments
Labels

Comments

@SeriousM
Copy link

Hi,

I try to access my MongoDB Instances with Genghis but without success :(

Used Versions:

  • Genghis 2.1.6
  • Mongo 1.7.1
  • Ruby 1.9.3
  • Rails 3.2.11

Used Connection Info (modified):

but everything works fine with my local instance.

Thanks for this cool gem :)!

@bobthecow
Copy link
Owner

I think this might be another instance of the same issue as #69 ... it looks like Genghis doesn't always deal well with non-admin user accounts, which most of the hosted services use.

I believe there are some fixes for it in develop. At the very least, it now surfaces more server error messages, so it'll be easier to debug. Do you mind installing v2.2.0-beta.1 and trying it out?

gem install genghisapp --pre

Thanks!

@SeriousM
Copy link
Author

Thanks for the reply, here are my results:

  • test:test@ds045xx7.mongolab.com:45007
  • * Connection error: Failed to connect to a master node at ds045xx7.mongolab.com:45007
  • test:test@ds045xx7.mongolab.com:45007/database_name
  • * Connection error: Failed to connect to a master node at ds045xx7.mongolab.com:45007

And thats the log output during the session:

 /c$ ruby /c/Ruby193/lib/ruby/gems/1.9.1/gems/genghisapp-2.2.0.beta.1/genghis.rb
== Sinatra/1.3.3 has taken the stage on 4567 for production with backup from Thin
>> Thin web server (v1.5.0 codename Knife)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop
safe is not a valid option for Mongo::MongoClient
[DEPRECATED] The 'safe' write concern option has been deprecated in favor of 'w'.
safe is not a valid option for Mongo::MongoClient
safe is not a valid option for Mongo::MongoClient
safe is not a valid option for Mongo::MongoClient
safe is not a valid option for Mongo::MongoClient

Does that helps you in any way?

Cheers!

@bobthecow
Copy link
Owner

That helps a ton. And wasn't what I was thinking at all.

I'll take a look :)

@bobthecow
Copy link
Owner

You're definitely running Genghis with v1.8 (or a dev release) of the mongo gem, since MongoClient didn't exist until then. You can verify this by dropping require 'mongo'; puts Mongo::VERSION in the first line of genghis.rb.

This, of course, raises two issues: (1) 10gen has a tendency to ship backwards compatibility breaks on point releases, and (2) I need to update Genghis to support v1.8 drivers :)

Do you mind checking out a local copy of the repo so you can use bundle exec to get the supported version of the gem? I get the feeling that this is not the error you were running into when you tried to connect to MongoLab before.

@SeriousM
Copy link
Author

I was using your code (branch develop) locally but only got the same errors as before. .... because the port was blocked....

but ok, that was my fault. i switched to an independent machine and did the same. this time i was able to add the server to the list but only with the database name in the connection string like test:test@ds045xx7.mongolab.com:45007/database_name.
after switching into the server i get the error Database command 'listDatabases' failed: (errmsg: 'need to login'; ok: '0.0').

does that help you?

@bobthecow
Copy link
Owner

Check the just-released v2.3.0… It should fix all problems when authenticating against a single db.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants