Since upgrading to 1.5.3, I have had a very big annoyance occur, which is when I click "Disconnect" the printer get's disconnected, then Octoprint almost immediately reconnects to the printer. Some would think this is great, except I am trying to flash the firmware and the reconnect kills the connection. I have scoured every menu item I can find and cannot figure out how to extend or temporarily disable this.
I run PSU control, so stopping OctoPrint will shut off the printer, and while I could go in and manually mess with the GPOI's, I did not have to do this previous to upgrading 1.5.3.
Anyone else running into this?
OctoPrint never tried to automatically reconnect to the printer on its own, you should try it in safe mode to rule out any plugins that might do this. Also list every plugin you have so we can see if one of them might be the issue.
I've disabled all the custom plugins except PSU Control, since that is used to turn on the power switch for the printer. I can look into that but I enabled debug logging on Octoprint, and this is what leads me to think that Octoprint is the one trying to initiate the connect every few seconds:
2021-02-27 18:05:09,168 - octoprint.events.fire - DEBUG - Firing event: Connecting (Payload: None)
2021-02-27 18:05:09,168 - octoprint.events - DEBUG - Sending action to <bound method PrinterStateConnection._onEvent of <octoprint.server.util.sockjs.PrinterStateConnection object at 0x6ffa27f0>>
2021-02-27 18:05:09,247 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2021-02-27 18:05:09,282 - octoprint.events.fire - DEBUG - Firing event: PrinterStateChanged (Payload: {'state_id': 'DETECT_SERIAL', 'state_string': 'Detecting serial connection'})
2021-02-27 18:05:09,282 - octoprint.events - DEBUG - Sending action to <bound method PrinterStateConnection._onEvent of <octoprint.server.util.sockjs.PrinterStateConnection object at 0x6ffa27f0>>
2021-02-27 18:05:09,359 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 0 port/baudrate candidates:
2021-02-27 18:05:09,360 - octoprint.util.comm - INFO - Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
2021-02-27 18:05:09,361 - octoprint.util.comm - INFO - Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
2021-02-27 18:05:09,685 - octoprint.events.fire - DEBUG - Firing event: PrinterStateChanged (Payload: {'state_id': 'ERROR', 'state_string': 'Error: No more candidates to test, and no working port/baudrate combination detected.'})
2021-02-27 18:05:09,686 - octoprint.events - DEBUG - Sending action to <bound method PrinterStateConnection._onEvent of <octoprint.server.util.sockjs.PrinterStateConnection object at 0x6ffa27f0>>
2021-02-27 18:05:10,065 - octoprint.events.fire - DEBUG - Firing event: Error (Payload: {'error': 'No more candidates to test, and no working port/baudrate combination detected.', 'reason': 'autodetect'})
2021-02-27 18:05:10,065 - octoprint.events - DEBUG - Sending action to <bound method PrinterStateConnection._onEvent of <octoprint.server.util.sockjs.PrinterStateConnection object at 0x6ffa27f0>>
2021-02-27 18:05:10,244 - octoprint.events.fire - DEBUG - Firing event: UpdatedFiles (Payload: {'type': 'printables'})
2021-02-27 18:05:10,244 - octoprint.events - DEBUG - Sending action to <bound method PrinterStateConnection._onEvent of <octoprint.server.util.sockjs.PrinterStateConnection object at 0x6ffa27f0>>
2021-02-27 18:05:10,370 - octoprint.events.fire - DEBUG - Firing event: Disconnected (Payload: None)
2021-02-27 18:05:10,370 - octoprint.events - DEBUG - Sending action to <bound method PrinterStateConnection._onEvent of <octoprint.server.util.sockjs.PrinterStateConnection object at 0x6ffa27f0>>
2021-02-27 18:05:10,376 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2021-02-27 18:05:10,563 - octoprint.events.fire - DEBUG - Firing event: PrinterStateChanged (Payload: {'state_id': 'OFFLINE', 'state_string': 'Offline'})
2021-02-27 18:05:10,563 - octoprint.events - DEBUG - Sending action to <bound method PrinterStateConnection._onEvent of <octoprint.server.util.sockjs.PrinterStateConnection object at 0x6ffa27f0>>
2021-02-27 18:05:10,725 - octoprint.plugins.tracking - INFO - Sent tracking event commerror_autodetect, payload: {'commerror_text': 'No more candidates to test, and no working port/baudrate combination detected.'}
2021-02-27 18:05:10,732 - tornado.access - WARNING - 403 GET /sockjs/459/a34snx42/websocket (::ffff:10.27.202.254) 2.50ms
2021-02-27 18:05:10,773 - octoprint.server.util.sockjs - INFO - New connection from client: 10.27.204.202
2021-02-27 18:05:10,814 - octoprint.events.fire - DEBUG - Firing event: ClientOpened (Payload: {'remoteAddress': '10.27.204.202'})
2021-02-27 18:05:10,815 - octoprint.events - DEBUG - Sending action to <bound method PrinterStateConnection._onEvent of <octoprint.server.util.sockjs.PrinterStateConnection object at 0x6ffa27f0>>
The octoprint.events seems to indicate some action is performing the continual connect check. I also, for giggles, started Octoprint in safe mode, and the same log entries appear from octoprint.events, with this in the terminal (same with plugins)
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
Changing monitoring state from "Offline" to "Detecting serial connection"
Performing autodetection with 0 port/baudrate candidates:
Changing monitoring state from "Detecting serial connection" to "Error: No more candidates to test, and no working port/baudrate combination detected."
Changing monitoring state from "Error: No more candidates to test, and no working port/baudrate combination detected." to "Offline (Error: No more candidates to test, and no working port/baudrate combination detected.)"
Now I do shutdown the printer and start it up using Octoprint, so Octoprint is always running regardless of the printer state, so it always falls back to AUTO for the serial port detection. I have tried to change that but it always reverts back when Octoprint starts up. This may be the root of the problem, I'm not sure, but I am sure it's Octoprint doing the constant reconnect and not any other plugins.
Are you using OctoDash or any other UI/app?
I do have OctoScreen running, but when I restarted OctoPrint in Safe Mode I made sure to stop the service.
Would need to see some debug logs at this point then.
Well, so I disabled the systemd unit for octoscreen and rebooted, and no auto connect. Then I reenabled the unit and rebooted, then stopped the service and auto connect occurred. ps aux showed remnants of the octoscreen service still running, so I’ve open an issue with the developer there.