Story:
Loaded a few files in the morning to print during the day. Printed a couple of keycaps in the morning then left to do things for a couple hours. Came back tried to start one of the models i’d already uploaded but it was disconnecting constantly. This made pressing the buttons quite hard. So I went out (printer is in my shed connected via Ethernet not wifi) with the files on the card, pressed print and it worked.
Lots of turn it off and on again, eventually i get “Cannot connect to Moonraker” go see the log file. Great a place for answers. Output below.
Technical:
2026-09-03 08:05:01,832 [web.py:send_error()] - Uncaught exception in write_error
Traceback (most recent call last):
File “/home/sovol/moonraker/moonraker/components/application.py”, line 700, in _process_http_request
result = await self.api_defintion.request(
File “/home/sovol/moonraker/moonraker/components/klippy_connection.py”, line 617, in request
return await self._request_standard(web_request)
File “/home/sovol/moonraker/moonraker/components/klippy_connection.py”, line 711, in _request_standard
return await base_request.wait(timeout)
File “/home/sovol/moonraker/moonraker/components/klippy_connection.py”, line 822, in wait
return await asyncio.wait_for(asyncio.shield(self._fut), to)
File “/usr/lib/python3.9/asyncio/tasks.py”, line 481, in wait_for
return fut.result()
moonraker.utils.exceptions.ServerError:
Printer is not ready
The klippy host software is attempting to connect. Please
retry in a few moments.The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File “/home/sovol/moonraker-env/lib/python3.9/site-packages/tornado/web.py”, line 1790, in _execute
result = await result
File “/home/sovol/moonraker/moonraker/components/application.py”, line 686, in post
await self._process_http_request(RequestType.POST)
File “/home/sovol/moonraker/moonraker/components/application.py”, line 704, in _process_http_request
raise tornado.web.HTTPError(
tornado.web.HTTPError: HTTP 400:
Printer is not ready
The klippy host software is attempting to connect. Please
retry in a few moments.During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/home/sovol/moonraker-env/lib/python3.9/site-packages/tornado/web.py”, line 1298, in send_error
self.write_error(status_code, **kwargs)
File “/home/sovol/moonraker/moonraker/components/application.py”, line 536, in write_error
self.finish(jsonw.dumps({‘error’: err}))
File “/home/sovol/moonraker-env/lib/python3.9/site-packages/tornado/web.py”, line 1238, in finish
future = self.flush(include_footers=True)
File “/home/sovol/moonraker-env/lib/python3.9/site-packages/tornado/web.py”, line 1175, in flush
return self.request.connection.write_headers(
File “/home/sovol/moonraker-env/lib/python3.9/site-packages/tornado/http1connection.py”, line 453, in write_headers
raise ValueError(“Illegal characters (CR or LF) in header: %r” % line)
ValueError: Illegal characters (CR or LF) in header: b’HTTP/1.1 400 \nPrinter is not ready\nThe klippy host software is attempting to connect. Please\nretry in a few moments.\n’
So its three errors tripping over themselves it seems.
Moonraker failing to make a connection because tornado asked for something and what tornado got back when moonraker failed was “illegal”.
I’ve found a bunch of stuff on network disconnecting but this is moonraker seemingly. I’d love to repair moonraker so that tornado would shut up ideally. I have found getting on through SSH doesn’t always work so maybe networking is causing moonraker to die but mainsail survives fine (as i see the moonraker error). I backed the printer and haven’t updated anything. Aside from a few bulging hotends everything has worked fine.
I have not knowingly done anything to the software and it was all fine. So my best idea is that possible a power cut truncated something in use and that is interfering now. However, I cannot find anything. So I am here for help.