Skip to content
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
Closed

Cant access MongoLab Instances #74

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

Comments

@SeriousM
Copy link

@SeriousM SeriousM commented Jan 22, 2013

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

@bobthecow 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
Copy link
Author

@SeriousM SeriousM commented 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!

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Jan 23, 2013

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

I'll take a look :)

@bobthecow
Copy link
Owner

@bobthecow 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
Copy link
Author

@SeriousM SeriousM commented 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?

bobthecow added a commit that referenced this issue Jan 28, 2013
See #74 which is somewhat related.
@bobthecow bobthecow closed this in 2034abb Mar 25, 2013
@bobthecow
Copy link
Owner

@bobthecow 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.