How to troubleshoot print freeze?


#1

What is the problem?
Print job randomly freezes while using octoprint server. Never when using the printer's SD card.
Octoprint does not freezes. Communications to printer disconnects.

What did you already try to solve it?
Tried printing from octoprint web UI, and from Cura.
Just installed octoprint. Octoprint itself does not freeze, but communication to printer drops and printer stops.
Test prints work fine while printing direct in the printer with SD card (octoprint server off - unplugged). I suspect I may have a bad USB cable from server to printer, will replace tonight and test again.

Additional information about your setup (OctoPrint version, OctoPi version, printer, firmware, octoprint.log, serial.log or output on terminal tab, ...)
I am using a new PI 3 B+. Will learn how to get the octoprint logs tonight and post. 5 attempt prints using octoprint, all failed at certain point.
Printer is a CR10s. Use printer nonstop and never had an issue.


Can't login to the web interface
#2

Begin with the basics: a shielded serial printer cable without extra adapters and as short as possible (or with one/two ferrite cores); if your printer board supports USB 3.0 then get a serial cable which works with this (it will have a blue tongue on the Type A plug side); make sure that the Raspi's power is through a good 5V 2.5A adapter (plugging it into a UPS also helps).

You didn't give any version or logs. It makes this pretty difficult.


#3

Thank you. Just got home and will get versions, logs, etc.


#4

Serial Log
serial.log (148 Bytes)


#5

octoprint.log (76.6 KB)
Octoprint Log


#6

Your serial log is disabled. You need to enable it.

Also you are on Octoprint 1.3.8, you need to update to 1.3.10. There have been plenty of fixes in there. So, upgrade, enable serial, do a print, then upload those two log files.


#7

Given that it's a 3B+ it could also be the firmware on the Raspi: sudo apt-get update && sudo apt-get -y upgrade.


#8

Thank you. Does that means I need to look on how to update the PI's firmware? Any reliable place for it?


#9

I just gave you the command in my last post.


#10

Maybe, but I have no idea where to "type" that. I guess it is youtube time for a 101 in that thing. Thanks. I will try it tonight.


#11

Ok, got PuTTY, fired the command you sent. Looks like it is doing its thing updating something. Also got a new cable and the power supply is good. This looks very interesting...


#12

octoprint.log (136.1 KB)
Updates done. New cable, 2.5A power supply. Still failed.


#13

serial.log (3.5 MB)


#14

Looks like you figured that out and got the correct version of that second command. (The "&&" is how you'd run more than one command at a time.)

From your serial.log, this is about the only thing that raises my eyebrows:

2018-12-21 03:02:32,666 - Send: M20
2018-12-21 03:02:32,682 - Recv: Begin file list
2018-12-21 03:02:32,698 - Recv: /OLDER/SHORTD~1.GCO
2018-12-21 03:02:32,713 - Recv: /OLDER/CR-10E~1/HUBA3H~1.GCO
2018-12-21 03:02:32,761 - Recv: /OLDER/CR-10E~1/47ACB~1.MOD/1/HUBA3H~1.GCO
2018-12-21 03:02:32,790 - Recv: /OLDER/CR-10E~1/47ACB~1.MOD/2/EAST_D~1.GCO
2018-12-21 03:02:32,791 - Recv: /OLDER/CR-10E~1/47ACB~1.MOD/3/BAIZEH~1.GCO
2018-12-21 03:02:32,806 - Recv: /OLDER/CR-10E~1/47ACB~1.MOD/YAXISW~1/CR-10~1.GCO
2018-12-21 03:02:32,866 - Recv: /OLDER/CR-10~1/HUBA3H~1.GCO
2018-12-21 03:02:32,868 - Recv: echo:Cannot open subdir
2018-12-21 03:02:32,869 - Recv: 1380A~1.��
2018-12-21 03:02:32,870 - Recv: echo:Cannot open subdir
2018-12-21 03:02:32,872 - Recv: 25282~1.��
2018-12-21 03:02:32,873 - Recv: echo:Cannot open subdir
2018-12-21 03:02:32,874 - Recv: 30C02~1.��
2018-12-21 03:02:32,876 - Recv: echo:Cannot open subdir
2018-12-21 03:02:32,877 - Recv: 451AC~1.��
2018-12-21 03:02:32,879 - Recv: echo:Cannot open subdir
2018-12-21 03:02:32,880 - Recv: 5927D~1.��
2018-12-21 03:02:32,882 - Recv: echo:Cannot open subdir
2018-12-21 03:02:32,883 - Recv: 62CC5~1.��
2018-12-21 03:02:32,884 - Recv: /OLDER/C_FRON~1.GCO

I'm sure others would know more but strange characters in a file list from your printer controller's SD card could suggest either card corruption, wonky firmware or a problem in the serial line. I've suggested before that Marlin may not be happy with Microsoft-style long filenames but others think that it's okay with that.

If this were a classic early-Raspi-firmware-on-a-3B+ situation, then the Pi itself would freeze up and not be responsive to anything, forcing a power boot to return to service. I think you've ruled that out if you've now updated the firmware with that apt-get upgrade.

You "new" cable hopefully has internal metallic shielding or one or two ferrite cores.

Your serial log looks nearly pristine to me. I don't love the temperature responses coming back from your firmware with the question mark at the end; that looks odd to me.

I'm noting that although you're not in Safe Mode, you don't seem to have any additional plugins other than those bundled.

Looks like a problem running one of the bundled plugins:

2018-12-21 03:03:19,169 - octoprint.plugin - ERROR - Error while calling plugin tracking
Traceback (most recent call last):
  File "/home/pi/oprint/local/lib/python2.7/site-packages/octoprint/plugin/__init__.py", line 230, in call_plugin
    result = getattr(plugin, method)(*args, **kwargs)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 119, in on_event
    self._track_printjob_event(event, payload)
  File "/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/tracking/__init__.py", line 237, in _track_printjob_event
    sha.update(self._settings.get([b"unique_id"]))
TypeError: update() argument 1 must be string or buffer, not None

It did this right after you kicked off the print job. It's the tracking plugin. This has to be the Anonymous Usage Tracking plugin, new with this major version. Here's the bit of code that's throwing the error:

	def _track_printjob_event(self, event, payload):
		if not self._settings.get_boolean(["events", "printjob"]):
			return

		sha = hashlib.sha1()
		sha.update(payload.get("path"))
		sha.update(self._settings.get([b"unique_id"]))

Do me a favor. Run this cat ~/.octoprint/config.yaml | grep unique (copy/paste that into your putty session). You should see a value there.


#15

Thank you so much for the attention. I run "cat ~/.octoprint/config.yaml | grep unique" and got nothing.
If I remove grep unique, I get the attached text

accessControl:
  salt: REDACTED
api:
  key: REDACTED
plugins:
  announcements:
    _config_version: 1
    channels:
      _blog:
        read_until: 1545132000
      _important:
        read_until: 1521111600
      _octopi:
        read_until: 1527588900
      _plugins:
        read_until: 1544486400
      _releases:
        read_until: 1544449800
  cura:
    cura_engine: /usr/local/bin/cura_engine
  discovery:
    publicPort: 80
    upnpUuid: 78eac33e-a734-4d26-b964-319b4b7c5902
  softwareupdate:
    _config_version: 6
  tracking:
    enabled: false
printerProfiles:
  default: _default
serial:
  autoconnect: true
  log: true
server:
  commands:
    serverRestartCommand: sudo service octoprint restart
    systemRestartCommand: sudo shutdown -r now
    systemShutdownCommand: sudo shutdown -h now
  firstRun: false
  onlineCheck:
    enabled: true
  pluginBlacklist:
    enabled: true
  secretKey: q27Hy9jWV2tc2NfuYqk5k3dE32bkveKD
  seenWizards:
    corewizard: 3
    cura: null
    tracking: null
webcam:
  ffmpeg: /usr/bin/avconv
  snapshot: http://127.0.0.1:8080/?action=snapshot
  stream: /webcam/?action=stream

#16

By the way, I am using a 128GB card. I assume it is ok, but while installing octoprint I did get a message complaining abt it.


#17

My CR10S still have merlin 1.1.0
Should I plan to update that?


#18

The error above indicated that it couldn't find "unique_id" in your config.yaml and you've just confirmed it.

Did you upgrade to v1.3.10 as suggested above? In theory, you wouldn't have that plugin unless you did. But the absence of the config.yaml section makes me wonder.

Visit the Settings -> Anonymous Usage Tracking page. There should be something written next to the Instance ID. If the first checkbox is off, toggle it on. If it's on (and the Instance ID is empty) try toggling it off, save and then return to turn it back on. You're trying to get it to issue an ID.

If all that fails:

sudo nano ~/.octoprint/config.yaml

Under the plugins section, add this just before the next printerProfiles section of the file:

  tracking:
    enabled: true
    unique_id: bbb18e1b-5105-4275-a020-644412786abc

#19

I did the update, and in putty shows Octoprint Version 1.3.10, and octopi 0.15.1
I will try what you suggested now.


#20

Got an ID there
unique_id: 8215753c-a8fb-4c9d-8fef-4f73dab0031d