What is the problem?
OctoPrint stops printing mid-print, several hours into a print:
There was a communication error while talking to your printer. Please consult the terminal output and octoprint.log for details. Error: Too many consecutive timeouts, printer still connected and alive?
A few minutes after that the network connection also dropped and I literally couldn't do anything anymore besides restarting. The log file also seems particularly unhelpful:
2022-01-22 14:44:07,440 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2022-01-22 14:59:07,442 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2022-01-22 15:14:07,443 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2022-01-22 15:23:33,861 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2022-01-22 15:23:36,866 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2022-01-22 15:23:39,870 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2022-01-22 15:23:42,875 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2022-01-22 15:23:45,879 - octoprint.util.comm - INFO - Communication timeout while printing, trying to trigger response from printer.
2022-01-22 15:23:48,882 - octoprint.util.comm - INFO - No response from printer after 6 consecutive communication timeouts, considering it dead.
2022-01-22 15:23:48,906 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Offline after error"
2022-01-22 15:23:48,918 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2022-01-22 15:25:08,973 - octoprint.server.util.sockjs - INFO - New connection from client: <redacted>
2022-01-22 15:25:09,126 - octoprint.server.util.flask - INFO - Passively logging in user NMe from <redacted>
2022-01-22 15:25:09,127 - octoprint.access.users - INFO - Logged in user: NMe
2022-01-22 15:25:09,322 - octoprint.server.util.sockjs - INFO - User NMe logged in on the socket from client <redacted>
2022-01-22 15:25:09,423 - octoprint.server.util.sockjs - INFO - Client connection closed: <redacted>
2022-01-22 15:26:09,756 - octoprint.server.util.sockjs - INFO - New connection from client: <redacted>
2022-01-22 15:26:09,894 - octoprint.server.util.flask - INFO - Passively logging in user NMe from <redacted>
2022-01-22 15:26:09,895 - octoprint.access.users - INFO - Logged in user: NMe
2022-01-22 15:26:10,157 - octoprint.server.util.sockjs - INFO - User NMe logged in on the socket from client <redacted>
2022-01-22 15:26:10,227 - octoprint.server.util.sockjs - INFO - Client connection closed: <redacted>
2022-01-22 15:29:07,444 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2022-01-22 15:29:18,956 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity changed from online to offline
2022-01-22 15:29:18,957 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 1.1.1.1:53 is not working
2022-01-22 15:29:18,958 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is not working
2022-01-22 15:29:22,615 - octoprint.plugins.networkhealth - ERROR - No Network Connection - Resetting Adapter(s)...
2022-01-22 15:30:17,654 - octoprint.server.util.sockjs - INFO - New connection from client: <redacted>
2022-01-22 15:30:17,765 - octoprint.server.util.flask - INFO - Passively logging in user NMe from <redacted>
2022-01-22 15:30:17,766 - octoprint.access.users - INFO - Logged in user: NMe
2022-01-22 15:30:18,818 - octoprint.server.util.sockjs - INFO - User NMe logged in on the socket from client <redacted>
2022-01-22 15:30:27,822 - octoprint.server.util.sockjs - INFO - Client connection closed: <redacted>
2022-01-22 15:23:11,136 - octoprint.startup - INFO - ******************************************************************************
2022-01-22 15:23:11,139 - octoprint.startup - INFO - Starting OctoPrint 1.7.3
2022-01-22 15:23:11,142 - octoprint.startup - INFO - ******************************************************************************
2022-01-22 15:23:17,505 - octoprint.util.connectivity.connectivity_checker - INFO - Connectivity state is currently: offline
2022-01-22 15:23:17,505 - octoprint.util.connectivity.connectivity_checker - INFO - Connecting to 1.1.1.1:53 is not working
2022-01-22 15:23:17,506 - octoprint.util.connectivity.connectivity_checker - INFO - Resolving octoprint.org is not working
2022-01-22 15:23:17,515 - octoprint.startup - INFO - We don't appear to be online, not fetching plugin blacklist
Because OctoPrint's logs didn't seem super helpful I looked into the system logs and they're not a lot of help either:
Jan 22 13:28:02 octopi-cr-x kernel: [1178791.016662] usb 1-1.2: FTDI USB Serial Device converter now attached to ttyUSB0
Jan 22 13:28:02 octopi-cr-x mtp-probe: checking bus 1, device 3: "/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.2"
Jan 22 13:28:02 octopi-cr-x mtp-probe: bus: 1, device: 3 was not an MTP device
Jan 22 13:54:37 octopi-cr-x kernel: [1180386.778023] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
Jan 22 13:54:37 octopi-cr-x kernel: [1180386.778324] bcmgenet fd580000.ethernet eth0: Link is Down
Jan 22 13:54:42 octopi-cr-x kernel: [1180391.764184] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Jan 22 15:30:03 octopi-cr-x kernel: [1186112.520158] bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
Jan 22 15:30:03 octopi-cr-x kernel: [1186112.520472] bcmgenet fd580000.ethernet eth0: Link is Down
Jan 22 15:30:08 octopi-cr-x kernel: [1186117.513780] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
Jan 22 15:23:09 octopi-cr-x kernel: [ 0.000000] Booting Linux on physical CPU 0x0
The one thing that does seem weird though, is that the timestamp changes. My error happened around 15:23, then the printer lost its network connection around 15:30, after which I rebooted and the timestamp was 15:23 again. Not sure if that was later fixed when NTP became available again or something.
What did you already try to solve it?
I installed the Network Health plugin to make sure Octoprint comes back online after it loses the connection (because apparently needing a plugin to do that is normal). Now my network apparently still drops (and it doesn't come back until I restart the Pi), and this time it seemed to go offline after the printer already errored out. Last time it happened the connection dropped and the printer kept going for several hours more without a network connection, until this same thing happened anyway and the print just aborted.
Have you tried running in safe mode?
No, because apparently I need the Network Health plugin to even be able to stay connected to my Pi. Other than that the issue already existed on stock OctoPi, before I installed a single plugin. Whatever is happening does not appear to be plugin-related.
I have turned on logging to serial.log after this latest failure but that's not gonna help me now of course.
Systeminfo Bundle
octoprint-systeminfo-20220122153707.zip (110.6 KB)
Additional information about your setup
I'm on OctoPrint 1.7.3 but the problem also occurred on the previous version during my last attempt at printing something. OctoPi is at version 0.18.0. My printer is a Creality CR-X Pro running its stock firmware. My browser and OS seem irrelevant to something crashing OctoPrint itself, but I'm on the latest version of Firefox on Windows 11.
Up until a few weeks ago I was on a Raspberry Pi 3B+ but that started overheating during printing. I decided to take that as a reason to upgrade to a more modern Pi, so I got a Pi 4B with 2GB RAM and installed both active and passive cooling on it. I happened to check the temperature of the Pi about 10 minutes before it crashed and it was at 36.1 degrees C, so well within operating margins. After that I also happened to check htop
output and the CPU was not being stressed either, with a load of 1.2 on a 4-core system and no single core exceeding 15% of its capabilities. I'd also like to add that I had none of the problems I'm having now with my network or with the printer's connection dropping on the old Pi, just on the new one. And finally: yes, the power line on my USB cable is blocked, so the printer is not drawing power from the Pi.
At this point I'm getting really fed up. I've wasted so much filament on this already. I have been completely unable to finish a print from within OctoPrint for weeks now.