Skip to content

Repeated HTTP 403 errors when launching Jupyter server #14847

Closed
@ayushnoori

Description

@ayushnoori

Environment data

  • VS Code version: 1.84.2
  • Jupyter Extension version: v2023.10.1100000000
  • Python Extension version: v2023.20.0
  • OS: Linux and MacOS
  • Python and/or Anaconda version: XXX
  • Type of virtual environment used: virtualenv
  • Jupyter server running: Local

Description

I launch a Jupyter server with jupyter server --no-browser. Either right after the server successfully launches or after I connect to the kernel from a Notebook using Select Another Kernel > Existing Jupyter Server > Enter the URL of the running Jupyter server, I get a repeated wave of HTTP 403 errors at the terminal like below:

[W 2023-12-04 01:11:31.621 ServerApp] 403 GET /api/kernelspecs?1701670291555 (@127.0.0.1) 12.66ms referer=None
[W 2023-12-04 01:11:31.623 ServerApp] wrote error: 'Forbidden'
    Traceback (most recent call last):
      File "docs/my_venv/lib/python3.9/site-packages/tornado/web.py", line 1784, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "docs/my_venv/lib/python3.9/site-packages/tornado/web.py", line 3278, in wrapper
        url = self.get_login_url()
      File "docs/my_venv/lib/python3.9/site-packages/jupyter_server/base/handlers.py", line 753, in get_login_url
        raise web.HTTPError(403)
    tornado.web.HTTPError: HTTP 403: Forbidden

The error appears when working locally (on MacOS) or when SSH'd into a remote machine (using Linux) using the VS Code Remote Extension. I have tried changing jupyter_server_config.py to no avail:

c.NotebookApp.allow_origin = '*'
# c.NotebookApp.token = ''
c.NotebookApp.open_browser = False
c.NotebookApp.disable_check_xsrf = True

None of the above settings fix the issue. I would be most appreciative for your kind assistance.

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bug

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions