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

Remote JupyterHub Access returns 404 - Kernel url encoding error #15055

Closed
2 tasks
abgunth opened this issue Jan 22, 2024 · 2 comments
Closed
2 tasks

Remote JupyterHub Access returns 404 - Kernel url encoding error #15055

abgunth opened this issue Jan 22, 2024 · 2 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-remote Applies to remote Jupyter Servers

Comments

@abgunth
Copy link

abgunth commented Jan 22, 2024

Applies To

  • Notebooks (.ipynb files)
  • Interactive Window and/or Cell Scripts (.py files with #%% markers)

What happened?

I am trying to connect to a remote Jupyter Hub using Azure AD authentification with a username format "lastname, firstname".

Authentification via the url https://myremoteserver.com/user/lastname%2C%20firsname/apikey seems to work.
But when trying to connect to the kernel I get a 404 kernel not found with the error log provided below.

It seems to try accessing the kernel using the address https://myremoteserver.com/user/lastname,%20firstname/api/kernels?1705935929291 without encoding the comma in the username.

When I try accessing the kernel via web browser using the corrected URL https://myremoteserver.com/user/lastname%2C%20firstname/api/kernels?1705935929291 the API seems to normally.

NB: Doing the connection procedure with a username without a coma (e.g. formated "lastname") works.

VS Code Version

Version: 1.85.1 Commit: 0ee08df0cf4527e40edc9aa28f4b5bd38bbff2b2 Date: 2023-12-13T09:47:11.635Z Electron: 25.9.7 ElectronBuildId: 25551756 Chromium: 114.0.5735.289 Node.js: 18.15.0 V8: 11.4.183.29-electron.0 OS: Linux x64 6.5.0-14-generic snap

Jupyter Extension Version

v2023.11.1100101639

Jupyter logs

09:05:29.287 [info] Start refreshing Kernel Picker (1705935929287)
09:05:29.382 [error] Error fetching kernels from https://myremoteserver.com/user/lastname, firstname/ (JupyterHub): r [Error]: Invalid response: 404 Not Found
    at Function.create (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1067)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.Rl [as listRunning] (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
    at r.getRunningKernels (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:138:4913)
    at async Promise.all (index 0)
    at nT.listKernelsFromConnection (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:235:21781)
    at ~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:235:20130 {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://myremoteserver.com/user/lastname,%20firstname/api/kernels?1705935929291',
      status: 404,
      statusText: 'Not Found',
      headers: [p [Headers]],
      counter: 0
    }
  },
  traceback: ''
}
09:05:29.384 [error] UniversalRemoteKernelFinder: Failed to get kernels without cache r [Error]: Invalid response: 404 Not Found
    at Function.create (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/node_modules/@jupyterlab/services.js:11:1067)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at Object.Rl [as listRunning] (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/node_modules/@jupyterlab/services.js:11:4507)
    at r.getRunningKernels (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:138:4913)
    at async Promise.all (index 0)
    at nT.listKernelsFromConnection (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:235:21781)
    at ~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:235:20130 {
  response: p [Response] {
    size: 0,
    timeout: 0,
    [Symbol(Body internals)]: { body: [PassThrough], disturbed: true, error: null },
    [Symbol(Response internals)]: {
      url: 'https://myremoteserver.com/user/lastname,%20firstname/api/kernels?1705935929291',
      status: 404,
      statusText: 'Not Found',
      headers: [p [Headers]],
      counter: 0
    }
  },
  traceback: ''
}
09:05:29.384 [error] Jupyter Lab Helper:getKernelSpecs failure:  Error: Poll (@jupyterlab/services:KernelSpecMan<username>er#specs) is disposed.
    at v.dispose (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/node_modules/@jupyterlab/services.js:11:10935)
    at ni.dispose (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/node_modules/@jupyterlab/services.js:11:29299)
    at r.dispose (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:138:4517)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async Promise.all (index 0)
    at nT.listKernelsFromConnection (~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:235:22644)
    at ~/.vscode/extensions/ms-toolsai.jupyter-2023.11.1100101639-linux-x64/dist/extension.node.js:235:20130
09:05:29.407 [info] End refreshing Kernel Picker (1705935929287)

Coding Language and Runtime Version

No response

Language Extension Version (if applicable)

No response

Anaconda Version (if applicable)

No response

Running Jupyter locally or remotely?

Remote

@abgunth abgunth added the bug Issue identified by VS Code Team member as probable bug label Jan 22, 2024
@DonJayamanne
Copy link
Contributor

DonJayamanne commented Jan 28, 2024

@abgunth thanks for filing this issue and sorry you are running into this.
Are you using JupyterHub extension? if so, what version of Jupyter Hub extension do you have installed?

I am trying to connect to a remote Jupyter Hub using Azure AD authentification with a username format "lastname, firstname".

Which one of the following options are you using to connect to this server?

Screenshot 2024-01-29 at 01 35 16

@DonJayamanne DonJayamanne added info-needed Issue requires more information from poster notebook-remote Applies to remote Jupyter Servers labels Jan 28, 2024
@DonJayamanne DonJayamanne self-assigned this Jan 28, 2024
@VSCodeTriageBot
Copy link
Collaborator

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 6, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 24, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug info-needed Issue requires more information from poster notebook-remote Applies to remote Jupyter Servers
Projects
None yet
Development

No branches or pull requests

3 participants