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

NBClient cannot read from proxied connection from enterprise gateway to notebook #140

Open
teaglebuilt opened this issue Mar 11, 2021 · 1 comment

Comments

@teaglebuilt
Copy link

This issue has started here enterprise gateway conversation.

I am trying to understand why nbclient cannot find the kernel that the notebook is using when executing the notebook.

Right now, I am trying to determine if I need to look at the RemoteKernelManager or the nbclient

@kevin-bates
Copy link
Member

Hi @teaglebuilt,

Access to Enterprise Gateway is available only through a notebook (using classic or lab < 3.0 front-ends) or jupyter_server (using lab >= 3) server that has been properly configured to route kernel discovery and management to the EG server. This is typically done using the --gateway-url CLI option, but can also be configured via the configuration subsystem.

nbclient, despite its name, is not a client of a notebook server, but instead is a direct/thinner application sitting on jupyter_client. So it's more of a sibliing application to notebook (or jupyter_server) and does not have the "plumbing" to leverage the kernel discovery and management mechanisms provided by its web-server siblings. This is why your python_kubernetes kernel that you're able to use from notebook is not found when referenced for nbclient.

nbclient does provide a mechanism for substituting the default KernelManager with a custom kernel manager and, recently (within the last 6 to 9 months or so), work was done such that EG's RemoteKernelManager could be used by applications such as nbclient. However, when using RMK with nbclent, similar configuration information must be provided and a properly configured kernelspec must be locally defined because its use still relies on nbclient's kernel discovery - which only looks locally.

I think we should continue our conversation on the referenced EG issue for now and come back here only if we find something amiss with nbclient - which I don't suspect will be the case.

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants