Octoprint disconnects after every print

Any advise would be appreciated.

What is the problem?

Octoprint disconnects after every print. Connection status will show as Disconnected due to a timeout.

The printer does play the success tone, home the XY axis, and lower the Z axis for maximum clearance.-- most of the time. Sometimes it disconnects before the XY axis have been homed, but always after playing the completion tone.

I first noticed this when looking at the logs after a set of failed prints 2 weeks ago that is probably unrelated, but both of which resulted in an aborted print/disconnect about 3 hours into a 4+ hour build. I changed USB cables and moved my exhaust fan to a diferent outlet and haven't had that failure cause recur yet. I don't know if that's at all related.

What did you already try to solve it?

I've inspected the serial.log to see if it's failing at a particular line (not that I can tell, but it is always in the closing sequence), changed USB cables, and moved an air purifier off of the same power strip. I've also tried disabling extra options such as timelapse recording without effect.

This has been occuring consistently since I setup Octoprint for the first time a few weeks ago (even before I started installing other plugins).

Have you tried running in safe mode?

No. This is an older style printer that requires the GPX Plugin in order to print. There doesn't seem to be a way to enable only that plugin.

Did running in safe mode solve the problem?

Is it possible to activate the GPX Plugin in safe mode?

Systeminfo Bundle

Attached

octoprint-systeminfo-20240525031552.zip (22.9 KB)

Additional information about your setup

Octoprint is running on an Orange Pi 5 Pro under Docker.

The printer is a CTC Formaker that I got from kickstarter a while back. This is essentially a remix of CTC's Makerbot Replicator 1 Dual Clone, but with the option of swapping the print head for CNC or Laser heads. I'm still on the original firmware since I don't think any of the newer open-source firmwares would support that without quite a bit of work.

Sample serial.log from a successful print:

2024-05-18 08:11:06,214 - Send: N390550 G162 X Y F2500*118
2024-05-18 08:11:06,253 - Recv: T:212 /212 B:63 /64 T0:212 /212 T1:40 /0 @:0 B@:0
2024-05-18 08:11:08,301 - Recv: T:212 /212 B:64 /64 T0:212 /212 T1:40 /0 @:0 B@:0
2024-05-18 08:11:10,338 - Recv: T:212 /212 B:63 /64 T0:212 /212 T1:39 /0 @:0 B@:0
2024-05-18 08:11:12,373 - Recv: T:212 /212 B:63 /64 T0:212 /212 T1:40 /0 @:0 B@:0
2024-05-18 08:11:14,409 - Recv: T:212 /212 B:63 /64 T0:212 /212 T1:39 /0 @:0 B@:0
2024-05-18 08:11:16,445 - Recv: T:213 /212 B:63 /64 T0:213 /212 T1:40 /0 @:0 B@:0
2024-05-18 08:11:18,479 - Recv: T:212 /212 B:63 /64 T0:212 /212 T1:40 /0 @:0 B@:0
2024-05-18 08:11:20,515 - Recv: T:212 /212 B:63 /64 T0:212 /212 T1:38 /0 @:0 B@:0
2024-05-18 08:11:22,559 - Recv: T:212 /212 B:63 /64 T0:212 /212 T1:39 /0 @:0 B@:0
2024-05-18 08:11:24,595 - Recv: T:212 /212 B:64 /64 T0:212 /212 T1:39 /0 @:0 B@:0
2024-05-18 08:11:27,601 - Unexpected error while reading serial port, please consult octoprint.log for details: Timeout: 'Timeout' @ comm.py:_readline:4172
2024-05-18 08:11:27,631 - Changing monitoring state from "Printing" to "Offline after error"
2024-05-18 08:11:27,639 - Connection closed, closing down monitor

And octoprint.log from the same case. This message is identical for all prints:

2024-05-18 07:59:50,705 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 114307, 'printer_state': 'PRINTING'}
2024-05-18 08:11:06,254 - octoprint.util.comm - INFO - Externally triggered heatup detected
2024-05-18 08:11:27,599 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/octoprint/plugins/lib/python3.10/site-packages/octoprint_GPX/gpxprinter.py", line 181, in readline_str
return self.outgoing.get(timeout=timeout)
File "/usr/local/lib/python3.10/queue.py", line 179, in get
raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/octoprint/plugins/lib/python3.10/site-packages/octoprint/util/comm.py", line 4172, in _readline
ret = self._serial.readline()
File "/octoprint/plugins/lib/python3.10/site-packages/octoprint_GPX/gpxprinter.py", line 190, in readline
return self.readline_str().encode('ascii', errors='ignore')
File "/octoprint/plugins/lib/python3.10/site-packages/octoprint_GPX/gpxprinter.py", line 183, in readline_str
self._append(gpx.readnext())
gpx.Timeout: Timeout

Serial.log from a different incident. In this case I believe it disconnected before it homed the axis.

2024-05-18 16:16:38,386 - Changing monitoring state from "Printing" to "Finishing"
2024-05-18 16:16:38,429 - Send: N294973 M400*21
2024-05-18 16:16:38,431 - Recv: ok
2024-05-18 16:16:38,432 - Changing monitoring state from "Finishing" to "Operational"
2024-05-18 16:16:40,464 - Recv: T:212 /212 B:64 /64 T0:212 /212 T1:39 /0 @:0 B@:0
2024-05-18 16:16:42,500 - Recv: T:212 /212 B:64 /64 T0:212 /212 T1:38 /0 @:0 B@:0
2024-05-18 16:16:45,508 - Unexpected error while reading serial port, please consult octoprint.log for details: Timeout: 'Timeout' @ comm.py:_readline:4172
2024-05-18 16:16:45,530 - Changing monitoring state from "Operational" to "Offline after error"
2024-05-18 16:16:45,534 - Connection closed, closing down monitor
2024-05-18 18:41:29,634 - Changing monitoring state from "Offline" to "Detecting serial connection"

Or from the most recent:

2024-05-25 02:35:00,029 - octoprint.util.comm - INFO - Externally triggered heatup detected
2024-05-25 02:37:23,703 - octoprint.server.heartbeat - INFO - Server heartbeat <3
2024-05-25 02:37:30,086 - octoprint.plugins.tracking - INFO - Sent tracking event ping, payload: {'octoprint_uptime': 442806, 'printer_state': 'PRINTING'}
2024-05-25 02:39:40,701 - octoprint.util.comm - INFO - Externally triggered heatup detected
2024-05-25 02:39:43,708 - octoprint.util.comm - ERROR - Unexpected error while reading from serial port
Traceback (most recent call last):
File "/octoprint/plugins/lib/python3.10/site-packages/octoprint_GPX/gpxprinter.py", line 181, in readline_str
return self.outgoing.get(timeout=timeout)
File "/usr/local/lib/python3.10/queue.py", line 179, in get
raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/octoprint/plugins/lib/python3.10/site-packages/octoprint/util/comm.py", line 4172, in _readline
ret = self._serial.readline()
File "/octoprint/plugins/lib/python3.10/site-packages/octoprint_GPX/gpxprinter.py", line 190, in readline
return self.readline_str().encode('ascii', errors='ignore')
File "/octoprint/plugins/lib/python3.10/site-packages/octoprint_GPX/gpxprinter.py", line 183, in readline_str
self._append(gpx.readnext())
gpx.Timeout: Timeout
2024-05-25 02:39:43,772 - octoprint.util.comm - INFO - Changing monitoring state from "Printing" to "Offline after error"

For reference, plugin_GPX.log never has anything in it aside from on each connection

Opening port: /dev/ttyACM0.
gpx connected to /dev/ttyACM0

Hello @Digicrat !

No, but you can manually disable all 3rd party plugins except the GPX.

This seems to be the terminal log, not the serial.log. The serial.log is not enabled:

2024-05-25 01:31:19,044 - serial.log is currently not enabled, you can enable it via Settings > Serial Connection > Log communication to serial.log

This is an issue with the printer that denies further communication.


Side note: For code, please use Performatted Text, bot Bockquote.
Format

That was a serial log from a previous print when I had it enabled. I turned it off again after capturing a few cases.

Any suggestions on how to farther investigate this? I also tried at one point manually stepping through the last few end-of-print gcode statements in the terminal to see if there was a specific command that might be causing an error without any luck, which tracks with it not always stopping precisely at the same gcode line.

For additional background, I'm using a profile with extra pre/post gcode that I got from here.

Side note: There isn't a "Performtted Text" button in my UI (with default site settings) - somebody might need to tweak the site's default theme to include it.
image

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.