-
Notifications
You must be signed in to change notification settings - Fork 273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
wrong jupyter server port number in a specific situation #1170
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
Thanks for reporting the issue @KubaOfca. I also noticed it lately. |
@davidbrochart |
I've also noticed the issue where the Jupyter Server sometimes fails to respect SIGINT (Ctrl-C), but the author seems to have closed it prematurely. I think these two are somehow related, but I'm not certain. |
This appears to be caused by the browser having an open connection on the port after the server is shut down. If I start with |
Description
I can't start the new
jupyter lab
server on a given port when the server that was previously running on this port has just been shut down. Previously, when I was using version 1.23.4, this error did not occur. Moreover, when I wait a bit (let's say 5 min) after shutting downjupyter lab
server, I am able to run it on the desired port.Reproduce
conda create -n env_name
conda activate env_name
conda install jupyterlab -c conda-forge
jupyter lab --port 1234
Ctrl-C
jupyter lab --port 1234
jupyter lab
server is running on port 1235 instead of 1234.Expected behavior
After shutting down the jupyter lab server running on port 1234, it is possible to restart the jupyter lab server on the same specified port 1234.
Context
Command Line Output
Additional information
I've tried reproducing this step on Windows as well as Github Action CI and the error I described above doesn't occur here. In addition, I checked on Ubuntu 22.04.1 what will happen when I change the
jupyter_server
version from 2.0.6 to 1.23.4. After this change I was able to start the servers on the right ports.Possible solution
The problem seems to disappear when I replace
_find_http_port
with_bind_http_server_tcp
inserverapp.py
(I manually editedserverapp.py
after downloading thejupyter_server
2.0.6 package) which was present injupyter_server
1.23.4. After this change, I can start the servers on the right ports on Ubuntu 22.04.01.The text was updated successfully, but these errors were encountered: