Cannot connect to Moonraker Error

Printer Model: custom build ( like pursa bear )
MCU / Printerboard: btt octapus pro h723
Host / SBC: btt cb1
klippy.zip (1006.4 KB)
moonraker.log (81.3 KB)

Cannot connect to Moonraker Error - Random Disconnects

Hi everyone

I’m experiencing a frustrating issue with my Klipper setup. During prints, I randomly get disconnected from Mainsail with the following error:

Cannot connect to Moonraker

Sometimes it happens after a long print, and sometimes it happens multiple times in a few seconds. It’s completely random and very disruptive.

I have noticed similar behavior on a server PC I have running Mainsail in the background as a sort of dashboard for my printers. After an hour or so Mainsail will randomly switch to the screen shown in the screenshot, then I have to click the “Try Again” button to reconnect. This doesn’t interrupt prints, but it is a bit annoying.

Yes, it doesn’t affect printing, but it’s very annoying

Sometimes it happens multiple times in less than a minute (like 10 times or more)

This sounds more like a topic on the level of the operating system or networking than something directly related to Mainsail or Moonraker.

Honestly

I dont have any idea about it

Do you use WiFi or a wired LAN connection?

I use it with wifi

Do you use automatic IP assignment (DHCP) or dedicated IP addresses?
How many devices are hooked up to your WiFi network?

About the frist two questions
How should i check that

About device’s (usually 2 maximum 4)

Sorry for getting back so late. Well,…time and setting up a PC with Ubuntu to try the command.
I guess right now you have more important things going on. Best wishes, stay safe!

I’m not sure, if we should discuss this here in the Klipper forum. You’ll find better help in the WWW.

If the hunch from Sineos is right and I can imagine he is right.

WiFi is working in the ISM band ISM radio band - Wikipedia. WiFi uses the 2.4 GHz, 5 GHz, or 6 GHz bands Wi-Fi - Wikipedia (usually just 2.4 GHz or 5 GHz band). Check which band you are using. “Tell” your WiFi router to use the other one. Maybe someone is disturbing your used frequency (can be a cheap (or defect) electronic device like a microwave oven). Since you come from Iran (no offense), I could imagine there are no or very little authorities who try to find disturbers.

Try in a terminal:

You see the results with just my WiFi connected and my WiFi plus LAN connected.

There are some scenarios you could try. I’ll start with the easiest one.

  1. Try a wired LAN. The chance of disturbances are much smaller.

  2. Give your LAN members dedicated IP addresses. With dedicated IP addresses, it will make it much easier to investigate problems.

Good luck, hcet14

Hi Hect14,

Thank you for your response, and sorry for the delay in replying.

We’re currently in a war situation, and the government is heavily restricting internet access. This is the first time in four days that I’ve been able to connect.

Our city is also under frequent attacks—almost daily—so it’s been quite difficult to keep up.

I will follow all your instructions and post the results here as soon as possible.

Thanks again for your support.

1 Like