port problems
When the 8888 port is used the nbinfo file contains:
[andrzejr@lo-login-02 ~]$ more jnbinfo
[I 16:24:41.640 NotebookApp] The port 8888 is already in use, trying another port.
[I 16:24:41.649 NotebookApp] Serving notebooks from local directory: /cluster/home/andrzejr
[I 16:24:41.649 NotebookApp] 0 active kernels
[I 16:24:41.649 NotebookApp] The Jupyter Notebook is running at:
[I 16:24:41.649 NotebookApp] http://10.204.3.168:8889/
[I 16:24:41.649 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation)
With this I receive error on my local end:
Waiting for jupyter notebook to start, sleep for 60 sec
Receiving ip, port and token from jupyter notebook
Error: remote port is not defined. Terminating script.
Please login to the cluster and check with bjobs if the batch job is still running.
I guess you can search for the "88*" patern in the jnbinfo file to prevent this instead of:
jnbinfo | grep -m1 token | cut -d '/' -f 3 | cut -d ':' -f 2