Problem when "port 8888 is already in use"

In the past, if I had one instance of Jupyter Lab running from one virtual environment and then started a second one from a different virtual environment, I would see a message in the terminal for the second one that said that port 8888 was already in use. It would then try a higher one and the second browser tab talking to the new kernel would open.

Recently, I’ve seen something different:

  • In the terminal window that I’m running second, it is as if things hang after a message like this is displayed:

[I 2022-12-14 23:51:50.182 ServerApp] The port 8888 is already in use, trying another port.

  • A new browser tab opens nonetheless, but it is communicating with the server that had been opened before from the first virtual environment.

Two questions:

  1. Has anyone else observed something like this? Or noticed any related change with a recent version of Jupyter Lab?

  2. If I should file a bug report, where is the best place?

If anyone is interested I could provide more details but I suspect it might make more sense to put those in a bug report.

Does this bug report sound accurate to you?

1 Like

Yes. Thanks for the pointer to that issue. I posted a comment there describing my experience.

For what it’s worth, I searched for issues in the repositories under the Jupyter org account on github.com:

-----https://github.com/orgs/jupyter-----

In the post that you responded to, I asked about where to submit a bug report because I could tell that I was not finding the repo for Jupyter Server. I didn’t realize that there is a distinct github.com account:

-----https://github.com/jupyter-server-----

I’m not sure how, but I wonder if it would be helpful to put a pointer in the Project Jupyter · GitHub account to the account for jupyter-server, Jupyter Server · GitHub.

1 Like

Don’t know if it’s related, but since today I have noticed that both via Ctrl-C, answering Y, and File->Shutdown Jupyter server/lab doesn’t shut down properly, because if I immediately restart, I get the “8888 is already in use” remark.

Here are my versions, for reference:

❯ mamba list jupyter
# packages in environment at /luna9/maye/mambaforge:
#
# Name                    Version                   Build  Channel
jupyter-server-proxy      3.2.2              pyhd8ed1ab_0    conda-forge
jupyter_client            7.4.9              pyhd8ed1ab_0    conda-forge
jupyter_core              5.1.3           py311h38be061_0    conda-forge
jupyter_events            0.6.3              pyhd8ed1ab_0    conda-forge
jupyter_server            2.1.0              pyhd8ed1ab_0    conda-forge
jupyter_server_terminals  0.4.4              pyhd8ed1ab_1    conda-forge
jupyterlab                3.5.2              pyhd8ed1ab_0    conda-forge
jupyterlab_pygments       0.2.2              pyhd8ed1ab_0    conda-forge
jupyterlab_server         2.19.0             pyhd8ed1ab_0    conda-forge

and notebook:

❯ mamba list notebook
# packages in environment at /luna9/maye/mambaforge:
#
# Name                    Version                   Build  Channel
notebook                  6.5.2              pyha770c72_1    conda-forge
notebook-shim             0.2.2              pyhd8ed1ab_0    conda-forge