zeppelin-mongodb-interpreter icon indicating copy to clipboard operation
zeppelin-mongodb-interpreter copied to clipboard

How to set mongo.shell.path when mongodb is running on remote server?

Open daanvdn opened this issue 6 years ago • 4 comments

Hi I am having an issue similar to this one . I am running zeppelin on a windows server, whereas my mongodb is running on a remote linux server. The mongo shell path on my linux box is /usr/bin/mongo. Obviously, if I set mongo.shell.path to this value, zeppelin complains that there is no such file or program in directory "." So my question is: can the mongo-interpreter work with a remote mongodb instance? If so what should the shell path look like? Do I use a url like my.remoteserver.com:/usr/bin/mongo?

Thanks

daanvdn avatar Aug 17 '18 08:08 daanvdn

Hi, The interpreter needs a local mongo shell in order to run your script. So you have to install the mongo client on the same server as zeppelin.

bbonnin avatar Aug 17 '18 08:08 bbonnin

@bbonnin, I just tried that and now there's another problem: for some reason it's trying to connect to a mongodb instance on localhost, not to the host specified in mongo.server.host

 WARN [2018-08-17 05:03:25,531] ({pool-2-thread-1} NotebookServer.java[afterStatusChange]:2302) - Job 20180817-041542_174408304 is finished, status: ERROR, exception: null, result: %text 2018-08-17T05:03:25.501-0400 E QUERY    [js] Error: couldn't connect to server localhost:27017, connection attempt failed: SocketException: Error connecting to localhost:27017 (127.0.0.1:27017) :: caused by :: No connection could be made because the target machine actively refused it. :
connect@src/mongo/shell/mongo.js:257:13
@(connect):1:21

daanvdn avatar Aug 17 '18 09:08 daanvdn

apologies, I closed this by accident

daanvdn avatar Aug 17 '18 09:08 daanvdn

I just tested with an IP address where there is no mongo and I got an error containing the address that I have provided.

capture d ecran 2018-08-17 a 11 25 54

Have you restarted Zeppelin ? Which version of Zeppelin are you using ?

bbonnin avatar Aug 17 '18 09:08 bbonnin