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

Deno Jupyter Kernel fails to start #28634

Open
mishushakov opened this issue Mar 26, 2025 · 0 comments
Open

Deno Jupyter Kernel fails to start #28634

mishushakov opened this issue Mar 26, 2025 · 0 comments
Labels
deno jupyter Related to "deno jupyter" subcommand

Comments

@mishushakov
Copy link

mishushakov commented Mar 26, 2025

Version: Deno 2.2.5

After installing the Deno Jupyter Kernel using:

deno jupyter --install

Frequently, I am seeing this error after trying to start the kernel:

Image

Jupyter logs:

Warning "deno jupyter" is unstable and might change in the future.
[I 2025-03-26 13:45:33.599 ServerApp] Kernel started: f57210f9-ba4a-4afa-a028-f67fdb3fd06f
[I 2025-03-26 13:45:33.810 ServerApp] Connecting to kernel f57210f9-ba4a-4afa-a028-f67fdb3fd06f.
[I 2025-03-26 13:45:36.580 ServerApp] Kernel shutdown: f57210f9-ba4a-4afa-a028-f67fdb3fd06f
Client disconnected PeerIdentity(b"\xc4\x9cD\x82|~G\x9d\x9a\x7f\t!\x8f\x86j\x1f")
[W 2025-03-26 13:45:39.177 ServerApp] 404 PATCH /api/sessions/eb92e314-6aeb-4e53-b904-1b8c82778084?1742996739175 (192.168.215.1): Session not found: "Kernel 'f57210f9-ba4a-4afa-a028-f67fdb3fd06f' appears to have been culled or died unexpectedly, invalidating session 'eb92e314-6aeb-4e53-b904-1b8c82778084'. The session has been removed."
[W 2025-03-26 13:45:39.178 ServerApp] wrote error: 'Session not found: "Kernel \'f57210f9-ba4a-4afa-a028-f67fdb3fd06f\' appears to have been culled or died unexpectedly, invalidating session \'eb92e314-6aeb-4e53-b904-1b8c82778084\'. The session has been removed."'
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.12/site-packages/jupyter_server/services/sessions/sessionmanager.py", line 428, in get_session
        model = await self.row_to_model(row)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.12/site-packages/jupyter_server/services/sessions/sessionmanager.py", line 494, in row_to_model
        raise KeyError(msg)
    KeyError: "Kernel 'f57210f9-ba4a-4afa-a028-f67fdb3fd06f' appears to have been culled or died unexpectedly, invalidating session 'eb92e314-6aeb-4e53-b904-1b8c82778084'. The session has been removed."
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.12/site-packages/tornado/web.py", line 1790, in _execute
        result = await result
                 ^^^^^^^^^^^^
      File "/opt/conda/lib/python3.12/site-packages/jupyter_server/auth/decorator.py", line 73, in inner
        return await out
               ^^^^^^^^^
      File "/opt/conda/lib/python3.12/site-packages/jupyter_server/services/sessions/handlers.py", line 142, in patch
        before = await sm.get_session(session_id=session_id)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/opt/conda/lib/python3.12/site-packages/jupyter_server/services/sessions/sessionmanager.py", line 430, in get_session
        raise web.HTTPError(404, "Session not found: %s" % str(e)) from e
    tornado.web.HTTPError: HTTP 404: Not Found (Session not found: "Kernel 'f57210f9-ba4a-4afa-a028-f67fdb3fd06f' appears to have been culled or died unexpectedly, invalidating session 'eb92e314-6aeb-4e53-b904-1b8c82778084'. The session has been removed.")
[W 2025-03-26 13:45:39.181 ServerApp] 404 PATCH /api/sessions/eb92e314-6aeb-4e53-b904-1b8c82778084?1742996739175 (0c4428bd892141198093520e19e48b0e@192.168.215.1) 5.90ms referer=http://localhost:8888/lab/workspaces/auto-l/tree/Untitled3.ipynb

When I start the kernel programmatically via the Jupyter API it will report the state as starting, but it will be stuck in the state forever.

POST 127.0.0.1:8888/api/kernels
Content-Type: application/json

{
  "id": "dde482a0-766b-4cef-92af-a7c2d35f9b4f",
  "name": "Deno",
  "last_activity": "2025-03-26T13:56:47.259231Z",
  "execution_state": "starting",
  "connections": 0
}
{
  "id": "56a74713-8934-4fe8-9eff-29571960e6d3",
  "name": "Deno",
  "last_activity": "2025-03-26T13:58:31.543422Z",
  "execution_state": "starting",
  "connections": 0
}

after 5 seconds

POST 127.0.0.1:8888/api/kernels/9b0a430f-c80c-4259-a37d-d4a4f4d00ff2
{
  "id": "56a74713-8934-4fe8-9eff-29571960e6d3",
  "name": "Deno",
  "last_activity": "2025-03-26T13:58:31.543422Z",
  "execution_state": "starting",
  "connections": 0
}

The execution_state never becomes "idle".
Let me know if there's any way to get logs out of Deno Jupyter Server?

@marvinhagemeister marvinhagemeister added the deno jupyter Related to "deno jupyter" subcommand label Mar 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
deno jupyter Related to "deno jupyter" subcommand
Projects
None yet
Development

No branches or pull requests

2 participants