Restart Jupyter Lab server running in the background

Viewed 11324

I'm trying to restart a Jupyter Lab server (not just the kernels) running in the background of an AWS SageMaker notebook instance. I have already tried the following:

  • Killing the server by it's process ID
    • pgrep doesn't show me the process
    • pkill can't find the process
    • ps aux shows the process ID as constantly changing
  • Stopping the server through jupyter notebook stop
    • I get an SSL error and nothing happens

The only thing I've been able to do is reboot the entire instance, which isn't a great option as it can take awhile to become available again.

Edit 1:

The main reason I am trying to do this is that after installing the tqdm package and trying to use tqdm.notebook in Jupyter Lab, in order for it to display correctly I need to enable/install notebook and lab extensions. In order for these to take effect the server then needs to be restarted.

3 Answers

Try this:

  1. Left hand navbar, Commands
  2. Navigate to the Help section on the popout menu
  3. Reset Application State

Assuming it runs on port 8888:

jupyter lab stop 8888 && jupyter lab
Related