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

Cannot use external kernal via allow_external_kernels and kernels.external_connection_dir #385

Open
bldrvnlw opened this issue Feb 6, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@bldrvnlw
Copy link

bldrvnlw commented Feb 6, 2024

Description

And external program is serving a kernel (in my case using the xeus code) and jupyverse is started with the options

 --set "kernels.external_connection_dir=<directory_containing_connection.json> --set "kernels.allow_external_kernels=true"

In the jupyverse webserver the kernel is not visible

Note: it maybe that that I'm misunderstanding the intention of the kernels.allow_external_kernels and kernels.external_connection_dir options. This has also been discussed on the Jupyter Discourse Forym

AFAICT there is code to pickup and existing connection.json file but this does not configure a connectable kernel in the web interface.

Reproduce

  1. Start an external kernel with a connection.json file e.g. :
{
	"transport": "tcp",
        "ip": "127.0.0.1",
	"control_port": 55684,
	"shell_port":  60315,
	"stdin_port":  55844,
	"iopub_port":  52554,
	"hb_port":  63106,
	"signature_scheme": "hmac-sha256",
	"key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
	"kernel_name": "MyKernel"
}
  1. Start jupyverse pointing to the directory containing this kernel
jupyverse.exe" --set "kernels.external_connection_dir=<connection.json_dir>" --set "kernels.allow_external_kernels=true" --port=8800

Expected behavior

Kernel MyKernel will be an option in the web interface

Context

  • Operating System and version: Windows 11
  • Browser and version: Firefox 122.0 (64-bit)
  • Jupyter Server version: 0.4.2

I added some logger.info statements to check that the connection.json file was being read - see the ouput lines with ** below

Command Line Output
```
[2024-02-06 09:20:13,172 INFO] Running in development mode
[2024-02-06 09:20:13,368 INFO] Starting application
[2024-02-06 09:20:18,112 INFO] Scanning kernel config in D:\TempProj\DevBundle\Jupyter\install\Debug\external_kernels\ManiVault **
[2024-02-06 09:20:18,147 INFO] Processing connection files
[2024-02-06 09:20:18,147 INFO] Processing file at path D:\TempProj\DevBundle\Jupyter\install\Debug\external_kernels\ManiVault\connection.json **
[2024-02-06 09:20:18,148 INFO] Adding kernel : MyKernel **
[2024-02-06 09:20:18,269 INFO]
[2024-02-06 09:20:18,269 INFO] To access the server, copy and paste this URL:
[2024-02-06 09:20:18,269 INFO] http://127.0.0.1:8800/?token=5c56ca0a7a474549afc3fcc3b88f6944
[2024-02-06 09:20:18,269 INFO]
[2024-02-06 09:20:18,380 INFO] Started server process [49084]
[2024-02-06 09:20:18,380 INFO] Uvicorn running on http://127.0.0.1:8800 (Press CTRL+C to quit)
```
Browser Output
MyKernel is not visible in the select kernel options
@bldrvnlw bldrvnlw added the bug Something isn't working label Feb 6, 2024
Copy link

welcome bot commented Feb 6, 2024

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! 🎉

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

No branches or pull requests

1 participant