Skip to content
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

Scheduler does not appear after installing #377

Closed
njuhl76 opened this issue Jun 1, 2023 · 13 comments
Closed

Scheduler does not appear after installing #377

njuhl76 opened this issue Jun 1, 2023 · 13 comments
Labels
bug Something isn't working question This issue asks a question

Comments

@njuhl76
Copy link

njuhl76 commented Jun 1, 2023

Description

After installing the actual version of jupyter_scheduler the Sceduler button does not appear:
image
The installation of jupyter-scheduler went through without errors.

Reproduce

  1. Install 'jupyter_scheduler' in Jupyter Lab
  2. Restart the kernel.
  3. Stop the Jupyter Lab
  4. Start the Jupyter Lab
  5. Open the Jupyter lab
  6. Use the sceduler button --> not button appears

Expected behavior

The button should appear like this:
image

Context

  • Operating System and version:
    image

  • Browser and version: Google Chrome Version 113.0.5672.127

  • Jupyter Server version: Version 3.4.8

Troubleshoot Output
Paste the output from running `jupyter troubleshoot` from the command line here.
You may want to sanitize the paths in the output.
Command Line Output
Paste the output from your command line running `jupyter lab` here, use `--debug` if possible.
Browser Output
Paste the output from your browser Javascript console here, if applicable.
@njuhl76 njuhl76 added the bug Something isn't working label Jun 1, 2023
@welcome
Copy link

welcome bot commented Jun 1, 2023

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@JasonWeill
Copy link
Collaborator

@njuhl76 Thanks for opening this issue! How did you install jupyter_scheduler? We recommend pip install jupyter_scheduler.

What do you see when you run the following two commands?

  1. jupyter server extension list
  2. jupyter labextension list

@JasonWeill JasonWeill changed the title Sceduler does not appear after installing Scheduler does not appear after installing Jun 1, 2023
@JasonWeill JasonWeill added the question This issue asks a question label Jun 1, 2023
@njuhl76
Copy link
Author

njuhl76 commented Jun 2, 2023

thank you for your answer!

Here are my results:

(base) jupyter@p-beat-ai--nils-juhl--notebook:~$ jupyter server extension list
Config dir: /home/jupyter/.jupyter

Config dir: /opt/conda/etc/jupyter
jupyter_scheduler enabled
- Validating jupyter_scheduler...
jupyter_scheduler 1.3.2 OK
jupyter_server_mathjax enabled
- Validating jupyter_server_mathjax...
jupyter_server_mathjax OK
nbclassic enabled
- Validating nbclassic...
nbclassic 0.5.3 OK
nbdime enabled
- Validating nbdime...
nbdime 3.1.1 OK
notebook_shim enabled
- Validating notebook_shim...
notebook_shim OK

Config dir: /usr/local/etc/jupyter


(base) jupyter@p-beat-ai--nils-juhl--notebook:~$ jupyter labextension list
usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand]

Jupyter: Interactive Computing

positional arguments:
subcommand the subcommand to launch

optional arguments:
-h, --help show this help message and exit
--version show the versions of core jupyter packages and exit
--config-dir show Jupyter config dir
--data-dir show Jupyter data dir
--runtime-dir show Jupyter runtime dir
--paths show all Jupyter paths. Add --json for machine-readable format.
--json output paths as machine-readable json
--debug output debug information about paths

Available subcommands: bundlerextension dejavu execute kernel kernelspec migrate nbclassic nbconvert nbextension notebook run server serverextension troubleshoot trust

Jupyter command jupyter-labextension not found.

@JasonWeill
Copy link
Collaborator

The error when you run jupyter labextension list confuses me a bit. What do you get when you run jupyter --version?

@njuhl76
Copy link
Author

njuhl76 commented Jun 8, 2023

Here is my Result:
image

@JasonWeill
Copy link
Collaborator

Per your results, it looks like JupyterLab is not installed. Are you sure you're running JupyterLab, or are you using Jupyter Notebook instead? The scheduler requires JupyterLab, not Notebook or other apps.

@njuhl76
Copy link
Author

njuhl76 commented Jun 15, 2023

Thanks for the answer!
Now I have installed jupyterlab:
image

After that I did that again and it did not work again:

  • Install 'jupyter_scheduler' in Jupyter Lab
  • Restart the kernel.
  • Stop the Jupyter Lab
  • Start the Jupyter Lab
  • Open the Jupyter lab
  • Use the sceduler button --> not button appears

@JasonWeill
Copy link
Collaborator

Thanks for the update!

When you rerun the following two commands, do you see any errors?

  1. jupyter server extension list
  2. jupyter labextension list

In addition, when you run jupyter lab, do you see any errors related to the scheduler extension?

To help other users and developers find this issue, it would be best if you pasted in your output and error messages as code blocks (surrounded by three backticks ` on a line by themselves) instead of as screen shots. This helps GitHub's search indexer. Thanks again.

@njuhl76
Copy link
Author

njuhl76 commented Jun 29, 2023

I don't see any errors at step 1 & 2 but I see errors when I run jupyter lab :

(base) jupyter@p-beat-ai--nils-juhl--notebook:~$ jupyter lab
[I 2023-06-29 16:39:15.550 ServerApp] jupyter_scheduler | extension was successfully linked.
[I 2023-06-29 16:39:15.555 ServerApp] jupyter_server_fileid | extension was successfully linked.
[I 2023-06-29 16:39:15.559 ServerApp] jupyter_server_mathjax | extension was successfully linked.
[I 2023-06-29 16:39:15.564 ServerApp] jupyter_server_ydoc | extension was successfully linked.
[I 2023-06-29 16:39:15.569 ServerApp] jupyterlab | extension was successfully linked.
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/notebook-enable-debug
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/runtime-resource-name
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/disable-check-xsrf
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/use-collaborative
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/notebook-disable-downloads
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/notebook-disable-terminal
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/notebook-enable-delete-to-trash
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/jupyter-user
404 Client Error: Not Found for url: http://metadata/computeMetadata/v1/instance/attributes/notebook-enable-gateway-client
[W 2023-06-29 16:39:15.648 NotebookApp] 'terminado_settings' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2023-06-29 16:39:15.652 ServerApp] nbclassic | extension was successfully linked.
[I 2023-06-29 16:39:15.652 ServerApp] nbdime | extension was successfully linked.
[I 2023-06-29 16:39:15.982 ServerApp] nb_conda | extension was found and enabled by notebook_shim. Consider moving the extension to Jupyter Server's extension paths.
[I 2023-06-29 16:39:15.982 ServerApp] nb_conda | extension was successfully linked.
[I 2023-06-29 16:39:15.982 ServerApp] notebook_shim | extension was successfully linked.
/opt/conda/lib/python3.7/site-packages/traitlets/traitlets.py:1233: UserWarning: Overriding existing pre_save_hook (metadata_env_pre_save) with a new one (metadata_env_pre_save).
  return self.func(*args, **kwargs)
[W 2023-06-29 16:39:16.017 ServerApp] All authentication is disabled.  Anyone who can connect to this server will be able to run code.
[I 2023-06-29 16:39:16.020 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-06-29 16:39:16.480 ServerApp] jupyter_scheduler | extension was successfully loaded.
[I 2023-06-29 16:39:16.481 FileIdExtension] Configured File ID manager: ArbitraryFileIdManager
[I 2023-06-29 16:39:16.481 FileIdExtension] ArbitraryFileIdManager : Configured root dir: /home/jupyter
[I 2023-06-29 16:39:16.481 FileIdExtension] ArbitraryFileIdManager : Configured database path: /home/jupyter/.local/share/jupyter/file_id_manager.db
[I 2023-06-29 16:39:16.482 FileIdExtension] ArbitraryFileIdManager : Successfully connected to database file.
[I 2023-06-29 16:39:16.482 FileIdExtension] ArbitraryFileIdManager : Creating File ID tables and indices with journal_mode = DELETE
[I 2023-06-29 16:39:16.494 ServerApp] jupyter_server_fileid | extension was successfully loaded.
[I 2023-06-29 16:39:16.495 ServerApp] jupyter_server_mathjax | extension was successfully loaded.
[I 2023-06-29 16:39:16.495 ServerApp] jupyter_server_ydoc | extension was successfully loaded.
[I 2023-06-29 16:39:16.529 LabApp] JupyterLab extension loaded from /opt/conda/lib/python3.7/site-packages/jupyterlab
[I 2023-06-29 16:39:16.530 LabApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 2023-06-29 16:39:16.533 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-06-29 16:39:16.535 ServerApp] [nb_conda] enabled
[I 2023-06-29 16:39:16.535 ServerApp] nb_conda | extension was successfully loaded.

  _   _          _      _
 | | | |_ __  __| |__ _| |_ ___
 | |_| | '_ \/ _` / _` |  _/ -_)
  \___/| .__/\__,_\__,_|\__\___|
       |_|
                                                                           
Read the migration plan to Notebook 7 to learn about the new features and the actions to take if you are using extensions.

https://jupyter-notebook.readthedocs.io/en/latest/migrate_to_notebook7.html

Please note that updating to Notebook 7 might break some of your extensions.

[I 2023-06-29 16:39:16.545 ServerApp] nbclassic | extension was successfully loaded.
[I 2023-06-29 16:39:16.782 ServerApp] nbdime | extension was successfully loaded.
[I 2023-06-29 16:39:16.783 ServerApp] The port 8080 is already in use, trying another port.
[I 2023-06-29 16:39:16.784 ServerApp] Serving notebooks from local directory: /home/jupyter
[I 2023-06-29 16:39:16.784 ServerApp] Jupyter Server 1.23.6 is running at:
[I 2023-06-29 16:39:16.784 ServerApp] http://localhost:8081/lab
[I 2023-06-29 16:39:16.784 ServerApp]  or http://127.0.0.1:8081/lab
[I 2023-06-29 16:39:16.784 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2023-06-29 16:39:16.790 ServerApp] No web browser found: could not locate runnable browser.`

@njuhl76
Copy link
Author

njuhl76 commented Jul 6, 2023

Do you have any idea, how to deal with these errors @JasonWeill ?

@JasonWeill
Copy link
Collaborator

@njuhl76 I don't see any actionable errors in the log above, and I have not tried to use Jupyter Scheduler on Google Compute Engine. (I also work for AWS, a competitor of Google Cloud.)

@dlqqq
Copy link
Collaborator

dlqqq commented Jul 6, 2023

@njuhl76 Hi Nils, we don't have access to GCP, so unfortunately, we're not able to reproduce your issue. From the data you've posted, it is apparent that the Jupyter Scheduler extension is being successfully initialized; this can be seen from the log line:

[I 2023-06-29 16:39:16.480 ServerApp] jupyter_scheduler | extension was successfully loaded.

However, it also looks like you are spawning two JupyterLab servers. This is apparent because port 8080 is already in use:

[I 2023-06-29 16:39:16.783 ServerApp] The port 8080 is already in use, trying another port.
[I 2023-06-29 16:39:16.784 ServerApp] Serving notebooks from local directory: /home/jupyter
[I 2023-06-29 16:39:16.784 ServerApp] Jupyter Server 1.23.6 is running at:
[I 2023-06-29 16:39:16.784 ServerApp] http://localhost:8081/lab
[I 2023-06-29 16:39:16.784 ServerApp]  or http://127.0.0.1:8081/lab
[I 2023-06-29 16:39:16.784 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 2023-06-29 16:39:16.790 ServerApp] No web browser found: could not locate runnable browser.`

My guess is that you are actually spawning two JupyterLab servers, one at :8080 (the "main" JL instance) and one at :8081. You are likely connecting to the one at :8080, and thus aren't seeing the extension that was installed on the instance at :8081. You will want to find the Conda environment that the main JL instance is hosted in, install the package there, and then restart the main JL instance.

To list available Conda environments:

conda env list

To switch to a new Conda environment:

conda activate <env-name>

It looks like GCP Deep Learning VM has all Jupyter-related packages in a separate Conda environment. See here:

Screenshot 2023-07-06 at 11 45 35 AM

Reference: https://cloud.google.com/deep-learning-vm/docs/release-notes

Since this issue appears to be specifically related to GCP's Conda environments and not Jupyter Scheduler itself, I will close the issue.

@dlqqq dlqqq closed this as completed Jul 6, 2023
@njuhl76
Copy link
Author

njuhl76 commented Jul 13, 2023

Thank you for these insightful comments @dlqqq !
In fact, I had the M105 version running. On this then also two environments existed. In the Jupyter environment I can run the sceduler.
Thanks again @dlqqq & @JasonWeill

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working question This issue asks a question
Projects
None yet
Development

No branches or pull requests

3 participants