Robo3D / roboOctoprint

Octoprint tailored for Robo printers.
GNU Affero General Public License v3.0
3 stars 4 forks source link

Serial connection crash, Errno 5 #43

Open AllenMcAfee opened 6 years ago

AllenMcAfee commented 6 years ago

What were you doing?

Customer reporting Disconnection issues intermittently on an R2. Evaluation of the octoprint log shows a serial connection crash when printing from a USB drive. Evaluation of the octoprint logs show the USB is losing connection near the start of the print, leading the error below. CS is asking whether the user is pulling the USB drive during the print, or not. If not, I'm expecting there is a hardware issue either with the Pi, the USB drive, or the USB panel mount cable. Right now, USB drive is the most likely culprit.

Branch & Commit or Version of OctoPrint

Version: 1.4.0-rc6 (HEAD -> master branch)

Printer model & used firmware incl. version

R2 1.1.6-Roboversion-1.2.4

Link to octoprint.log

2018-08-09 01:41:26,542 - octoprint.filemanager.storage - INFO - Sanitized "/home/pi/.octoprint/uploads/USB/System Volume Information" to "/home/pi/.octoprint/uploads/USB/System_Volume_Information_(123)"
2018-08-09 01:41:26,760 - kivy - INFO - Exiting Loading loop
2018-08-09 01:41:31,815 - kivy - INFO - USB/R2_Print_Files/marvin.gcode
2018-08-09 01:41:32,026 - octoprint.plugins.filament - INFO - Print Started
2018-08-09 01:41:32,030 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G21
2018-08-09 01:41:32,032 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G90
2018-08-09 01:41:32,033 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G92 E0
2018-08-09 01:41:32,034 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: M107
2018-08-09 01:41:32,035 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: M104 S230
2018-08-09 01:41:32,037 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: M140 S60
2018-08-09 01:41:32,038 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G36
2018-08-09 01:41:32,039 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G4 S2
2018-08-09 01:41:32,040 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G1 Z15 F300
2018-08-09 01:41:32,041 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G1 X10 Y1 F7200
2018-08-09 01:41:32,043 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: M109 S230
2018-08-09 01:41:32,044 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: M140 S60
2018-08-09 01:41:32,045 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G1 Z0.3
2018-08-09 01:41:32,046 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G1 X190 E15.0 F500
2018-08-09 01:41:32,047 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G1 Z15 F300
2018-08-09 01:41:32,048 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G92 E0
2018-08-09 01:41:32,049 - octoprint.util.comm - INFO - Script: beforePrintStarted Reading Line: G1 F7200
2018-08-09 01:41:36,611 - kivy - INFO - Resetting self.paused to False
2018-08-09 01:41:36,612 - kivy - INFO - Setting 5 minute timer!
2018-08-09 01:41:36,614 - kivy - INFO - Waiting for timer
2018-08-09 01:53:20,246 - kivy - INFO - USB Removed /dev/sda1
2018-08-09 01:53:20,261 - kivy - INFO - USB is not connected Greying out button
2018-08-09 01:58:31,300 - octoprint.util.comm - ERROR - Exception while processing line
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2696, in getNext
    line = self._handle.readline()
  File "/home/pi/oprint/lib/python2.7/codecs.py", line 672, in readline
    return self.reader.readline(size)
  File "/home/pi/oprint/lib/python2.7/codecs.py", line 527, in readline
    data = self.read(readsize, firstline=True)
  File "/home/pi/oprint/lib/python2.7/codecs.py", line 470, in read
    newdata = self.stream.read(size)
IOError: [Errno 5] Input/output error
2018-08-09 01:58:31,320 - octoprint.util.comm - ERROR - Something crashed inside the serial connection loop, please report this in OctoPrint's bug tracker:
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 1172, in _monitor
    self._handle_ok()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 1450, in _handle_ok
    self._continue_sending()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 1537, in _continue_sending
    elif self._sendNext():
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 1872, in _sendNext
    line = self._getNext()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 1842, in _getNext
    line = self._currentFile.getNext()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/comm.py", line 2707, in getNext
    raise e
IOError: [Errno 5] Input/output error
2018-08-09 01:58:31,323 - octoprint.plugins.filament - INFO - Print Stopped
2018-08-09 01:58:31,324 - kivy - INFO - Resetting self.paused to False
2018-08-09 01:58:31,326 - kivy - INFO - Sleeping for Five Seconds!
2018-08-09 01:58:34,025 - octoprint.filemanager.storage - ERROR - Error while writing .metadata.yaml to /home/pi/.octoprint/uploads/USB/R2_Print_Files
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/filemanager/storage.py", line 1329, in _save_metadata
    yaml.safe_dump(metadata, stream=f, default_flow_style=False, indent="  ", allow_unicode=True)
  File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
    self.gen.next()
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/util/__init__.py", line 753, in atomic_write
    shutil.move(temp_config.name, filename)
  File "/usr/lib/python2.7/shutil.py", line 302, in move
    copy2(src, real_dst)
  File "/usr/lib/python2.7/shutil.py", line 130, in copy2
    copyfile(src, dst)
  File "/usr/lib/python2.7/shutil.py", line 83, in copyfile
    with open(dst, 'wb') as fdst:
IOError: [Errno 2] No such file or directory: u'/home/pi/.octoprint/uploads/USB/R2_Print_Files/.metadata.yaml'
2018-08-09 01:58:34,059 - octoprint.filemanager.analysis - INFO - Starting analysis of local:RR2_Makers_Muse_Torture_Egg.gcode
2018-08-09 01:58:34,068 - octoprint.events - ERROR - Got an exception while sending event MetadataStatisticsUpdated (Payload: {'path': u'USB/R2_Print_Files/marvin.gcode', 'storage': 'local'}) to <bound method Printer._on_event_MetadataStatisticsUpdated of <octoprint.printer.standard.Printer object at 0x752b9690>>
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/events.py", line 151, in _work
    listener(event, payload)
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/standard.py", line 170, in _on_event_MetadataStatisticsUpdated
    self._selectedFile["sd"])
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/printer/standard.py", line 893, in _setJobData
    date = int(os.stat(path_on_disk).st_mtime)
OSError: [Errno 2] No such file or directory: '/home/pi/.octoprint/uploads/USB/R2_Print_Files/marvin.gcode'