I'm trying to connect my FrontEnd session to remote kernel. Manual connection works by creating
LinkObject like so:
link = LinkCreate["firstname.lastname@example.org,email@example.com", LinkMode -> Listen, LinkProtocol -> "TCPIP"]
Connect to remote machine forwarding ports 8000 and 8001:
ssh -R8000:127.0.0.1:8000 -R8001:127.0.0.1:8001 user@host
wolfram -wstp -LinkMode Connect -LinkProtocol TCPIP -LinkName firstname.lastname@example.org,email@example.com
Then locally this works as expected:
LinkRead[link] (*InputNamePacket["In:= "]*) LinkWrite[link, Unevaluated@EvaluatePacket[$MachineName]] LinkRead[link] (*ReturnPacket["remote_machine_name"]*)
But any attempt to connect my FrontEnd results in a frozen evaluating cell that doesn't return anything. Even though the connection is clearly there, because it drops remotely after closing it locally.
I've tried many things:
Evaluation -> Kernel Configuration Options, the
tunnel.sh script suggested in other answers, assigning to
$ParentLink, nothing works!
Remote machine has linux with Wolfram Engine For Developers installed. And I'm running WolframDesktop 12.0 locally on Mac.
EDIT: I've managed to get it working with Raw MathLink connection option (
"RawMathLinkProgram" -> True). But it's pretty limited, no graphics, just text output.
EDIT: Suprisingly it works if I connect to my other laptop within my home network. It also has Ubuntu and docker with Wolfram Engine. But if I try basically the same steps with a cloud server, it refuses to work (unless it's raw mathlink connection).
ssh -L8000:127.0.0.1:8000 -L8001:127.0.0.1:8001 user@host
wolfram -wstp -LinkMode Listen -LinkProtocol TCPIP -LinkName firstname.lastname@example.org,email@example.com
And local Kernel Configuration:
-LinkMode Connect -LinkProtocol TCPIP -LinkName firstname.lastname@example.org,email@example.com
Same result, local FrontEnd just crashes if I connect to remote cloud machine, but works with my laptop (shrug)
Very certain that it's a bug at this point, some low level protocol discrepancies maybe.