Tunneling HTTP

With this method, the application runs a small web server to which you connect with your web browser. I wrote this using Jupyter Notebook as an example, but the same principles should apply to other applications that work this way. If you're looking specifically to use Jupyter Notebook, however, we now have a web interface that automates this method on SciClone.

Generally these applications assume that both the application's web server and the web browser will be running on the same computer. Since this will not be the case (the server will be running in an interactive job on a compute node, while the browser will be on the computer in front of you), we need to make a few adjustments:

  • If the application attempts to automatically open a web browser, ask it not to. With Jupyter Notebook, this is --no-browser.
  • Instruct the application to listen for connections from other computers, not just the one it's running on. Again with Jupyter Notebook, this is --ip=\*.
11 [vortex] qsub -I -l nodes=1:vortex:ppn=12 -l walltime=1:00:00
qsub: waiting for job 2937887.vortex.sciclone.wm.edu to start
qsub: job 2937887.vortex.sciclone.wm.edu ready

2 [vx02] jupyter-notebook --no-browser --ip=\*
...
[C 11:38:56.480 NotebookApp]

    Copy/paste this URL into your browser when you
    connect for the first time, to login with a token:
        http://localhost:8888/?token=39ff...26fe

Now that we have a URL, leave the application running and open a new terminal on the computer in front of you. Make the URL valid on the computer in front of you by having SSH forward port 8888 (from the URL) to vx02 (from the prompt):

ssh -NL 8888:vx02:8888 user@vortex.sciclone.wm.edu

Leaving that open, you should then be able to open the URL in your web browser.