question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Failed to connect jupyterhub.

See original GitHub issue

Environment data

Build of Visual Studio Code - Insiders: 1.62.0-insider Build of python-insider: v2021.12.1409662628-dev Build of jupyter-release: v2021.10.1001408933 Build of pylance-release: v2021.10.3 Build of jupyter Keymap-release: v1.0.0 Build of jupyter Notebook Renderers-release: v1.0.3

Expected behaviour

  1. Windows install instructions a. Install Docker Desktop onto a machine b. Create a folder with a file ‘Dockerfile’ in it. c. Mark the file to look like so:
ARG BASE_CONTAINER=jupyterhub/jupyterhub
FROM $BASE_CONTAINER

USER root

USER $NB_UID
a. From a command prompt (in the same folder as the Dockerfile), run docker build -t jupyterhubcontainer:1.0 .
b. Run docker container create --name jupyterhub jupyterhubcontainer:1.0 jupyterhub
c. From the docker desktop app, start the jupyterhub container.
d. From the docker desktop app, run the CLI
  1. From the new command prompt, run adduser testuser
  2. Follow the series of prompts to add a password for this user
  3. Open VS code
  4. Open a folder with a python file in it.
  5. Run the Python: Specify local or remote Jupyter server for connections command.
  6. Pick ‘Existing’
  7. Enter http://localhost:8000 (assuming the jupyter hub container was successful in launching)
  8. Reload VS code and reopen this folder. Run a cell in a python file.

Actual behavior

An error pops up when run cell image image

Jupyter Hub log

[I 2021-11-02 08:47:35.457 JupyterHub app:2459] Running JupyterHub version 1.4.2
[I 2021-11-02 08:47:35.458 JupyterHub app:2489] Using Authenticator: jupyterhub.auth.PAMAuthenticator-1.4.2
[I 2021-11-02 08:47:35.458 JupyterHub app:2489] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-1.4.2
[I 2021-11-02 08:47:35.458 JupyterHub app:2489] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-1.4.2
[I 2021-11-02 08:47:35.470 JupyterHub app:1579] Writing cookie_secret to /srv/jupyterhub/jupyterhub_cookie_secret
[I 2021-11-02 08:47:35.491 alembic.runtime.migration migration:164] Context impl SQLiteImpl.
[I 2021-11-02 08:47:35.492 alembic.runtime.migration migration:167] Will assume non-transactional DDL.
[I 2021-11-02 08:47:35.551 alembic.runtime.migration migration:556] Running stamp_revision  -> 4dc2d5a8c53c
[I 2021-11-02 08:47:36.085 JupyterHub proxy:497] Generating new CONFIGPROXY_AUTH_TOKEN
[W 2021-11-02 08:47:36.088 JupyterHub app:1808] No admin users, admin interface will be unavailable.
[W 2021-11-02 08:47:36.088 JupyterHub app:1809] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2021-11-02 08:47:36.089 JupyterHub app:1838] Not using allowed_users. Any authenticated user will be allowed.
[I 2021-11-02 08:47:36.157 JupyterHub app:2526] Initialized 0 spawners in 0.002 seconds
[W 2021-11-02 08:47:36.161 JupyterHub proxy:699] Running JupyterHub without SSL.  I hope there is SSL termination happening somewhere else...
[I 2021-11-02 08:47:36.161 JupyterHub proxy:703] Starting proxy @ http://:8000
[I 2021-11-02 08:47:37.068 JupyterHub app:2774] Hub API listening on http://127.0.0.1:8081/hub/
[I 2021-11-02 08:47:37.076 JupyterHub proxy:347] Checking routes
[I 2021-11-02 08:47:37.077 JupyterHub proxy:432] Adding route for Hub: / => http://127.0.0.1:8081
[I 2021-11-02 08:47:37.086 JupyterHub app:2849] JupyterHub is now running at http://:8000
[I 2021-11-02 08:52:37.089 JupyterHub proxy:347] Checking routes
[I 2021-11-02 08:57:37.090 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:02:37.094 JupyterHub proxy:347] Checking routes
[C 2021-11-02 09:03:57.132 JupyterHub app:2937] Received signal SIGTERM, initiating shutdown...
[I 2021-11-02 09:03:57.132 JupyterHub app:2578] Cleaning up single-user servers...
[I 2021-11-02 09:03:57.133 JupyterHub proxy:772] Cleaning up proxy[10]...
[I 2021-11-02 09:03:57.133 JupyterHub app:2610] ...done
[I 2021-11-02 09:03:58.755 JupyterHub app:2459] Running JupyterHub version 1.4.2
[I 2021-11-02 09:03:58.756 JupyterHub app:2489] Using Authenticator: jupyterhub.auth.PAMAuthenticator-1.4.2
[I 2021-11-02 09:03:58.756 JupyterHub app:2489] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-1.4.2
[I 2021-11-02 09:03:58.756 JupyterHub app:2489] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-1.4.2
[I 2021-11-02 09:03:58.769 JupyterHub app:1534] Loading cookie_secret from /srv/jupyterhub/jupyterhub_cookie_secret
[I 2021-11-02 09:03:58.794 JupyterHub proxy:497] Generating new CONFIGPROXY_AUTH_TOKEN
[W 2021-11-02 09:03:58.795 JupyterHub app:1808] No admin users, admin interface will be unavailable.
[W 2021-11-02 09:03:58.796 JupyterHub app:1809] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2021-11-02 09:03:58.796 JupyterHub app:1838] Not using allowed_users. Any authenticated user will be allowed.
[I 2021-11-02 09:03:58.851 JupyterHub app:2526] Initialized 0 spawners in 0.002 seconds
[W 2021-11-02 09:03:58.854 JupyterHub proxy:699] Running JupyterHub without SSL.  I hope there is SSL termination happening somewhere else...
[I 2021-11-02 09:03:58.854 JupyterHub proxy:703] Starting proxy @ http://:8000
[I 2021-11-02 09:03:59.784 JupyterHub app:2774] Hub API listening on http://127.0.0.1:8081/hub/
[I 2021-11-02 09:03:59.793 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:03:59.793 JupyterHub proxy:432] Adding route for Hub: / => http://127.0.0.1:8081
[I 2021-11-02 09:03:59.800 JupyterHub app:2849] JupyterHub is now running at http://:8000
[I 2021-11-02 09:08:59.803 JupyterHub proxy:347] Checking routes
[C 2021-11-02 09:12:36.079 JupyterHub app:2937] Received signal SIGTERM, initiating shutdown...
[I 2021-11-02 09:12:36.079 JupyterHub app:2578] Cleaning up single-user servers...
[I 2021-11-02 09:12:36.079 JupyterHub proxy:772] Cleaning up proxy[11]...
[I 2021-11-02 09:12:36.080 JupyterHub app:2610] ...done
08:47:36.845 [ConfigProxy] info: Proxying http://*:8000 to (no default)
08:47:36.848 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
08:47:37.066 [ConfigProxy] info: 200 GET /api/routes 
08:47:37.075 [ConfigProxy] info: 200 GET /api/routes 
08:47:37.081 [ConfigProxy] info: Adding route / -> http://127.0.0.1:8081
08:47:37.082 [ConfigProxy] info: Route added / -> http://127.0.0.1:8081
08:47:37.083 [ConfigProxy] info: 201 POST /api/routes/ 
08:52:37.088 [ConfigProxy] info: 200 GET /api/routes 
08:57:37.090 [ConfigProxy] info: 200 GET /api/routes 
09:02:37.093 [ConfigProxy] info: 200 GET /api/routes 
09:03:57.135 [ConfigProxy] warn: Terminated
09:03:59.651 [ConfigProxy] info: Proxying http://*:8000 to (no default)
09:03:59.654 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
09:03:59.782 [ConfigProxy] info: 200 GET /api/routes 
09:03:59.791 [ConfigProxy] info: 200 GET /api/routes 
09:03:59.796 [ConfigProxy] info: Adding route / -> http://127.0.0.1:8081
09:03:59.797 [ConfigProxy] info: Route added / -> http://127.0.0.1:8081
09:03:59.798 [ConfigProxy] info: 201 POST /api/routes/ 
09:08:59.802 [ConfigProxy] info: 200 GET /api/routes 
09:12:36.082 [ConfigProxy] warn: Terminated
09:12:38.485 [ConfigProxy] info: Proxying http://*:8000 to (no default)
09:12:38.488 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
09:12:38.510 [ConfigProxy] info: 200 GET /api/routes 
09:12:38.517 [ConfigProxy] info: 200 GET /api/routes 
09:12:38.524 [ConfigProxy] info: Adding route / -> http://127.0.0.1:8081
09:12:38.525 [ConfigProxy] info: Route added / -> http://127.0.0.1:8081
09:12:38.526 [ConfigProxy] info: 201 POST /api/routes/ 
09:16:56.014 [ConfigProxy] warn: Terminated
09:16:58.436 [ConfigProxy] info: Proxying http://*:8000 to (no default)
09:16:58.439 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
09:16:58.495 [ConfigProxy] info: 200 GET /api/routes 
09:16:58.501 [ConfigProxy] info: 200 GET /api/routes 
09:16:58.507 [ConfigProxy] info: Adding route / -> http://127.0.0.1:8081
09:16:58.508 [ConfigProxy] info: Route added / -> http://127.0.0.1:8081
09:16:58.510 [ConfigProxy] info: 201 POST /api/routes/ 
09:21:58.518 [ConfigProxy] info: 200 GET /api/routes 
09:26:58.514 [ConfigProxy] info: 200 GET /api/routes 
09:31:58.515 [ConfigProxy] info: 200 GET /api/routes 
09:36:58.515 [ConfigProxy] info: 200 GET /api/routes 
09:41:58.514 [ConfigProxy] info: 200 GET /api/routes 
09:46:58.515 [ConfigProxy] info: 200 GET /api/routes 
09:51:58.514 [ConfigProxy] info: 200 GET /api/routes 
09:56:58.513 [ConfigProxy] info: 200 GET /api/routes 
[I 2021-11-02 09:12:37.580 JupyterHub app:2459] Running JupyterHub version 1.4.2
[I 2021-11-02 09:12:37.580 JupyterHub app:2489] Using Authenticator: jupyterhub.auth.PAMAuthenticator-1.4.2
[I 2021-11-02 09:12:37.581 JupyterHub app:2489] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-1.4.2
[I 2021-11-02 09:12:37.581 JupyterHub app:2489] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-1.4.2
[I 2021-11-02 09:12:37.591 JupyterHub app:1534] Loading cookie_secret from /srv/jupyterhub/jupyterhub_cookie_secret
[I 2021-11-02 09:12:37.614 JupyterHub proxy:497] Generating new CONFIGPROXY_AUTH_TOKEN
[W 2021-11-02 09:12:37.615 JupyterHub app:1808] No admin users, admin interface will be unavailable.
[W 2021-11-02 09:12:37.615 JupyterHub app:1809] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2021-11-02 09:12:37.616 JupyterHub app:1838] Not using allowed_users. Any authenticated user will be allowed.
[I 2021-11-02 09:12:37.669 JupyterHub app:2526] Initialized 0 spawners in 0.002 seconds
[W 2021-11-02 09:12:37.672 JupyterHub proxy:699] Running JupyterHub without SSL.  I hope there is SSL termination happening somewhere else...
[I 2021-11-02 09:12:37.673 JupyterHub proxy:703] Starting proxy @ http://:8000
[I 2021-11-02 09:12:38.512 JupyterHub app:2774] Hub API listening on http://127.0.0.1:8081/hub/
[I 2021-11-02 09:12:38.518 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:12:38.518 JupyterHub proxy:432] Adding route for Hub: / => http://127.0.0.1:8081
[I 2021-11-02 09:12:38.528 JupyterHub app:2849] JupyterHub is now running at http://:8000
[C 2021-11-02 09:16:56.013 JupyterHub app:2937] Received signal SIGTERM, initiating shutdown...
[I 2021-11-02 09:16:56.013 JupyterHub app:2578] Cleaning up single-user servers...
[I 2021-11-02 09:16:56.013 JupyterHub proxy:772] Cleaning up proxy[12]...
[I 2021-11-02 09:16:56.014 JupyterHub app:2610] ...done
[I 2021-11-02 09:16:57.562 JupyterHub app:2459] Running JupyterHub version 1.4.2
[I 2021-11-02 09:16:57.562 JupyterHub app:2489] Using Authenticator: jupyterhub.auth.PAMAuthenticator-1.4.2
[I 2021-11-02 09:16:57.562 JupyterHub app:2489] Using Spawner: jupyterhub.spawner.LocalProcessSpawner-1.4.2
[I 2021-11-02 09:16:57.562 JupyterHub app:2489] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-1.4.2
[I 2021-11-02 09:16:57.576 JupyterHub app:1534] Loading cookie_secret from /srv/jupyterhub/jupyterhub_cookie_secret
[I 2021-11-02 09:16:57.609 JupyterHub proxy:497] Generating new CONFIGPROXY_AUTH_TOKEN
[W 2021-11-02 09:16:57.610 JupyterHub app:1808] No admin users, admin interface will be unavailable.
[W 2021-11-02 09:16:57.611 JupyterHub app:1809] Add any administrative users to `c.Authenticator.admin_users` in config.
[I 2021-11-02 09:16:57.611 JupyterHub app:1838] Not using allowed_users. Any authenticated user will be allowed.
[I 2021-11-02 09:16:57.662 JupyterHub app:2526] Initialized 0 spawners in 0.002 seconds
[W 2021-11-02 09:16:57.665 JupyterHub proxy:699] Running JupyterHub without SSL.  I hope there is SSL termination happening somewhere else...
[I 2021-11-02 09:16:57.665 JupyterHub proxy:703] Starting proxy @ http://:8000
[I 2021-11-02 09:16:58.497 JupyterHub app:2774] Hub API listening on http://127.0.0.1:8081/hub/
[I 2021-11-02 09:16:58.503 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:16:58.504 JupyterHub proxy:432] Adding route for Hub: / => http://127.0.0.1:8081
[I 2021-11-02 09:16:58.512 JupyterHub app:2849] JupyterHub is now running at http://:8000
[I 2021-11-02 09:21:58.519 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:26:58.516 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:31:58.515 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:36:58.515 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:41:58.514 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:46:58.516 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:51:58.515 JupyterHub proxy:347] Checking routes
[I 2021-11-02 09:56:58.516 JupyterHub proxy:347] Checking routes
10:01:58.515 [ConfigProxy] info: 200 GET /api/routes 
[I 2021-11-02 10:01:58.515 JupyterHub proxy:347] Checking routes
10:06:58.514 [ConfigProxy] info: 200 GET /api/routes 
[I 2021-11-02 10:06:58.514 JupyterHub proxy:347] Checking routes

Jupyter log

Info 2021-11-02 10:03:44: Experimentation service retrieved: [object Object]
User belongs to experiment group 'jupyterTest'
User belongs to experiment group 'jupyterEnhancedDataViewer'
Info 2021-11-02 10:03:45: Experiment status for python is {"enabled":true,"optInto":[],"optOutFrom":[]}
Info 2021-11-02 10:03:49: Process Execution: > C:\ProgramData\Anaconda3\python.exe -c "import notebook"
> C:\ProgramData\Anaconda3\python.exe -c "import notebook"
Info 2021-11-02 10:03:49: Process Execution: > C:\ProgramData\Anaconda3\python.exe -c "import jupyter"
> C:\ProgramData\Anaconda3\python.exe -c "import jupyter"
Info 2021-11-02 10:03:50: Process Execution: > C:\ProgramData\Anaconda3\python.exe -m jupyter kernelspec --version
> C:\ProgramData\Anaconda3\python.exe -m jupyter kernelspec --version
Info 2021-11-02 10:03:55: Checking for server existence.
Info 2021-11-02 10:03:55: Checking for server usability.
Info 2021-11-02 10:03:55: Starting notebook server.
Info 2021-11-02 10:03:55: Connecting to history server
Info 2021-11-02 10:03:55: Creating jupyter server: 264537c7-fd7b-451f-99e0-68cc2670f317
Error 2021-11-02 10:04:13: findKernel crashed [h [FetchError]: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:335466)
	at ClientRequest.emit (events.js:315:20)
	at Socket.socketErrorListener (_http_client.js:469:9)
	at Socket.emit (events.js:315:20)
	at emitErrorNT (internal/streams/destroy.js:106:8)
	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
	at processTicksAndRejections (internal/process/task_queues.js:80:21)] {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}
Info 2021-11-02 10:04:13: Find remote kernel spec, Class name = y, completed in 17892ms, has a falsy return value, Arg 1: undefined, Arg 2: {"type":"jupyter","baseUrl":"http://127.0.0.1:8081/","token":"null","hostName":"127.0.0.1","localLaunch":false,"valid":true,"displayName":"http://127.0.0.1:8081/?token=null","rootDirectory":"","url":"http://127.0.0.1:8081"}, Arg 3: undefined, Arg 4: <argument cannot be serialized for logging>, Return Value: undefined
Info 2021-11-02 10:04:13: Connecting to process for history server
Info 2021-11-02 10:04:13: Connecting server 264537c7-fd7b-451f-99e0-68cc2670f317 kernelSpec unknown
Connecting to Jupyter server at http://127.0.0.1:8081/
Error 2021-11-02 10:04:13: Failed to connect to server [h [FetchError]: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:335466)
	at ClientRequest.emit (events.js:315:20)
	at Socket.socketErrorListener (_http_client.js:469:9)
	at Socket.emit (events.js:315:20)
	at emitErrorNT (internal/streams/destroy.js:106:8)
	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
	at processTicksAndRejections (internal/process/task_queues.js:80:21)] {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}
Info 2021-11-02 10:04:13: Killing server because of error FetchError: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
Info 2021-11-02 10:04:13: Disposing HostJupyterServer
Info 2021-11-02 10:04:13: Shutting down notebooks for 264537c7-fd7b-451f-99e0-68cc2670f317
Info 2021-11-02 10:04:13: Shut down session manager : undefined
Info 2021-11-02 10:04:13: Shutdown server - dispose conn info
Info 2021-11-02 10:04:13: Finished disposing HostJupyterServer
Error 2021-11-02 10:04:13: Error loading notebook controllers [o [Error]: 
	at new o (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:45228)
	at Function.from (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:45318)
	at c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:102:738467
	at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:335466)
	at ClientRequest.emit (events.js:315:20)
	at Socket.socketErrorListener (_http_client.js:469:9)
	at Socket.emit (events.js:315:20)
	at emitErrorNT (internal/streams/destroy.js:106:8)
	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
	at processTicksAndRejections (internal/process/task_queues.js:80:21)] {
  category: 'unknown',
  originalException: [h [FetchError]: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
  	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:335466)
  	at ClientRequest.emit (events.js:315:20)
  	at Socket.socketErrorListener (_http_client.js:469:9)
  	at Socket.emit (events.js:315:20)
  	at emitErrorNT (internal/streams/destroy.js:106:8)
  	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
  	at processTicksAndRejections (internal/process/task_queues.js:80:21)] {
    type: 'system',
    errno: 'ECONNREFUSED',
    code: 'ECONNREFUSED'
  }
}
Error 2021-11-02 10:04:13: DataScience Error [o [Error]: 
	at new o (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:45228)
	at Function.from (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:45318)
	at c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:102:738467
	at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:335466)
	at ClientRequest.emit (events.js:315:20)
	at Socket.socketErrorListener (_http_client.js:469:9)
	at Socket.emit (events.js:315:20)
	at emitErrorNT (internal/streams/destroy.js:106:8)
	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
	at processTicksAndRejections (internal/process/task_queues.js:80:21)] {
  category: 'unknown',
  originalException: [h [FetchError]: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
  	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:335466)
  	at ClientRequest.emit (events.js:315:20)
  	at Socket.socketErrorListener (_http_client.js:469:9)
  	at Socket.emit (events.js:315:20)
  	at emitErrorNT (internal/streams/destroy.js:106:8)
  	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
  	at processTicksAndRejections (internal/process/task_queues.js:80:21)] {
    type: 'system',
    errno: 'ECONNREFUSED',
    code: 'ECONNREFUSED'
  }
}
Error 2021-11-02 10:04:13: Failed to find & set preferred controllers [o [Error]: 
	at new o (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:45228)
	at Function.from (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:45318)
	at c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:102:738467
	at processTicksAndRejections (internal/process/task_queues.js:93:5)

FetchError: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:335466)
	at ClientRequest.emit (events.js:315:20)
	at Socket.socketErrorListener (_http_client.js:469:9)
	at Socket.emit (events.js:315:20)
	at emitErrorNT (internal/streams/destroy.js:106:8)
	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
	at processTicksAndRejections (internal/process/task_queues.js:80:21)] {
  category: 'unknown',
  originalException: [h [FetchError]: request to http://127.0.0.1:8081/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8081
  	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2021.10.1001408933\out\client\extension.js:16:335466)
  	at ClientRequest.emit (events.js:315:20)
  	at Socket.socketErrorListener (_http_client.js:469:9)
  	at Socket.emit (events.js:315:20)
  	at emitErrorNT (internal/streams/destroy.js:106:8)
  	at emitErrorCloseNT (internal/streams/destroy.js:74:3)
  	at processTicksAndRejections (internal/process/task_queues.js:80:21)] {
    type: 'system',
    errno: 'ECONNREFUSED',
    code: 'ECONNREFUSED'
  }
}
Info 2021-11-02 10:04:14: Creating daemon pool for C:\ProgramData\Anaconda3\python.exe with env variables count 63
Info 2021-11-02 10:04:14: Process Execution: > C:\ProgramData\Anaconda3\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-11-02 10:04:14: Process Execution: > C:\ProgramData\Anaconda3\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-11-02 10:04:14: Process Execution: > C:\ProgramData\Anaconda3\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
> C:\ProgramData\Anaconda3\python.exe -m vscode_datascience_helpers.daemon --daemon-module=vscode_datascience_helpers.jupyter_daemon -v
Info 2021-11-02 10:04:14: Registering dummy command feature

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:12 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
ttSpacecommented, May 31, 2022

@IanMatthewHuff I can repro in today’s build.

Build of Visual Studio Code - Insiders: 1.68.0-insider(user setup) 
Build of python-insider: v2022.7.11461005
Build of jupyter-insider: v2022.5.1001491011
Build of pylance-insider: v2022.5.3 
Build of jupyter Notebook Renderers: v1.0.7
Build of jupyter Keymap: v1.0.0 

image

Logs

Output for Jupyter in the Output panel

warn 7:39:1.75: Uri verification error [h [FetchError]: request to http://localhost:8000/hub/api failed, reason: connect ECONNREFUSED 127.0.0.1:8000
	at ClientRequest.<anonymous> (c:\Users\vting\.vscode-insiders\extensions\ms-toolsai.jupyter-2022.5.1001491011\out\extension.node.js:2:3847740)
	at ClientRequest.emit (node:events:390:28)
	at Socket.socketErrorListener (node:_http_client:447:9)
	at Socket.emit (node:events:390:28)
	at emitErrorNT (node:internal/streams/destroy:157:8)
	at emitErrorCloseNT (node:internal/streams/destroy:122:3)
	at processTicksAndRejections (node:internal/process/task_queues:83:21)] {
  type: 'system',
  errno: 'ECONNREFUSED',
  code: 'ECONNREFUSED'
}

0reactions
DonJayamannecommented, Dec 22, 2022

Thanks for providing the requested information and verifying the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Jupyter Notebook Kernel Not Connecting: Connection Failed
With Regards, I have installed Anaconda and then launch Jupyter Notebook .Being a noob I am trying printing my name in it I...
Read more >
Troubleshooting — JupyterHub 3.1.0 documentation
Launching Jupyter Notebooks to run as an externally managed JupyterHub service with the jupyterhub-singleuser command returns a JUPYTERHUB_API_TOKEN error#.
Read more >
Anaconda jupyter notebook "connection failed" error
I'm facing the same error after re-installing Anaconda and found the solution here: https://github.com/jupyter/notebook/issues/4909.
Read more >
Unable to connect to JupyterHub - Google Groups
Reason: Error reading from remote server. and nothing is shown in the jupyterhub.log file. It seems that apache can't connect to jupyterhub.
Read more >
Connection to the notebook server could not be established........
I tried reserching some more on this error and found a very helpful advice from Jupyter Notebook Kernel Not Connecting: Connection Failed ·...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found