Connection with printer lost during print

Hi all,

I had the issue yesterday for the first time, during the print the connection with the printer was lost after a few hours. If I remember correctly, the message was "TMC Connection Time Out". After this I've started a new print that ran later that evening, without any issues.

So after that I've started a new print, around 10:00 in the evening, and I've checked the print a few times today (using my VPN). But now I see the printer has stopped, so I think the error occurred.

The only thing I can think of is that I've installed a plugin showing the % in the browser navigation bar. So I've deleted this plugin.

But when I am checking the logs, I see a lot of warnings and at 13:29 there is the follow message in the log:

2020-02-03 13:59:28,945 - octoprint.plugins.DisplayLayerProgress - INFO - Printing stopped. Detailed progress stopped.
2020-02-03 13:59:28,956 - octoprint.plugins.excluderegion - INFO - Printing stopped: event=PrintFailed

What can / should I do to solve this? It was a 18hour print, that stopped at about 15 hours. So I feel kind of sad :wink:

This is a part of the log, around the mentioned time stamp:

2020-02-03 13:52:15,445 - tornado.access - WARNING - 403 GET /sockjs/websocket (::ffff:10.8.0.2) 1.47ms
2020-02-03 13:53:36,157 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2020-02-03 13:53:36,395 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 101724}
2020-02-03 13:53:42,846 - backoff - INFO - Backing off get_dev_settings(...) for 35.0s (HTTPError: 401 Client Error: Unauthorized for url: http://newstream.getanywhere.io/api/dev_settings)
2020-02-03 13:54:18,217 - backoff - INFO - Backing off get_dev_settings(...) for 55.5s (HTTPError: 401 Client Error: Unauthorized for url: http://newstream.getanywhere.io/api/dev_settings)
2020-02-03 13:55:14,067 - backoff - INFO - Backing off get_dev_settings(...) for 56.3s (HTTPError: 401 Client Error: Unauthorized for url: http://newstream.getanywhere.io/api/dev_settings)
2020-02-03 13:56:10,723 - backoff - INFO - Backing off get_dev_settings(...) for 101.2s (HTTPError: 401 Client Error: Unauthorized for url: http://newstream.getanywhere.io/api/dev_settings)
2020-02-03 13:57:52,345 - backoff - INFO - Backing off get_dev_settings(...) for 76.8s (HTTPError: 401 Client Error: Unauthorized for url: http://newstream.getanywhere.io/api/dev_settings)
2020-02-03 13:59:09,584 - backoff - INFO - Backing off get_dev_settings(...) for 31.4s (HTTPError: 401 Client Error: Unauthorized for url: http://newstream.getanywhere.io/api/dev_settings)
2020-02-03 13:59:28,614 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2793, in _readline
ret = self._serial.readline()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 4932, in readline
c = self.read(1)
File "/home/pi/oprint/local/lib/python2.7/site-packages/serial/serialposix.py", line 501, in read
'device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2020-02-03 13:59:28,644 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2020-02-03 13:59:28,660 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2793)"
2020-02-03 13:59:28,729 - octoprint.plugins.filamentmanager - INFO - Filament used: 69043.9356 mm (tool0)
2020-02-03 13:59:28,945 - octoprint.plugins.DisplayLayerProgress - INFO - Printing stopped. Detailed progress stopped.
2020-02-03 13:59:28,956 - octoprint.plugins.excluderegion - INFO - Printing stopped: event=PrintFailed
2020-02-03 13:59:29,175 - octoprint.plugins.tracking - INFO - Sent tracking event print_failed, payload: {'origin': 'local', 'reason': 'error', 'commerror_text': "SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2793", 'file': '26a6568620b0733510cf9141f3e0f1e95f0e3db5', 'elapsed': 58543}

I really hope someone can help me ...
Did a short print yesterday evening, without any issues.

Started a new print after that (18 hours) and today again the same issue, it just stopped somewhere during the print.

I never had these errors before, I am using a good USB cable to connect my Pi4 to the Ender 3.

What should I do ... please help :man_shrugging:t3::cry:

Here is the part of the log where the error occurred:

2020-02-04 09:10:25,017 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2020-02-04 09:10:25,362 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 59444}
2020-02-04 09:23:24,828 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2793, in _readline
ret = self._serial.readline()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 4932, in readline
c = self.read(1)
File "/home/pi/oprint/local/lib/python2.7/site-packages/serial/serialposix.py", line 501, in read
'device reports readiness to read but returned no data '
SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)
2020-02-04 09:23:24,859 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2020-02-04 09:23:24,865 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Offline (Error: SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2793)"
2020-02-04 09:23:24,910 - octoprint.plugins.filamentmanager - INFO - Filament used: 51337.9863 mm (tool0)
2020-02-04 09:23:25,145 - octoprint.plugins.DisplayLayerProgress - INFO - Printing stopped. Detailed progress stopped.
2020-02-04 09:23:25,170 - octoprint.plugins.excluderegion - INFO - Printing stopped: event=PrintFailed
2020-02-04 09:23:25,392 - octoprint.plugins.tracking - INFO - Sent tracking event print_failed, payload: {'origin': 'local', 'reason': 'error', 'commerror_text': "SerialException: 'device reports readiness to read but returned no data (device disconnected or multiple access on port?)' @ comm.py:_readline:2793", 'file': '9a2e292c253e5144f391679aec15d8dcb3c8e2fe', 'elapsed': 40080}
2020-02-04 09:25:25,019 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2020-02-04 09:25:25,371 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 60344}

Please share a full log file (not just an excerpt), make sure your Pi is not reporting undervoltage or other issues and go through all the steps mentioned in the linked FAQ.

octoprint-4.log (1.1 MB)

Thank you for the reply @foosel !
I've attached the full log, I hope this helps to find something?
Where should I see the "under voltage" report? As far as I can see, this should not be the issue (using a official power supply that came with the Pi).

I've also looked all the other steps, but as far as I can see, they should not be an issue.
Is it possible that this is caused by a plugin?

Because that is the only thing that has changed between my current print and the 100+ hour print that I did before (without any issues).

Unlikely (the issue happens outside of OctoPrint, it's the serial port pretty much vanishing), but just to be sure try running in safe mode for a bit.

You'd see it as an icon with an exclamation mark on the navbar of OctoPrint as well as in the log. Looks like everything is fine in that regard however.

And again, thank you very much @foosel!
I will run my next print in safe mode, but as far as I can see it will be impossible to connect using a app (to remotely view the print over VPN) is that correct?

I am running a Bigtree SKR Mini e3 board in my printer, are there any know errors regarding the "vanishing of the serial port" related to that board?

Hm, only if your external connection requires some third party plugin to function, otherwise no. Safe mode just disables all plugins that aren't shipped with OctoPrint by default.

None that I'm aware of at least. What I'd check is if it's maybe a faulty USB connector (wiggle the cable a bit around where it connects to the printer).

Thanks @foosel!
I will give it a go tonight .. bit afraid to do a long print though .. since in both cases it seemed to stop somewhere during the morning, when I'm not around :wink:

I'm having the exact same issue and it just started this morning. It is basically causing my whole octopi to load the CPU and freeze. Not so good

Following up, i tried safe mode and CPU usage went back to normal. So there seems to be some plug in causing the issue. Is there a good way to try and figure this out?

After going through the plugins turning them off, I found the bundled "action command support" was the one causing all the issues. I disabled it and thing seem to be back to normal. It seems to have an issue pulling all the resources

If it was good in safe mode and not good in normal mode, it can't have been that plugin since that plugin stays active in safe mode (as all bundled plugins do). Something else is going on, possible one of your third party plugins interfering with that bundled plugin.

For me in the end the issue was probably somewhere in the wires in the printer. I checked all the printers in the case and made 100% they had a good connection. The cable to the display was a little bid loose. After this proces, the issue did not come back in my case.

I disabled all my 3rd party plugins in normal and it was still happening until I disabled the action command support, so I'm not sure why safe mode would not have the same issue. It's odd. I'm not really sure what the action command support does and it's working for now, so I"ll just leave it off

https://docs.octoprint.org/en/master/bundledplugins/action_command_prompt.html