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

Can't connect to tunneled database #69

Closed
tmaiaroto opened this issue Dec 18, 2012 · 11 comments
Closed

Can't connect to tunneled database #69

tmaiaroto opened this issue Dec 18, 2012 · 11 comments
Labels
bug

Comments

@tmaiaroto
Copy link

@tmaiaroto tmaiaroto commented Dec 18, 2012

I'm trying to use CloudFoundry or AppFog. So I tunnel into the database and it works fine from the shell in my terminal...It works fine from MongoHub on OS X (TERRIBLE app that crashes constantly) but it doesn't seem to work with Genghis.

I entered in the server with the format user:pass@localhost:10000 (which is the port in this case).

In this case, the username and password are both quite long. I'm not sure if that matters.

Is there a timeout setting maybe? It does need to connect to a remote server...

You should be able to easily reproduce this if you use AppFog or CloudFoundry and setup a database and then tunnel in. Both are free services. It will take a few commands to install their software and bring up a MongoDB service and then tunnel to it, but there's documentation on how to do that. It'll take just a few minutes, more here: https://docs.appfog.com/services/tunneling

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Dec 18, 2012

Can you be more specific about what's failing for you?

  • Which Genghis implementation (ruby or php)?
  • What Genghis version?
  • What Mongo driver version?
  • Where is it failing? E.g. does it add the server, or do you get an error in the servers list? If it adds the server, what happens when you click on it? Big red screen, or hanging?
  • Please provide as many details as possible :)
@tmaiaroto
Copy link
Author

@tmaiaroto tmaiaroto commented Dec 18, 2012

Genghis for PHP version 2.1.6.
Not sure the Mongo driver version (but my machine has the latest from PECL). The database is version 1.8.
Fails to connect.

When I first add it to the list it adds but then can't get the size.
When I go to it the loading graphic just sits there.
Go back to the front page, loading for a while (I guess timing out) and has a red error tag for the database.
With a tipsy box that saying unable to connect.

-- Correction, my PHP Mongo driver is a version behind (maybe two), they just released a new one.

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Dec 18, 2012

But it's 1.3.x, right?

@tmaiaroto
Copy link
Author

@tmaiaroto tmaiaroto commented Dec 18, 2012

Actually, I guess its older. 1.2.11 ... I'm upgrading now.... 1.31. now. Still doesn't make a difference.

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Dec 19, 2012

Sorry I've been a bit unresponsive. Every combination of PHP and Mongo driver versions on my system is segfaulting right now, so it's a bit hard for me to debug :)

If you open webkit inspector or firebug network tab while adding the server, you will most likely get a 500 response — or spew of backtrace instead of JSON, which Genghis doesn't always surface in a useful way. Mind taking a look to see if that says anything?

@tmaiaroto
Copy link
Author

@tmaiaroto tmaiaroto commented Dec 19, 2012

You've been plenty responsive. Thanks for looking into this. I really appreciate it.
All I get back is this:

POST http://mongo.dev.local/servers 502 (Bad Gateway) script.js:12
send script.js:12
v.extend.ajax script.js:12
i.sync script.js:14
s.extend.save script.js:13
s.extend.create script.js:14
Genghis.Views.BaseSection.Backbone.View.extend.submitAddForm script.js:18
v.event.dispatch script.js:11
o.handle.u

...And after that, just a loading graphic forever (seemingly, I'll leave the tab open, but I'm sure by now it is).

@xiy
Copy link

@xiy xiy commented Dec 20, 2012

Also getting this on my Heroku instance via MongoHub, which I'm guessing requires SSH tunnelling. I get a 500 response back:

{"error":"Database command 'listDatabases' failed: (errmsg: 'need to login'; ok: '0.0').","status":500}
@tmaiaroto
Copy link
Author

@tmaiaroto tmaiaroto commented Dec 20, 2012

Yea, that's part of why I don't use MongoHub (and started using Genghis). MongoHub crashes constantly. You can ignore that error and click the database name and actually see things...However, as with any connection to any database with MongoHub, if you actually use it and have a few windows open and make a few queries...You'll eventually get some assertion errors and socket errors and then it'll crash. MongoHub is the biggest piece of junk out there. Use Genghis, it's worlds better.

As for things I'm tunneled into (like CloudFoundry, AppFog, etc.) I'm just using the terminal :/

@iclanzan
Copy link

@iclanzan iclanzan commented Mar 8, 2013

Any updates on this? I too am unable to connect to the MongoDB instance on AppFog, while MongoHub has no problem connecting. I would prefer using Genghis over MongoHub though.

@bobthecow
Copy link
Owner

@bobthecow bobthecow commented Mar 8, 2013

Sorry, no fix for this yet, but it is my highest priority bug so it's slated for the next release—assuming I can actually fix it, of course. Thanks for your patience.

@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
4 participants
You can’t perform that action at this time.