I recently got these errors and tried some ways, hope these can help.
For error Connect Failed or Connection closed by UNKNOWN port 65535, I often check if my slice is StateOK or I will go to Jupyter->File->Hub control Panel-> Stop and start my server.
If those do not work, try to access VM through portal and run the command there instead of node.execute().