RapidMiner

Guru
Guru

how to properly connect to local mongo DB?

Hi there, for testing purposes I am running following setup :

 

-> Rapidminer Studio

-> RapidMiner Server (on same device as Studio)

-> Mongo DB (localhost)

 

When using Studio I can access Mongo without issues using local repository and using the server repository (within Studio). However, when I want to run the process on the server directly it fails and I get a 'database misconfiguration error'

 

Any idea what I might be doing wrong, is there any specific thing I need to do to be able to call Mongo when using the server ?

25 REPLIES
RM Staff
RM Staff

Re: how to properly connect to local mongo DB?

Dear Kayman,

you need to setup the connection on the server side. This connection is then passed to studio and you can use it there (also locally). There is an example for solr on the docs page: http://docs.rapidminer.com/server/administration/creating-connections/creating-other-conns.html - Mongo works pretty similar.

 

~Martin

--------------------------------------------------------------------------
Head of Data Science Services at RapidMiner
Guru
Guru

Re: how to properly connect to local mongo DB?

That's actually what I tried.

 

The problem is that when I test the connection directly on the server (connect -> test connection parameters) I get a nice green tick, but when I use a process that uses the same conenction I get this :
 

com.rapidminer.operator.UserError: The database configuration 'mongo_local_data' is invalid.

 

I've also gave access right to the whole user group to ensure I didn't miss something there.

So somewhere I am missing something. the error message is not really helping in understanding where I should do some troubleshooting. 

Guru
Guru

Re: how to properly connect to local mongo DB?

Anybody that was ever able to get local mongo working? I am not able to get it running.

 

Testing shows ok, executing shows 'the database configuration is invalid'

Running the same from desktop (while on server instance) works fine also, it only fails when executed directly on server.

RM Staff
RM Staff

Re: how to properly connect to local mongo DB?

Hi kayman,

 

I have a local instance running which now works fine but I remember that I ran into similar issues. Can you please help me narrowing down the problem so I can try to reproduce the connection problem:

  1. Do you use authentication for the MongoDB connection? If yes - do you use the root user or did you create a special user?
  2. Did you name the connection you created from within Studio exactly the same as the one you created for Server?

Best regards,

Edin

 

Guru
Guru

Re: how to properly connect to local mongo DB?

Hi Edin,

 

I use no authentication, and basically I keep all out of the box settings.

 

So I'm using instance host = localhost, instance port is 27017.

 

I'm having the same setup for my server repo, and as mentioned running the flow from withing desktop (but using the server instances) works fine, running it directly on the server fails. Testing the connection directly on the server gives no error.

 

Hope you can use this to do some troubleshooting, it's kind of a holdback at the moment for me.

RM Staff
RM Staff

Re: how to properly connect to local mongo DB?

Hi kayman,

 

after some investigation I hopefully found a solution to your issue.

  1. Login as admin on your RapidMiner Server webinterface - not within RapidMiner Studio
  2. Delete the existing connection
  3. Recreate the connection
  4. Grant permissions

It seems that creating a MongoDB connection from withing Studio is a.t.m. not correctly populated to the server.

 

Hope this works,

Edin

Guru
Guru

Re: how to properly connect to local mongo DB?

Nope :-(
Same problems.

 

Steps taken : Create a complete new connection on server using the webinterface, as admin.

I granted access, tested it and was confirmed ok. The test request was acknowledged by Mongo also so communication was indeed correct.

Next I refreshed the connections in desktop and newly created one appears correctly. I created a small process that stores a few examples into Mongo.

Running the process locally works fine, the data is added to Mongo as expected.

 

Running the same process on server gives me 'com.rapidminer.operator.UserError : The database configuration 'mongo_test' is invalid.

 

I've tried running the process both as admin and local user, but no difference. Both server and Desktop are 7.3

 

 

Guru
Guru

Re: how to properly connect to local mongo DB?

Quick update,

 

I have the exact same behaviour on an additional test machine running Ubuntu. On this machine I have full admin rights and the same issue appears.

 

Installing connection on server (through browser), direct connection is working but using the connection through a process fails giving exactly the same error message.

 

Seems therefore using Mongo as localhost is not working (version 7.3)

RM Staff
RM Staff

Re: how to properly connect to local mongo DB?

Hi kayman,

 

I did the exact same steps as you described and everything works fine on my machine running MongoDB on localhost.

I am using RM version 7.3.001 and MongoDB version 3.4.1 (all on Windows).

 

Sorry I could not help Smiley Sad

 

Best,

Edin

Polls
How can RapidMiner increase participation in our new competitions?
Twitter Feed