Skip to content

Error in asyncio client.py  #87

@Ben-Herz

Description

@Ben-Herz

We run jupyterhub-ssh in a jupyterhub 4.1.5 Docker container

When we try to connect, we get the following error in the debug output and the message closed by remote host:

root@jupyterhub:/opt/jupyterhub_ssh# python -m jupyterhub_ssh --debug
[JupyterHubSSH] Looking for jupyterhub_ssh_config in /opt/jupyterhub_ssh
[JupyterHubSSH] Loaded config file: /opt/jupyterhub_ssh/jupyterhub_ssh_config.py
[asyncssh] Creating SSH listener on port 8022
[asyncssh] [conn=0] Accepted SSH client connection
[asyncssh] [conn=0] Local address: ..., port 8022
[asyncssh] [conn=0] Peer address: ..., port *****
[asyncssh] [conn=0] Sending version SSH-2.0-AsyncSSH_2.18.0
[asyncssh] [conn=0] Received version SSH-2.0-OpenSSH_for_Windows_9.5
[asyncssh] [conn=0] Requesting key exchange
[asyncssh] [conn=0] Received key exchange request
[asyncssh] [conn=0] Beginning key exchange
[asyncssh] [conn=0] Completed key exchange
[asyncssh] [conn=0] Beginning auth for user ****
[asyncssh] [conn=0] Trying keyboard-interactive auth
[asyncssh] [conn=0] Trying keyboard-interactive auth
[asyncssh] [conn=0] Auth for user **** succeeded
[asyncssh] [conn=0] Sending server host keys disabled
[asyncssh] [conn=0, chan=0] Set write buffer limits: low-water=16384, high-water=65536
[asyncssh] [conn=0, chan=0] New SSH session requested
[asyncssh] [conn=0, chan=0] Terminal type: xterm-256color
[asyncssh] [conn=0, chan=0] Terminal size: 120x30 (640x480 pixels)
[asyncssh] [conn=0, chan=0] PTY created
[asyncssh] [conn=0, chan=0] Interactive shell requested
[asyncssh] [conn=0, chan=0] Uncaught exception
Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/asyncssh/connection.py", line 1088, in _reap_task
task.result()
File "/usr/local/lib/python3.10/dist-packages/jupyterhub_ssh/init.py", line 155, in _handle_client
async with ClientSession() as client, Terminado(
File "/usr/local/lib/python3.10/dist-packages/jupyterhub_ssh/terminado.py", line 27, in aenter
self.ws = await websockets.connect(str(ws_url), extra_headers=self.headers)
File "/usr/local/lib/python3.10/dist-packages/websockets/asyncio/client.py", line 442, in await_impl
self.connection = await self.create_connection()
File "/usr/local/lib/python3.10/dist-packages/websockets/asyncio/client.py", line 368, in create_connection
_, connection = await loop.create_connection(factory, **kwargs)
TypeError: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers'
[asyncssh] [conn=0, chan=0] Closing channel due to connection close
[asyncssh] [conn=0, chan=0] Channel closed: BaseEventLoop.create_connection() got an unexpected keyword argument 'extra_headers'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions