Connection breaks from Robomongo to myapp.meteor.com


#1

I wanna connect to myapp.meteor.com using robomongo. to get the connection details I do this:

meteor mongo --url myapp.meteor.com

and I get my uri. Connecting to the running app works just fine. However, the username and password are only valid for a minute and after that i loose the connection (obviously), due to authentification failure.

Any ideas on how I can maintain the connection?


#2

I thought the meteor mongo command was only for a local running instance, not a remote one.
Reference: http://docs.meteor.com/#/full/meteormongo


#3

it is for both. at least you can connect to the remote one on *.meteor.com using

meteor mongo myapp.meteor.com

see the help by running

thomas@Thomass-MacBook-Pro ~/> meteor help mongo

which gives

Usage: meteor mongo [--url] [site]

Opens a Mongo shell to view or manipulate collections.

If site is specified, this is the hosted Mongo database for the deployed Meteor site.

If no site is specified, this is the current project's local development database. In this case, the current working directory must be a Meteor project directory, and the Meteor application must already be running.

Instead of opening a shell, specifying --url (-U) will return a URL suitable for an external program to connect to the database. For remote databases on deployed applications, the URL is valid for one minute.

Options:
  --url, -U  return a Mongo database URL

see also here ( http://bit.ly/1MZiwkD ).


#4

Each Robomongo tab uses a different connection and sends a KeepAlive every minute.

Therefore, tabs that are opened within the first minute of the URL creation (while the credentials are valid) should be able to run additional queries.

The solution that I resort to is to open as many tabs as I think that I will require later on as soon as the connection is established and re-purpose them (write the desired query and execute it using Ctrl+Enter).


#5

thanks @alon, i’ll give it a try.


#6

I believe we should document it in docs too. Even simple as “Learn more about it using meteor help mongo.”


#7

I am unable to connect to an app hosted on meteor.com in robomongo. What settings do I use?


#8

What have you tried and what error are you getting?

You should “parse” the uri that you receive and be quick about it, as it is not valid for very long.


#9

You should “parse” the uri that you receive and be quick about it, as it is not valid for very long.

I think it’s valid for 1 minute, iirc


#10

I put the url from meteor mongo --url app for the address and removed the port from the url. I have also tried putting my meteor account in the authentication tab.

I get “Cannot connect to MongoDB (mongo url) error: Unable to connect to MongoDB”. I do it within the minute. If I click test, it says it is unable to connect.


#11

The returned URI should be in the following format:

mongodb://<user>:<pass>@<server>:<port>/<database>

normally user, password, and server are changing between URI requests.

Paste all of them in the appropriate fields and you should be set.


#12

Thank you. It works!