1 | initial version |
My computer environment: Windows 10 20H2 (19042.630), ubuntu 22.04.5 LTS in WSL 2, SageMath version 10.4 in ubuntu.
After my first successful run of sage -n
, I also encountered this issue. Strangely, about 20 minutes later, I was able to open Jupyter Notebook using the same steps (typing sage -n
and copying the link into the browser on my Windows main system), despite not changing anything on either my Ubuntu subsystem or Windows main system.
I’ve also noticed that once I’m in the notebook, if I close the browser by directly clicking the red “X” in the corner, I often can't access the notebook again. However, if I go to "File -> Log Out" on the Jupyter Notebook home page, and the page confirms with “Successfully logged out”, I can always re-enter the notebook using the same steps, even after restarting my computer.
My guess is that each time we generate a link via sage -n
and open it in the browser, it occupies a specific web port. If we leave it idle for too long, the link becomes invalid. When the browser is closed directly, the previous link remains active, and since the port can only be used by one link, we can’t re-enter with a newly generated link from sage -n
. Instead, we have to wait for the previous link to expire. By clicking Log Out, the link is properly terminated, allowing the system to accept a new link immediately.
Currently, I’m not sure if there are other ways to manually terminate the previous link either from Ubuntu subsystem or from Windows main system. For now, using "File -> Log Out" is a reliable way to avoid this issue. If the problem does occur, waiting for the link to expire might be a solution.