Skip to content

hass_pyscript_kernel: unable to connect to host localhost:8123 #791

@javixeneize

Description

@javixeneize

Hi

When running a pyscript in a jupyter notebook, i have this error

hass_pyscript_kernel: unable to connect to host localhost:8123 (Multiple exceptions: [Errno 111] Connect call failed ('::1', 8123, 0, 0), [Errno 111] Connect call failed ('127.0.0.1', 8123))

After 5 attempts, it tries to connect to the kernel and it gives a 404

[W 2025-12-11 16:59:33.825 ServerApp] AsyncIOLoopKernelRestarter: restart failed
[W 2025-12-11 16:59:33.826 ServerApp] Kernel 77121d2e-c4b0-4906-a4bf-64c0bb7f1877 died, removing from map.
[W 2025-12-11 16:59:42.894 ServerApp] Timeout waiting for kernel_info reply from 77121d2e-c4b0-4906-a4bf-64c0bb7f1877
[I 2025-12-11 16:59:42.897 ServerApp] Connecting to kernel 77121d2e-c4b0-4906-a4bf-64c0bb7f1877.
[W 2025-12-11 16:59:42.905 ServerApp] 404 GET /api/hassio_ingress/uDfRCa8UO09byNhjXUZI03IGlS1FHCRNgOPhLsjXDYY/api/kernels/77121d2e-c4b0-4906-a4bf-64c0bb7f1877/channels?session_id=9075f8b2-3ba2-4554-aa11-220a5a9b10e4 (172.30.32.2): Kernel does not exist: 77121d2e-c4b0-4906-a4bf-64c0bb7f1877

I think the problem is jupyter runs as a container and cant resolve home assistant as localhost, but i have no idea where to change that configuration

Any suggestion?

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions