-
Notifications
You must be signed in to change notification settings - Fork 131
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
500 Error when Changing Kernel through Session #297
Comments
I believe more information is required here. What does your request look like? I'm curious where the id When I try changing kernels from within a Notebook configured with NB2KG to Enterprise Gateway (which should be the same behavior), I can successfully do that. However, the REST calls I see are all against Based on your previous issue, I suspect you're attempting to implement kernel switches yourself. Have you studied how Notebook does this? I'm not familiar with pure Notebook operations, but I suspect observations using NB2KG would be the same since NB2KG is really just a kernel manager plugin. As a result, you might try issuing a similar sequence using I would also suggest setting up a parallel environment with Notebook and the NB2KG extension. You can find a docker image here. Although its geared toward Enterprise Gateway, there's no reason it wouldn't just work against JKG. Once this is setup, you can use it as a datapoint for comparing against what you're attempting outside of Notebook. |
I've been using the @jupyterlab/services javascript library to connect to the Kernel Gateway. The library implements the ability to change kernels through the session using a function they call I guess I don't fully understand the intended usecase is for the session api versus the kernel api? It's possible I'm getting things wrong conceptually. |
Yeah, I agree with the confusion between I hoping some of the Kernel Gateway folks chime in here (@parente, @rolweber), but my understanding is that Kernel Gateway's (and, by extension Enterprise Gateway) primary purpose is to support running the kernel closer to the source (i.e., Spark cluster, more performant resources, etc.) - so sessions are not really a focus. This is supported by the fact that NB2KG (the Notebook extension that forwards requests to JKG) only forwards the I'm not really a web person, but it seems like the handlers in JKG would merely forward requests to the underlying Notebook code, so it strikes me as odd that use of |
The session implementation in the notebook server relies (relied?) on sqlite to store session information on disk. In KG, we implemented our own SessionManager that holds all session information in memory. The persistence of session info in a database didn't appear valuable to the use case since all of the in-memory the kernel state is lost whenever a KG shuts down anyway. The 500 error you're seeing hints that the SessionManager API may have changed in the notebook server, and that the implementation here in KG needs to be updated to match. |
OK. Is it possible then that I'm better off just writing my own typescript library to interact with the KG? It seems like the problem is that the frontend library offered by @jupyterlab/services is not connecting with the kernel gateway properly, because it's looking for parts of the API that aren't there. I'm not using the whole library anyways, I don't need things like autocompletion or any of the notebook features. |
If the KG is providing an incompatible API vs notebook, we should fix it here, not require you to create a non-standard client. It requires some debugging, since I'm going on a hunch that it's an API incompatibility causing the problem and not something else. |
@bashterm, I'm not claiming to have cycles to look at this, but it would be helpful if you could provide some insight into the Thank you. |
I'll see what I can do. I've been bogged down lately with some work but hopefully I can work on this friday. |
The kernel gateway returns a 500 error when I try to change the Kernel in the current session.
I'm running the kernel gateway on docker.
Here is the server log:
Any help or advice would be appreciated.
The text was updated successfully, but these errors were encountered: