NREL / HPC

A collection of various resources, examples, and executables for the general NREL HPC user community's benefit. Use the following website for accessing documentation.
https://nrel.github.io/HPC/
Other
108 stars 65 forks source link

Jupyter on Kestrel Help #564

Open dzalkind opened 9 months ago

dzalkind commented 9 months ago

Hi, thanks for putting together these scripts. They are very helpful for getting started on Kestrel.

I am trying to run a jupyter server with this script and my browser just seems to hang when given the url. I have pasted the output of the slurm script below, for reference. There seem to be some errors, but I had this working earlier today, now nothing. The browser also hangs if I kill the ssh or the jupyter sbatch process, if that helps. Earlier, it seemed to not search for very long. I've cleared my cache and tried a few browsers. I see that the Kestrel login notes have a red X status, but I'm using login nodes without other issues. The only thing I have changed since this was working was adding my environment with ipykernel, but I'm not sure that's related.

Do you have any ideas?

Best, Dan

run the following command on your machine

ssh -L 7878:x1000c7s1b1n0:7878 kl2.hpc.nrel.gov
Fail to get yarn configuration. internal/modules/cjs/loader.js:638
    throw err;
    ^

Error: Cannot find module 'worker_threads'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:636:15)
    at Function.Module._load (internal/modules/cjs/loader.js:562:25)
    at Module.require (internal/modules/cjs/loader.js:692:17)
    at require (internal/modules/cjs/helpers.js:25:18)
    at /home/dzalkind/.conda-envs/jupyterenv/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:423:2576
    at Object.<anonymous> (/home/dzalkind/.conda-envs/jupyterenv/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:743:8770)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)

[W 2023-12-18 15:59:47.119 ServerApp] A `_jupyter_server_extension_points` function was not found in jupyter_lsp. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[W 2023-12-18 15:59:47.136 ServerApp] A `_jupyter_server_extension_points` function was not found in notebook_shim. Instead, a `_jupyter_server_extension_paths` function was found and will be used for now. This function name will be deprecated in future releases of Jupyter Server.
[I 2023-12-18 15:59:47.138 ServerApp] jupyter_lsp | extension was successfully linked.
[I 2023-12-18 15:59:47.141 ServerApp] jupyter_server_terminals | extension was successfully linked.
[I 2023-12-18 15:59:47.144 ServerApp] jupyterlab | extension was successfully linked.
[I 2023-12-18 15:59:47.652 ServerApp] notebook_shim | extension was successfully linked.
[I 2023-12-18 15:59:47.714 ServerApp] notebook_shim | extension was successfully loaded.
[I 2023-12-18 15:59:47.715 ServerApp] jupyter_lsp | extension was successfully loaded.
[I 2023-12-18 15:59:47.716 ServerApp] jupyter_server_terminals | extension was successfully loaded.
[I 2023-12-18 15:59:47.719 LabApp] JupyterLab extension loaded from /home/dzalkind/.conda-envs/jupyterenv/lib/python3.8/site-packages/jupyterlab
[I 2023-12-18 15:59:47.719 LabApp] JupyterLab application directory is /home/dzalkind/.conda-envs/jupyterenv/share/jupyter/lab
[I 2023-12-18 15:59:47.720 LabApp] Extension Manager is 'pypi'.
[I 2023-12-18 15:59:47.722 ServerApp] jupyterlab | extension was successfully loaded.
[I 2023-12-18 15:59:47.722 ServerApp] Serving notebooks from local directory: /home/dzalkind/Tools/Jupyter/launch_scripts
[I 2023-12-18 15:59:47.722 ServerApp] Jupyter Server 2.12.1 is running at:
[I 2023-12-18 15:59:47.722 ServerApp] http://x1000c7s1b1n0:7878/lab?token=1a2152f17bfd73c0056b3868299c803fca6aef3debd47b41
[I 2023-12-18 15:59:47.722 ServerApp]     http://127.0.0.1:7878/lab?token=1a2152f17bfd73c0056b3868299c803fca6aef3debd47b41
[I 2023-12-18 15:59:47.722 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2023-12-18 15:59:47.726 ServerApp] 

    To access the server, open this file in a browser:
        file:///home/dzalkind/.local/share/jupyter/runtime/jpserver-2542100-open.html
    Or copy and paste one of these URLs:
        http://x1000c7s1b1n0:7878/lab?token=1a2152f17bfd73c0056b3868299c803fca6aef3debd47b41
        http://127.0.0.1:7878/lab?token=1a2152f17bfd73c0056b3868299c803fca6aef3debd47b41
[I 2023-12-18 15:59:47.991 ServerApp] Skipped non-installed server(s): bash-language-server, dockerfile-language-server-nodejs, javascript-typescript-langserver, jedi-language-server, julia-language-server, pyright, python-language-server, python-lsp-server, r-languageserver, sql-language-server, texlab, typescript-language-server, unified-language-server, vscode-css-languageserver-bin, vscode-html-languageserver-bin, vscode-json-languageserver-bin, yaml-language-server
yandthj commented 9 months ago

Hi Dan,

This doesn't look to be an issue with the documentation or scripts, so I'd recommend sending this question as an email to hpc-help@nrel.gov instead. We'll respond with some more in-depth troubleshooting help there.

Thanks!

dzalkind commented 9 months ago

Hi Haley,

I have things running now. It seems like the port was being hogged, either locally or on Kestrel. Changing the port seemed to fix things. Not sure if it's worth noting in the README.

Thanks for the scripts and help!

Best, Dan