Octoprint won't start


#1

A little background... My Octoprint has been running wonderfully for the last few years. The last few (2) commits have not installed correctly. And after a restart today, it the octoprint service won't run.

I've accumulated quite a number of plugins and customizations (ie start scripts... etc.), so I'm interested in getting back in to at least back these up.

What is the problem?
Octoprint service won't start.

What did you already try to solve it?
Tried to clean and reinstall from github with the following commands:
git pull
python setup.py clean
pip install .

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

Octoprint.log output:
Octoprint.log

Any help would be appreciated!
Ken


#2

Well...

cat ~/.octoprint/logs/octoprint.log |grep "|" | grep "= /home/pi/" | grep -v "bundled" | sort | uniq | sed 's|\|||g'> ~/.octoprint/current-plugins.txt
        

This will give you a file ~/.octoprint/current-plugins.txt as a list to reinstall should you need to.

That came from the OctoPi-upgrade-helper script which will backup the .octoprint folder, mostly. Any settings would be stored in .octoprint/config.yaml, for what it's worth.


#3

Here's the error:

  File "/home/pi/oprint/lib/python2.7/site-packages/OctoPrint-1.4.0.dev1374_g7ab4b90-py2.7.egg/octoprint/server/__init__.py", line 539, in run
    octoprint.timelapse.valid_timelapse("test")
AttributeError: 'module' object has no attribute 'valid_timelapse'

That appears to be code in devel that isn't in the 1.3.x tagged code. It is probably an incompatible plugin, did you try booting in safe mode?

Naturally, if you are on a system that is critical and hard to restore, you shouldn't be running it from a git branch- arguably, you shouldn't even be using a release candidate.


#4

Thanks for the replies.

@OutsourcedGuru - Nice script. Running it now in case I have to start from a new Octopi install. When I run the script with "restore" should the tarball extract and implement all my settings?

@tedder42 - That's a good point. I'll have to re-think how critical nature of the Octoprint instance.

After the print I needed, I tried going back to the devel and maintenance commits. I changed the timelapse options to avoid the previous error. The attempt failed due to:
OSError: [Errno 2] No such file or directory: '/home/pi/oprint/local/lib/python2.7/site-packages/PyYAML-3.13rc1-py2.7-linux-armv7l.egg'
Manually installing this package fixed the problem and Octoprint installed successfully.

Now I'm running into another error:
2018-07-20 06:10:37,062 - octoprint.cli.server - ERROR - Uncaught exception
...
TypeError: initialize() got an unexpected keyword argument 'default_max_body_size'

Here's the full log: Octoprint_20180720_01.log

Any suggestions would be appreciated!

Thanks!
Ken


#5

That looks like something is really confused there. Might be that some old versions of OctoPrint are still lying around in your virtualenv, causing trouble. To rule that out I suggest to delete the virtual environment, recreate it, then reinstall.

I switch between maintenance and devel regularly (for obvious reasons I guess) and just fired up the same version that you have issues with (1.4.0.dev1374+g7ab4b90d0) - came up flawlessly :woman_shrugging:

I also want to underline what @tedder42 said: If you need your OctoPrint instance able to run at all times I'd strongly recommend against running bleeding edge devel branch. I'd even recommend against bleeding edge maintenance branch. Better rely on stable releases or maybe release candidates in that case. I do my best to keep things working on the development branches, but they are development branches. Things can break. Things will break.


#6

Yes. It's time to re-image Octopi. This installation has been running since 2016 when the RPi 3 was released...

Thanks for everyone's help.


#7

That's what it was intended to do. As long as your config.yaml isn't in a corrupt state, you should reasonably get back functionality. Just read the script's output each time you run it. Anything shown to you in bold is an instruction for you.