First forgive me if this has already been asked and answered.
I've been having some network issues of late. And as a result, unfortunately, I'm learning how easy it is to interrupt a job controlled by Octoprint.
Here are the ways I've experienced this week:
Internet outage
LAN outage
Octoprint Service crash (these are very rare)
#3 I get, Octoprint is sending the code to the printer over USB so it makes sense that the print would stop if the service failed.
The other two don't make sense to me though. I would think that once a job is sent to Octoprint that the job would be able to continue even if the network cable was removed from the pi. The job should all be onboard the pi and the pi communicates to the printer using USB not Ethernet.
Is there something I'm missing?
I guess the main question I have is why does a network issue kill a print that is in progress?
During the OctoPrint Setup Wizard it asks whether or not you'd like to monitor the network's availability. I always assume that saying "no" to that will be more forgiving of a network outage.
Yeah, config->octoprint->server. Here's why it has such a ping:
If the connectivity check is enabled, OctoPrint will regularly check if it's connected to the internet. This is useful to prevent resource intensive operations (such as checking for updates) if it's already clear that they won't succeed anyhow.
OK so it's not the disconnect that caused my issues... Hmmmm I'm assuming that when my connection came back up with my chrome browser still open to the page that it didn't try to reconnect. I notice that my printer reboots whenever a reconnect command is sent to octoprint. To be clear, I did not click connect at any time. So the question is more, could chrome or my set up have caused an attempted re-connect?
Thank you for being patient with me. I just want to fully understand this product as I love using it.
OK I can absolutely confirm that my print jobs fail the second my PI loosed network connectivity. I've been able to reproduce it every time. Based on the above it seems like it might be a plugin. Just wasted an entire role of filament and burned up a print nozzle last night.
OK once my job completes I will remove it. Never ended up using anyways. I hope this solves the issue as I want to keep using Octoprint if at all possible.
If so that would probably be something for @Kenneth_Jiang to take a closer look at.
If not we'll have to dig deeper. I'd start with enabling serial.log, connecting to the printer, taking the Pi offline, back online and then checking if there's anything in the serial.log. If not, repeat with a small print job. Also see if you can reproduce the behaviour in safe mode (couldn't find in this topic whether you'd already tested that).
Based on your octoprint.log I don't see it switching away from state Printing once the plugin messages start to flood in (which is a I guess when connectivity is lost?).
Sorry I swore I followed up. Yes, removing that plugin did solve the issue. I think that plug-in should warn you that once installed your prints will fail if you loose your network connection.
Go over to his repository and let him know that it's behaving badly upon network loss. It's something that he can test (pull the Ethernet cable) during a print job. I'm assuming that Python has try/catch/finally behavior.
What @OutsourcedGuru said. Best open a ticket in the plugin's issue tracker. I'm fairly sure that this is probably not the intended behaviour, so @Kenneth_Jiang will probably want to know about it and be able to look into it.
@ibgeek Assuming the problem you reported was specific to ethernet connection (wifi connections drops all the time), I did very thorough testing by disabling my Pi's Wifi, and randomly plugging/unplugging my ethernet cable. My print never crashed. Not even a slight pause.
Assuming this is a bug in my plugin (since after you removed the plugin you no longer had crashes), I'll appreciate it if you can work with me to figure this out since you seem to be the only one who can reliably reproduce it. Can you go back tothe issue you opened and filled in a bit more details based on the questions I asked there? Thanks!