microsoft / vscode-jupyter-hub

Jupyter Hub Support in VS Code
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-hub
MIT License
9 stars 7 forks source link

Can't connect to remote jupyterhub #62

Closed liudaolunboluo closed 3 months ago

liudaolunboluo commented 4 months ago

I use jupyterHub spawners;i'm sure my username and password can login jupyterhub

Environment data

Expected behaviour

Connect jupyterhub session via vscode jupyterhub extension.

Actual behaviour

Invalid username or password.

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

As described in the doc.

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

``` 15:02:01.553 [error] Failed to start the Jupyter Server Error: Failed to fetch user info, Internal Server Error (500) with message {"status": 500, "message": "error"} > at startServer (/Users/zhangyunfan/.vscode/extensions/ms-toolsai.jupyter-hub-2024.4.100/dist/extension.node.js:67004:9) 15:02:11.988 [error] Timeout waiting for Jupyter Server to start, current status = null 15:02:12.845 [error] SessionManager cannot enumerate kernelSpecs. Specs undefined. 15:02:12.846 [error] Uri verification error Error: Failed to enumeration kernel Specs > at /Users/zhangyunfan/.vscode/extensions/ms-toolsai.jupyter-hub-2024.4.100/dist/extension.node.js:67150:21 ```

liudaolunboluo commented 4 months ago

I should konw the reason this code:

image

Use the user server attribute to determine if the user has any services started But in JupyterHub there is a case where this user has multiple services, and his attribute servers has a value, while server is null:

{
    "kind": "user",
    "name": "admin",
    "admin": true,
    "groups": [],
    "server": null,
    "pending": null,
    "created": "2023-04-17T03:35:54Z",
    "last_activity": "2024-07-25T08:37:01.166163Z",
    "servers": {
        "265": {
            "name": "265",
            "last_activity": "2024-07-25T07:48:46Z",
            "started": "2024-07-25T07:47:05Z",
            "pending": null,
            "ready": true,
            "state": {
                "pod_name": "jupyter-admin--265"
            },
            "url": "/jupyter/user/admin/265/",
            "user_options": {},
            "progress_url": "/jupyter/hub/api/users/admin/servers/265/progress"
        }
    },
    "auth_state": null
}

my jupyterHub Url is :http://jupyterhub.XXX.io/jupyter/user/admin/265/lab?token=xxx '265'is my server name,I want to connect this server,but it doesn't use the server name inside the url

DonJayamanne commented 3 months ago

[error] Failed to start the Jupyter Server Error: Failed to fetch user info, Internal Server Error (500) with message {"status": 500, "message": "error"}

But in JupyterHub there is a case where this user has multiple services, and his attribute servers has a value, while server is null:

Oh thanks, thats useful in hardening this code. However in this intance, thats not whats causing the problem, If you have a look, the error is being loggec at `traceError(`Failed to get user, and the error is nternal Server Error (500) with message {"status": 500, "message": "error"} Basically the HTTP request is failing due to an error on the server side with 500 status code.

DonJayamanne commented 3 months ago

Please can you check the Jupyter Hub logs to see what requests were sent and the errors (generally this will be logged in the terminal when you enable logging for Jupyter Hub)

liudaolunboluo commented 3 months ago

Please can you check the Jupyter Hub logs to see what requests were sent and the errors (generally this will be logged in the terminal when you enable logging for Jupyter Hub)

yes,I see my jupyter log,it's throw excetion,because it start default jupyter server error

but I want to connect other jupyter server,for exmple: I start two jupyter server:default and name "test1" serer,now I can only connect deafult server.

DonJayamanne commented 3 months ago

Thank you very much, Closing this issue in favour of https://github.com/microsoft/vscode-jupyter-hub/issues/39

liudaolunboluo commented 3 months ago

Thank you very much, Closing this issue in favour of #39

Is there a release plan for this requirement?

DonJayamanne commented 3 months ago

Is there a release plan for this requirement?

Unfortunately no, we priority issues based on community feedback (upvotes & the like)