New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant access MongoLab Instances #74

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

Comments

Projects
None yet
2 participants
@SeriousM

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Jan 22, 2013

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!

Owner

bobthecow commented Jan 22, 2013

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

This comment has been minimized.

Show comment
Hide comment
@SeriousM

SeriousM Jan 23, 2013

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!

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Jan 23, 2013

Owner

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

I'll take a look :)

Owner

bobthecow commented Jan 23, 2013

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

I'll take a look :)

@bobthecow

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Jan 23, 2013

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.

Owner

bobthecow commented Jan 23, 2013

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

This comment has been minimized.

Show comment
Hide comment
@SeriousM

SeriousM Jan 25, 2013

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?

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

This comment has been minimized.

Show comment
Hide comment
@bobthecow

bobthecow Mar 25, 2013

Owner

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

Owner

bobthecow commented Mar 25, 2013

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment