Galaxy deployment - Failed to connect to mongo

I´m getting the following error when uploading an app that uses a mongodb database from mlab:

/app/bundle/programs/server/node_modules/fibers/future.js:313
4tpk
throw(ex);
Error: failed to connect to [<myusername>:NaN]
 at Object.Future.wait (/app/bundle/programs/server/node_modules/fibers/future.js:449:15)
 at new MongoConnection (packages/mongo/mongo_driver.js:213:27)

Uploading the barebones Meteor example works fine (no collections).

Then I modified the example to use a mongoDB collection and then the error appears,

I can connect to the mlab database using mongo shell without any problems.

The settings.json seems to be fine.

{
    "galaxy.meteor.com": { 
            "env": {
                "ROOT_URL": "http://www.example.com",
		"MONGO_URL": "mongodb://<myusername>:<mypassword>@ds023456.mlab.com:23456/mydb"
	    } 
    }
}

I can see that in the error the password is NaN, maybe that´s the issue?

Thanks!

There have been some reported issues with “weird” characters in the password field - maybe try more “normal” characters?

This was a very dumb mistake… I was using <username>:<password> instead of username:password.

That solved it. Thanks for the help!

1 Like

Hi! Thanks for this. got same error and I did the same exact thing you did. Do we actually need to input our “username:password”? This would be the same username and password used to login into mlab?

Oh wait. It would be dbusername and dbpassword that we created for the initial user right? So it’s not the account info to sign into mlab

Yup. That’s totally right.