Message Boards Message Boards

0
|
19932 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Impossible to connect to a remote kernel

Posted 11 years ago

Hello everybody!

I am trying to configure Mathematica to work through ssh, in order to use the 12 remote kernels I have on a remote Linux Machine running Mathematica 8.0.

I am trying to connect from a Mac OSX 10.9.4 machine with Mathematica 9.0.1.

I followed step by step the guide in the references (quite poor I have to admit) available here: http://reference.wolfram.com/language/howto/ConnectToARemoteKernel.html

and the good thing is that at least Mathematica front end is asking me for the password, but after inserting it, i always get the error:

"The kernel LinuxKernel failed to connect to the front end. (Error = MLECONNECT). You should try running the kernel connection outside the front end."

I tried to start the kernel through a Terminal session in ssh and it works just fine. But why I cannot start it from the FrontEnd? I tried playing a bit with the settings in Mathematica but I didn't get far.

Does anybody have an idea on how to set up properly this thing? Or at least if it is possible to find a tutorial less useless (at least for me) than that one in the support page?

Thank you very much for your help.

4 Replies

I seem to have the same problem with Mma 7.0, and tried all what was recommended here, and more, to no avail. It used to work fine since years, but now after about 1 year of pause I noticed remote kernels "suddenly" don't work any more. AFAIK I didn't change the Mma setup in the mean time.

Here are the data:

-Problem happens for Mma 7.0 but for MMa 11.0 all is fine!

-Problem happens for any pair of two out of 3 machines.

-Machines run macOS High Sierra, 10.13.3

-passwortless ssh works between all machines

-I can run remote kernels via ssh

-I tried various setups using mathssh, tunnel.sh

-The following errors appear immediately, so it seems likely that the error is with the frontend and not with the connection:

-setup using mathssh yields: "The kernel xxxxx failed to connect to the front end. (Error = MLECONNECT). You should try running the kernel connection outside the front end."

-setup using tunnel.sh: yields panel with "Mathematica could not establish a connection to the kernel. Kernel: Local. Low-level MathLink error: Unknown internal error."

-I suspect it may have to do with Java, there were some other problems in the past with Java and Mma.

Any help?

Thanks!

Posted 10 years ago

Hi,

There is a solution following the documents at:

1) http://library.wolfram.com/infocenter/Conferences/7250/

and

2) http://www.physics.rutgers.edu/~rvaughn/Mathematica_Remote/Mathematica_Remote_HowTo.doc.092512

In reference [1] there are two files: .nb and .zip. In the last there are the files: init.m, tunnel.bat (window), tunnel.sh (linux and mac)

In reference [2] there is one file: *.doc that is a how-to.

Works ! I did (linux as remote and mac OS X as local machines).

a) I generated a public and private ssh key on my local machine (mac) without password. I copied the public key to the remote machine.

b) I copied the file init.m to the directory /home/Account/.Mathematica/Kernel/ directory on the remote machine. Where Account is your account in remote machine.

c) I copied the file tunnel.sh to the directory /Users/Account/Library/Mathematica/FrontEnd/ on the local machine. Where Account is your account.

d) I set the remote kernel on the local machine:

Evaluation / Kernel Configuration Options / Add

Kernel name: RemoteKernel

Basic Options:
- check: Remote machine; - Kernel program: the path of math in remote machine. (the mine is: Ex.: /home/opt/bin/math) - Remote host: the address of remote machine (or ip): Ex.: remote.machine:port. where port is the ssh port to access the remote machine.

Advanced Options: - Arguments to MLOpen: -LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract -LinkHost 127.0.0.1

-Launch command: "/Users/Account/Library/Mathematica/FrontEnd/tunnel.sh" user@remote.machine:port "/home/opt/bin/math" "linkname"

ATTENTION: linkname is between " " and " ` " that not appear above.

Replace above:
* Account by your directory in local machine; * user by login in remote machine; * remote.machine by ip address of remote machine; * port by ssh port of remote machine.

  • Open a new notebook. set the Default Kernel to remote machine. test the configuration from new notebook: $Version

Thank you

R Lisboa

POSTED BY: Ronai Lisboa

Hi R lisboa, the kernel works just fine, the problem is making it work through the front end. In order to don't have to manually copy all my others nb in the server.

It is quite disappointing that in wolfram website there is not clear help about this problem.

Cheers Raf

Posted 10 years ago

Hi,

The same problem with Mac OS X 10.10 machine with Mathematica 10 as client and Linux Debian with Mathematica 10.

"The kernel LinuxKernel failed to connect to the front end. (Error = MLECONNECT). You should try running the kernel connection outside the front end."

When we have a solution?

Thank you R Lisboa

POSTED BY: Ronai Lisboa
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract