Skip to content

Fails to connect due to tornado.websocket.WebSocketClosedError #2

@tuxillo

Description

@tuxillo

Hi,

With a very basic setup, that's no oauth, no LDAP, I'm getting the error below. Could it be that there is some sort of timeout? Also, maybe not echo the password in the logs :)

Thanks!

INFO:tornado.access:200 GET /dashboard (192.168.5.103) 4.29ms
INFO:tornado.access:101 GET /kvm (192.168.5.103) 0.72ms
INFO:root:Websocket opened by anonymous
INFO:root:Websocket from anonymous said {"action":"connect","server":"mykvmhost","password":"SECRET","resolution":"1280x960"}
INFO:root:anonymous wants to connect to mykvmhost with res 1280x960
INFO:nojava_ipmi_kvm.kvm:Check if 'http://ipmi.sector.int/' is reachable...
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): ipmi.sector.int:80
DEBUG:urllib3.connectionpool:http://ipmi.sector.int:80 "HEAD / HTTP/1.1" 200 0
INFO:nojava_ipmi_kvm.kvm:The url 'http://ipmi.sector.int/' is reachable.
INFO:nojava_ipmi_kvm.kvm:Starting the Docker container...
INFO:nojava_ipmi_kvm.kvm:Waiting for the Docker container to be up and ready...
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:Starting new HTTP connection (1): localhost:8801
DEBUG:urllib3.connectionpool:http://localhost:8801 "HEAD / HTTP/1.1" 200 0
INFO:nojava_ipmi_kvm.kvm:Docker container is up and running.

INFO:nojava_ipmi_kvm.kvm:Docker container is up and running.
ERROR:tornado.application:Exception in callback functools.partial(<function WebSocketProtocol._run_callback.<locals>.<lambda> at 0x7f145dc28f70>, <Task finished name='Task-17' coro=<KVMHandler.on_message() done, defined at /home/ipmi/s/nojava-ipmi-kvm-server/kvm_handler.py:49> exception=WebSocketClosedError()>)
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tornado/ioloop.py", line 741, in _run_callback
    ret = callback()
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 656, in <lambda>
    self.stream.io_loop.add_future(result, lambda f: f.result())
  File "/home/ipmi/s/nojava-ipmi-kvm-server/kvm_handler.py", line 109, in on_message
    sess = self._current_session = await start_kvm_container(
  File "/usr/local/lib/python3.8/dist-packages/nojava_ipmi_kvm/kvm.py", line 384, in start_kvm_container
    log("Docker container is up and running.")
  File "/usr/local/lib/python3.8/dist-packages/nojava_ipmi_kvm/kvm.py", line 136, in log
    additional_logging(msg, *args, **kwargs)
  File "/home/ipmi/s/nojava-ipmi-kvm-server/kvm_handler.py", line 93, in send_log_message
    self.write_message({"action": "log", "message": msg if len(args) == 0 else msg % args})
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 337, in write_message
    raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError
ERROR:tornado.application:Uncaught exception GET /kvm (192.168.5.103)
HTTPServerRequest(protocol='http', host='nojava-ipmi.sector.int:8080', method='GET', uri='/kvm', version='HTTP/1.1', remote_ip='192.168.5.103')
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/tornado/web.py", line 1704, in _execute
    result = await result
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 278, in get
    await self.ws_connection.accept_connection(self)
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 879, in accept_connection
    await self._accept_connection(handler)
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 962, in _accept_connection
    await self._receive_frame_loop()
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 1116, in _receive_frame_loop
    await self._receive_frame()
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 1207, in _receive_frame
    await handled_future
  File "/usr/local/lib/python3.8/dist-packages/tornado/ioloop.py", line 741, in _run_callback
    ret = callback()
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 656, in <lambda>
    self.stream.io_loop.add_future(result, lambda f: f.result())
  File "/home/ipmi/s/nojava-ipmi-kvm-server/kvm_handler.py", line 109, in on_message
    sess = self._current_session = await start_kvm_container(
  File "/usr/local/lib/python3.8/dist-packages/nojava_ipmi_kvm/kvm.py", line 384, in start_kvm_container
    log("Docker container is up and running.")
  File "/usr/local/lib/python3.8/dist-packages/nojava_ipmi_kvm/kvm.py", line 136, in log
    additional_logging(msg, *args, **kwargs)
  File "/home/ipmi/s/nojava-ipmi-kvm-server/kvm_handler.py", line 93, in send_log_message
    self.write_message({"action": "log", "message": msg if len(args) == 0 else msg % args})
  File "/usr/local/lib/python3.8/dist-packages/tornado/websocket.py", line 337, in write_message
    raise WebSocketClosedError()
tornado.websocket.WebSocketClosedError

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