Octoprint randomly disconnects


#1

What is the problem?
Octoprint disconnects randomly during a print with no ryhme or reason

What did you already try to solve it?
tried 2 different usb cables

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
Heres the seemingly relivant log info

2018-08-19 08:12:46,857 - 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 2581, in _readline
    ret = self._serial.readline()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 4615, 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?)
2018-08-19 08:12:46,903 - octoprint.util.comm - ERROR - Please see https://faq.octoprint.org/serialerror for possible reasons of this.
2018-08-19 08:12:46,929 - 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:2581)"
2018-08-19 08:12:46,950 - octoprint.filemanager.analysis - INFO - Starting analysis of local:body.gcode
2018-08-19 08:12:46,955 - octoprint.filemanager.analysis - INFO - Invoking analysis command: /home/pi/oprint/bin/python2 -m octoprint analysis gcode --speed-x=6000 --speed-y=6000 --max-t=10 --throttle=0.0 --throttle-lines=100 /home/pi/.octoprint/uploads/body.gcode
2018-08-19 08:12:47,124 - octoprint.plugins.filamentmanager - INFO - Filament used: 1872.3704 mm (tool0)
2018-08-19 08:12:47,324 - octoprint.plugins.astroprint - ERROR - HTTPSConnectionPool(host='api.astroprint.com', port=443): Max retries exceeded with url: /v2/token (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6f1cabd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
2018-08-19 08:12:47,407 - octoprint.plugins.astroprint - ERROR - Failed to send print_job request: HTTPSConnectionPool(host='api.astroprint.com', port=443): Max retries exceeded with url: /v2/print-jobs/4b521922767d4b5fab251dece4b734d1 (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x6f330bd0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
2018-08-19 08:19:20,118 - octoprint.filemanager.analysis - INFO - Analysis of entry local:body.gcode finished, needed 393.17s

#2

I had been using a camera that had a flashlight on it, removeing this seems to have fixed the problem. Now I need a new way to monitor it tho...

Will report back after a couple prints


#3

Are you using a 3A power supply to provide power to your raspberry? Maybe your webcam is draining too much power from your Pi. Some webcam models require a powered usb hub.


#4

I am using a canakit power supply, 5v 2.5A


#5

Well, yeah, but...

The Raspberry Pi 3B itself needs 2.5A of 5V power. If I (somehow) try to charge my MacBook on one of the USB ports, I'm trying to draw power from that 2.5A from the Raspberry Pi's power adapter. Likewise, the bright LED from the webcam is likely trying to draw a lot of power (more than it should).