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 ?
Best Answer
-
Edin_Klapic Employee-RapidMiner, RMResearcher, Member Posts: 299 RM Data Scientist
Hi all,
the latest RapidMiner update v7.6 also provides an updated version of the NoSQL Extension.
After updating the extension on your local machine and on RapidMiner Server the connectivity issue no longer occurs.
Best,
Edin
3
Answers
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
Dortmund, Germany
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 :
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.
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.
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:
Best regards,
Edin
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.
Hi kayman,
after some investigation I hopefully found a solution to your issue.
It seems that creating a MongoDB connection from withing Studio is a.t.m. not correctly populated to the server.
Hope this works,
Edin
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
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)
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
Best,
Edin
Weird, it isn't really rocket science so this is giving me a serious headache as this is a potential showstopper for us.
Did you try running a real process storing data, or did you just test the connection itself?
The connection works for me also, it just gives a problem when I actually want to use it inside of a process.
I have it on 2 seperate machines, one running on windows and another running linux, only difference is that I am running mongo 3.2 on both instead of 3.4
I'll try if I can upgrade to 3.4 and hope that makes a difference, otherwise I'm stuck indeed.
This is my test script :
I used your process (with the Iris data set as source), stored it in the admin home folder and also renamed my MongoDB connection.
No error occurs - regardless of the way I execute the process.
One thing that pops into my mind.
What version of the NoSQL extension are you running on Server & Studio? Are those different?
Best,
Edin
Nope, both are 7.3.0 :-(
Could also be something I did wrong with the Mongo installation, though as far as I recall that was also just a straight forward process and it seems to be working for any of my other applications using it (and with RM desktop)
Could it be related to the Mongo dbpath or so? Not that I see anything wrong with that, for my windows setup that is located on C:\data\db si that should be accessible by the server also I assume?
I have exactly same issue with Rapidminer server, desktop and NoSQL extenstion in version 7.4. Server runs in Ubuntu 14.04. Mongo is 3.4
The standard installation procedure, as well as the MongoDB path, should not be the issue - I used it to.
Did you try to store and run the process not in a user home folder but instead in a generally available folder (e.g. groups)?
Else, I am running out of ideas
In the meantime I try to get some information from our development team.
Best regards,
Edin
I can give it a try in a different folder but don't expect much tbh.
Could it be related to activation code? Mine is already a fairly old one, before noSQL was an option. Just trying to put additioanl ideas on the table...
[UPDATE] Installing the process in another folder (like groups) did not make any difference. The problem remains the same.
The activation code is not the problem.
@kayman and @hcha: Is it possible that you send me your server.log (located in InstallationDirectory/standalone/log/) of a day when the connection problem occurred (by PM)?
It helps our developers to further narrow down the issue.
Best regards,
Edin
Hi @Edin_Klapic
I have exactly the same issue listed in the thread.
I am able to execute mongo reads from studio but it fails on the server. I have tried everythin listed in the thread with no avail.
Below is the full server log for the process execution. One interesting part is the warning that reads:
It seems the server configuration manager doesn't have a user thus it can't read the connection (my connections is called "Localhost").
Is there source code for the noSQL connector open and if so where is it hosted to take a look at what is going on?
Full log:
Hi yunior_betancou,
thank you for sharing the log file. Especially the User null part is interesting.
We are investigating the problem and hope to be able to fix it soon.
Regarding your other question:
The noSQL extension is not publicly available.
Best regards,
Edin
Same issue here. MongoDB localhost connection does not work on RapidMiner Server
Symptoms:
- Accessing the MongoDB directly from RapidMiner Studio works OK
- Setting up the connection in RapidMiner Server and testing it directly from the web interface works OK
- Running the process on RapidMiner Server generates exception : The database configuration is invalid
- User null message found in log file just before exception trace
Below the log dump
Hi all,
Thank you all for your valuable feedback incl. log files and stuff. I got the confirmation that we are working on this.
I will keep you updated as soon as I have more details I can share.
Best,
Edin
Hi @Edin_Klapic, do you have some update on this?
Thanks in advance,
K.
The dev team is pretty packed up right now.
So no, unfortunately I have no update on this topic right now.
Best,
Edin
I can confirm this works now
Thanks !