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

I am back !!

I did find out that Klipper discourse now requires a VPN for me to open it in my country

It’s weird because it’s just a 3d printing website !!! Thank you, my government

any way

My wifi only supports 2.4 GHz

You have some authorities that finds disturbers !! wow

I am a Windows user

I will try this and inform you about results

but 3d printer and wifi and the laptob that controls them are very close
like under 5 meter

Wow, amazing…

Click on your “Windows” symbol, then type “cmd” (just the 3 alphabetic characters). A windows terminal will pop up.
Type “ipconfig” (just the alphabetic characters) in the terminal and press enter.

yes

Also, about VPNs — free VPNs from Google Play or the App Store usually don’t work.

If you want a working VPN, you have to buy it from independent sellers (most of the time V2Ray) and hope you get a stable connection.

You also have to hope the seller doesn’t get caught and arrested by the government. If that happens, you’ll lose your connection, and they’ll end up in jail.

Besides that, these VPNs aren’t always safe. I’ve heard that some sellers get their servers from the government (or something like that — I’m not an expert in network stuff).

It kind of makes sense
Some people only accept crypto payments, but others even give you their bank account number so you can transfer money, and when you do, you can see their real name. Yet they never get arrested.

any way

I did as you asked

Here are the results

Of course. Forget all the internet browsers. Even tor browser doesn’t work with geo blocking anymore with a website for car racing here.
But you might try above in your country, if you want to save money. That may be a way to reach more sites in your WWW. VPN providers want to earn money :wink:, which is absolutely ok.

Ok, can you post a new screenshot?

Power off your 3D printer and use “ipconfig -all”.

hi sorry for replying late i had some VPN problems

The only VPNs that work here are the ones we pay for
They like this (someone buy a VPS or something like that that is out of country and then make a VPN from it )

about the IP config all

I did it twice

One with the printer on and one without it


First one with printer on


printer off