MongoDB Service Exception

Hi ,

I am trying to connect to a Mongo DB which is in MongoHQ.com. After adding the service as follows

mongodb://myserver:port
username
password
database

when I try to go to API docs and try the mongo api I am getting the following error

{
  "error": [
    {
      "context": null,
      "message": "Failed to launch service "mongohq": Unexpected MongoDb Service Exception:\nSSL can only be 'true' or 'false'",
      "code": 500
    }
  ]
}

I am not checking the SSL checkbox while creating the mongo service. Am I missing something here ?

Pradeep.

Did you specify a database name?

Hereā€™s a blog post about setting up MongoHQ https://blog.dreamfactory.com/blog/bid/340254/DreamFactory-Now-Supports-MongoHQ. That should help. If you still canā€™t get it working, contact support@dreamfactory.com.

This appears to be a problem in the new Admin Console UI from 1.9.0. @pradeepmurugesan you are in 1.9.0, correct?

Any news on this yet?

I had the bitnami stack installed on windows, with a local copy of mongodb, and for the life of me could not get DF to connect to Mongo.

So I decided to to create a test db on mongolab, to see if maybe my local config was incorrect for mongo. Same issues.

I created a dsp instance on Dreamfactory.com today, to see if cloud-to-cloud would have success. Nope.

Have tried every permutation of settings that I could think of to get them to connect, with no luck.

Anything else we could try?

You are correct @pineapple_man, like I said this is a problem in the new admin UI. We did not fix it over the weekend, but keep an eye on the repo because I expect weā€™ll commit the fix this week. In the meantime you could use the old admin UI if your need to connect to a MongoDB is urgent.

Thank you for the reply.

Not urgent, just playing around and testing use-cases :smile:

Any update on whether this has been fixed? This as its a bit of an urgent need for us. Weā€™re migrating over some standalone tools to our DSP and they need Mongo as the backend. A bit of a bottleneck for us that needs to be resolved asap.

Whatā€™s the procedure to rollback the Admin UI if we need this asap? Weā€™re running off the Git codebase and on a manual Ubuntu installation with the NGINX config.

Since this is urgent for you, I recommend using the old Admin Console UI.

{host}:{port}/launchpad/index.html

Thanks for the info. Got it working. Do let us know when the new UI is updated.

Hi, im new to dream factory
im trying to connect to mongo db and i always get the following exception:

ā€œUnexpected MongoDb Service Exception:\nSSL can only be ā€˜trueā€™ or ā€˜falseā€™ā€

How can i resolve this ?

Thanks

@asafp I have moved your post to the existing thread on this issue. Please read this thread for details on this known problem as well as the workaround. This thread will be updated once the fix is committed, as well.

Where can i get the old Admin Console ?

Please read this thread. The old Admin Console UI is accessible at the path I provided above.

Iā€™m using the ā€œoldā€ admin console as suggested but still get this errorā€¦

Regards,
Andi

We have tested several MongoDB connections without error. Could you provide the exact steps to reproduce the error on the old Admin Console and the error(s) from the logs?

I have used MongoLab and set up my own MongoDB 3.0.1 on AWS and get the same error.

{
  "error": [
{
  "context": null,
  "message": "Failed to launch service "mongolab": Unexpected MongoDb Service Exception:\nSSL can only be 'true' or 'false'",
  "code": 500
  }
 ]
}

I tried switching to the old admin interface

{host}:{port}/launchpad/index.html

And still the same issue.
I have switched the connection strings around

 ds053688.mongolab.com:53688

and

 mongodb://<dbuser>:<dbpassword>@ds053688.mongolab.com:53688

still same error.

I just set up a new MongoLab DB and connected to it without issue. I recommend you try again, and if this does not work please post your service config for this DB service.

From Mongo HQ

To connect using the shell:
mongo ds053688.mongolab.com:53688/enron_1 -u <dbuser> -p <dbpassword>
To connect using a driver via the standard URI (what's this?):
mongodb://<dbuser>:<dbpassword>@ds053688.mongolab.com:53688/enron_1

Here is my connecting from the shell;

[~/Development]$ /data/bin/mongo ds053688.mongolab.com:53688/enron_1 -u dsp -p password
MongoDB shell version: 2.4.9
connecting to: ds053688.mongolab.com:53688/enron_1
Error while trying to show server startup warnings: not authorized on admin to execute command { getLog:    "startupWarnings" }
> use enron_1
switched to db enron_1
> show collections
messages
system.indexes
>

Here is my Bitnami DSP service config;

Service Type : NoSQL DB
API Name : MongoLab
Name : MongoLab
Description : Mongo Enron Dataset
Active : Check
NoSQL Vendor : MongoDB 
Connection String :  mongodb://dsp:password@ds053688.mongolab.com:53688
Database Name :  enron_1
Username : dsp
Password : password
Connect with SSL (PHP driver and MongoDB server must support SSL) (Not Checked)

Are there any recomendations like connection string format, or mongo settings that need to be done?

Hi Stephen. You will need to include the database name in the connection string, for example:

mongodb://dsp:password@ds053688.mongolab.com:53688/enron_1

I added this as a service in my DSP and was able to make calls to this database.

Since the DSP is providing your credentials, you may be forcing them into the connection twice by also explicitly specifying them in the connection string. My working MongoLab connection string looks like this:

mongodb://ds027183.mongolab.com:27183

Let the DSP store and provide your credentials rather than specifying them manually in your connection string, and let me know how that works for you.