To address some of the responsiveness issues, I use the Mathematica front end (v9 or v10) to access a remote kernel on a Raspberry Pi. The (advanced) kernel configuration used is this:

Arguments to MLOpen:

-LinkMode Listen -LinkProtocol TCPIP -LinkOptions MLDontInteract

Shell command to launch kernel:

"`java`" -jar "`mathssh`" pi@lcdlab sudo wolfram -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName "`linkname`" -LinkHost `ipaddress`

I recently subscribed to a VPN service with this company: Private Internet Access. Connecting through the VPN breaks my ability to access the remote kernel. I only have the VPN running on my PC, not on the RPi.

Debugging a bit, I notice this process on the RPi

sudo wolfram -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName 3273@[local ip],3274@[local ip] -LinkHost [private ip]

where [local ip] is the IP address assigned by my router to my PC and [private ip] is an address from a private block (10.0...) that I assume is being assigned via my VPN. Therefore, I conclude that communication is only one-way, since the RPi doesn't know to whom it's talking.

I can work around this problem by hard coding the [local ip] into the shell command:

Shell command to launch kernel: (workaround)

"`java`" -jar "`mathssh`" pi@lcdlab sudo wolfram -mathlink -LinkMode Connect -LinkProtocol TCPIP -LinkName "`linkname`" -LinkHost [local ip]

This workaround is sufficient for my current configuration; however I would like to know if there is some solution that does not require manual configuration of the shell command. It is clear that linkname contains the necessary IP address, however it also contains ports that should not be passed to -LinkHost. Is there a way to parse linkname and use that as the argument for -LinkHost?

  • 1
    $\begingroup$ Thanks for reporting this, saved me a lot of time! $\endgroup$ – Frank Martin Jul 31 '17 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.