I am currently running OctoPrint version 1.4.2 on octopi 0.15.1 with an Anycubic i3 Mega.
This setup worked fine for many months. I don't print very much, so the printer is powered off 90% of the time, but the pi with Octoprint is running 24/7. When I power the printer I usually just have to click "Connect" in the webpage and Octoprint wil reconnect successfully and I can print.
I happened about 1 week ago that suddenly the Octoprint webpage did no longer load for me after trying to print something again, when I had printed 1 or 2 days ago.
Not knowing exactly what might be the problem I just restarted octoprint (via systemctl restart octoprint) and everything was fine again. However the problem reoccured over and over again.
I thought it might have to do with a recent plugin or plugin-update so I disabled them all (e.g. TouchUI). The problem persisted and required me to restart Octoprint on error.
Finally looking at the logs I spotted the problem. The logs are FLOODED with hundreds of thousands of repeated errors:
octoprint.log (excerpt)
2020-08-25 21:22:10,553 - 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.)"
2020-08-25 21:22:10,564 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2020-08-25 21:22:12,517 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-08-25 21:22:12,549 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 0 port/baudrate candidates:
2020-08-25 21:22:12,550 - 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."
2020-08-25 21:22:12,556 - 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.)"
2020-08-25 21:22:12,565 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2020-08-25 21:22:14,570 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-08-25 21:22:14,601 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 0 port/baudrate candidates:
2020-08-25 21:22:14,603 - 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."
2020-08-25 21:22:14,607 - 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.)"
2020-08-25 21:22:14,617 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2020-08-25 21:22:16,588 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-08-25 21:22:16,619 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 0 port/baudrate candidates:
2020-08-25 21:22:16,621 - 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."
2020-08-25 21:22:16,624 - 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.)"
2020-08-25 21:22:16,635 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2020-08-25 21:22:18,598 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-08-25 21:22:18,629 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 0 port/baudrate candidates:
2020-08-25 21:22:18,631 - 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."
2020-08-25 21:22:18,634 - 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.)"
2020-08-25 21:22:18,645 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2020-08-25 21:22:20,554 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-08-25 21:22:20,557 - octoprint - ERROR - Exception on /api/connection [POST]
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/util/flask.py", line 1315, in decorated_view
return func(*args, **kwargs)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/vendor/flask_principal.py", line 199, in _decorated
rv = f(*args, **kw)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/server/api/connection.py", line 69, in connectionCommand
printer.connect(port=port, baudrate=baudrate, profile=printerProfile)
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/standard.py", line 270, in connect
self._comm.start()
File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 662, in start
self.sending_thread.start()
File "/usr/lib/python2.7/threading.py", line 736, in start
_start_new_thread(self.__bootstrap, ())
error: can't start new thread
2020-08-25 21:22:20,570 - tornado.access - ERROR - 500 POST /api/connection (127.0.0.1) 103.56ms
2020-08-25 21:22:20,605 - octoprint.util.comm - INFO - Serial detection: Performing autodetection with 0 port/baudrate candidates:
2020-08-25 21:22:20,606 - 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."
2020-08-25 21:22:20,612 - 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.)"
2020-08-25 21:22:20,620 - octoprint.plugins.action_command_notification - INFO - Notifications cleared
2020-08-25 21:22:22,582 - octoprint.util.comm - INFO - Changing monitoring state from "Offline" to "Detecting serial connection"
2020-08-25 21:22:22,584 - octoprint - ERROR - Exception on /api/connection [POST]
Traceback (most recent call last):
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/pi/oprint/local/lib/python2.7/site-packages/flask/app.py", line 1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
This excerpt is the very beginning when the exceptions started and the exception stack traces repeat over and over again.
Any clue about the cause of that problem?
logs.zip (2.1 MB)