Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

After upgrade octoprint is not starting #2759

Closed
acocalypso opened this issue Jul 25, 2018 · 24 comments
Closed

After upgrade octoprint is not starting #2759

acocalypso opened this issue Jul 25, 2018 · 24 comments
Labels
bug Issue describes a bug needs information More information is needed to further process this issue or PR triage This issue needs triage

Comments

@acocalypso
Copy link

acocalypso commented Jul 25, 2018

What were you doing?

  1. Installed update via webinterface 1.3.8

What did you expect to happen?

Octoprint will start without issues

What happened instead?

Infopage showed up that octoprint is not up
I checked the running processes and octoprint wasn't running
I saw in the octoprint.log that there was an error with PrintTImeGenue so I removed it with
pip uninstall Octoprint-PrintTimeGeniue

Plugin was successfully removed
I did a reboot of the Raspberry Pi3
Octoprint still not working

Link to octoprint.log

https://pastebin.com/NGziqmLk

Version of OctoPrint

1.3.9

Operating System running OctoPrint

RaspberryPI 3

I have read the FAQ.

@GitIssueBot GitIssueBot added the triage This issue needs triage label Jul 25, 2018
@khseal
Copy link

khseal commented Jul 25, 2018

My Octoprint broken after updgrade.
Error log:
khseal@C110:~/OctoPrint/venv/bin$ ~/OctoPrint/venv/bin/octoprint serve
Traceback (most recent call last):
File "/home/khseal/OctoPrint/venv/bin/octoprint", line 5, in
from pkg_resources import load_entry_point
File "/home/khseal/OctoPrint/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2707, in
working_set.require(requires)
File "/home/khseal/OctoPrint/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/khseal/OctoPrint/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: pkginfo>=1.4.2,<1.5

@khseal
Copy link

khseal commented Jul 25, 2018

Full reinstall octoprint.
Other errors:
(venv)khseal@C110:~/OctoPrint$ ~/OctoPrint/venv/bin/octoprint serve
Traceback (most recent call last):
File "/home/khseal/OctoPrint/venv/bin/octoprint", line 5, in
from pkg_resources import load_entry_point
File "/home/khseal/OctoPrint/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2707, in
working_set.require(requires)
File "/home/khseal/OctoPrint/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/khseal/OctoPrint/venv/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: monotonic>=1.3,<1.4

The package monotonic of the required version is installed, but the octoprint does not see it.
Reinstall package, no solved problem.
(venv)khseal@C110:~/OctoPrint$ pip show monotonic
Name: monotonic
Version: 1.3
Summary: An implementation of time.monotonic() for Python 2 & < 3.3

@sticilface
Copy link

Me too. Total failed upgrade to 1.3.9 and failing to start. Tried reinstall. Will start from command line but service fails to load. Tried so many fixes now I’m just going to flash new sd card and start over!

@khseal
Copy link

khseal commented Jul 26, 2018

I'm start command on console ./venv/bin/python setup.py install
Octoprint started.
My problem solved, after reinstall Octoprint.

@foosel
Copy link
Member

foosel commented Jul 26, 2018

@acocalypso I'll need some more info in order to be able to analyse this.

What version of OctoPrint where you coming from (I figure 1.3.8?)? You state you are running this on Raspberry Pi and the paths in your log suggest it's OctoPi - which version of OctoPi? What does ~/oprint/bin/pip --version and ~/oprint/bin/python --version return?

@sticilface same for you - more info please. "It doesn't work" is not something I can work with in order to help you. I need logs, error messages, versions etc.

@foosel foosel added the needs information More information is needed to further process this issue or PR label Jul 26, 2018
@sticilface
Copy link

I realise that my info was not particularly helpful. unfortunately i cut my losses, backed the .octoprint folder up and flashed a new image! needed to print something last night! now running 1.3.9 no problems!

@zero-llamas
Copy link

Similar to above, upgraded from 1.3.8 to 1.3.9 when offered through web interface, all went well until the restart, then I get "503 Service Unavailable". When I try to run octoprint directly I get:

$ oprint/bin/octoprint
Traceback (most recent call last):
File "oprint/bin/octoprint", line 5, in
from pkg_resources import load_entry_point
File "/home/pi/oprint/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 2707, in
working_set.require(requires)
File "/home/pi/oprint/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 686, in require
needed = self.resolve(parse_requirements(requirements))
File "/home/pi/oprint/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 584, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: python-dateutil>=2.6.1,<2.7

My versions of pip and python are:
python: 2.7.3
pip: 9.0.1

This is quite an old system (maybe 3 years old?) that I have kept pushing along. Is python simply out of date, as the message would seem to imply?

@acocalypso
Copy link
Author

@foosel:

I upgraded from 1.3.8 to 1.3.9

python: 2.7.3
pip: 9.0.1

octopi Image was 0.15.1

@foosel
Copy link
Member

foosel commented Jul 27, 2018

@zero-llamas could be. I test against older versions of OctoPi/Raspbian, but not as old as that Python version seems to imply. 2.7.3 is fairly ancient. What output does ~/oprint/bin/pip install "python-dateutil>=2.6.1,<2.7" produce?

@acocalypso, Something doesn't seem right here. OctoPi 0.15.1 comes with Python 2.7.13:

------------------------------------------------------------------------------
OctoPrint version : 1.3.9
OctoPi version    : 0.15.1
------------------------------------------------------------------------------

pi@octopi2:~ $ ~/oprint/bin/python --version
Python 2.7.13

I tested the upgrade path from 1.3.8 to 1.3.9 on OctoPi 0.14, 0.15.0 and 0.15.1 in various combinations. No issues here.

@acocalypso & @zero-llamas could you please share your ~/.octoprint/logs/plugin_softwareupdate_console.log here? Download it through something like WinSCP, rename it to end in ".txt" and then just attach it to your comment.

@zero-llamas
Copy link

@foosel output from pip command:
~/oprint/bin/pip install "python-dateutil>=2.6.1,<2.7"
Requirement already satisfied: python-dateutil<2.7,>=2.6.1 in ./oprint/lib/python2.7/site-packages
Requirement already satisfied: six>=1.5 in ./oprint/lib/python2.7/site-packages/six-1.10.0-py2.7.egg (from python-dateutil<2.7,>=2.6.1)
You are using pip version 9.0.1, however version 18.0 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

I think there may be a clue in those last couple of lines ;)
plugin_softwareupdate_console.log.txt

I have attached the log file, but since I'm running OctoPi 0.12.0 I think I'm just dragging this issue in the wrong direction. I'm going to try https://octoprint.org/blog/2017/11/01/octopi-0.12-pip-issues/ and see how it goes.

Update: after upgrading using those instructions it has come back up again. So, in my case at least, it was simply old age. It might be worth doing some sanity checks on the version of python and pip before updates, and throw an error or warning if it's much outside your testing setup.

Thanks for your help. @foosel still loving Octoprint!

@AndKe
Copy link

AndKe commented Jul 27, 2018

I should have not trusted a baked German :)
"503 Service Unavailable" after restart when it did not came up.

  • my OctoPi is also at least 4-5 year old.
  • is there a fix ?

@foosel
Copy link
Member

foosel commented Jul 27, 2018

@AndKe I'm unable to comment unless you share some logs and version info. See my corresponding requests above.

@AndKe
Copy link

AndKe commented Jul 27, 2018

Yes, sorry about that ... I did a OctoPi update and upgrade..
then tried https://octoprint.org/blog/2017/11/01/octopi-0.12-pip-issues/

my status is now:
pi@octopi ~/OctoPrint $ ~/oprint/bin/pip install "python-dateutil>=2.6.1,<2.7"
Requirement already satisfied: python-dateutil<2.7,>=2.6.1 in /home/pi/oprint/lib/python2.7/site-packages/python_dateutil-2.6.1-py2.7.egg (2.6.1)
Requirement already satisfied: six>=1.5 in /home/pi/oprint/lib/python2.7/site-packages/six-1.10.0-py2.7.egg (from python-dateutil<2.7,>=2.6.1) (1.10.0)

now, on service restart I get the text
"OctoPrint server started, waiting for it to get ready..."
, and then the endless wait

cat /home/pi/.octoprint/logs/octoprint.log |tail
2018-07-27 20:16:37,567 - octoprint.util.comm - INFO - Printer reports firmware name "Marlin 1.1.8 (Github)"
2018-07-27 20:16:37,823 - octoprint.util.comm - INFO - Firmware states that it supports temperature autoreporting

The two final log lines for OctoPrint are from before upgrading...

@AndKe
Copy link

AndKe commented Jul 27, 2018

then, after a long wait, it suddenly is back ! :)
Thank you.
hope you get reasonable temperatures soon

@foosel
Copy link
Member

foosel commented Jul 27, 2018

Thanks, so far it's not looking like it'll cool down soon.

Honest question for both you @AndKe and @zero-llamas - I take it you hadn't yet followed the announcement before? If so, first of all, why? It's not like I put that out just for the fun of it ;) And second of all: past updates through OctoPrint worked anyway? That puzzles me greatly.

@AndKe
Copy link

AndKe commented Jul 27, 2018

@foosel

"I take it you hadn't yet followed the announcement before?"
I do not know what exact announcement you mean.
I am an eager reader of releasenotes, - reading about the cancel/pause fix made me upgrade ASAP (that was annoying, so thanks for fixing)
Few days back I read about the security warning, and checked the version, regardless of the printer being inaccessible from outside without VPN.

So I have the OctoPi 0.12.0 , now updated. it's not exposed to the internet, so I do some updating to the OctoPi .. yearly .. or less.
It worked all the years, except once , you helped me out with #2193

  • then it worked.. every time till now.

I do not honestly know what announcement you mean but it's not that easy to know what OctoPi version/update status one is at (so a quick mention may be overlooked ?), maybe you need to check for some dependencies, and give us a kick in the ass by denying upgrade if you see too old... pip (?)

@zero-llamas
Copy link

@foosel yep, similar story. I tended to hit upgrade every time it told me there was a new version of octoprint. I must have missed the original message about upgrading python, the only reason I found it was from googling "upgrading python on octopi" when I realised it was all too old.

@foosel
Copy link
Member

foosel commented Jul 28, 2018

You both should have gotten a big red important looking notification about the link you both now followed to fix things, back in November:

image

Unless you disabled the announcement plugin which you really should for these exact kind of reasons since it's the only way to reach people with important notifications like "yo, do this or things will stop working" who don't follow OctoPrint on social media or directly on the blog.

maybe you need to check for some dependencies, and give us a kick in the ass by denying upgrade if you see too old... pip

Sorry, but I can't anticipate every single potential incompatibility under the sun and prepare for it while also doing everything else I already do. In this particular case even less though due to the nature of the issue. I blast out warnings for such stuff through OctoPrint as soon as I notice them. Following the links explains exactly how to check if one is affected and what to do to fix things.

I run this project mostly alone, take care of the ongoing maintenance, future updates, compatibility tests as far as I can justify them, have to look into funding, manage the community, provide support, try not to grow too frustrated at some of the very infuriating messages I receive, get screamed at for updates gone wrong due to reasons outside of my control, am expected to work around broken firmware, solve issues before they even arise and implement new functionality ideally yesterday because it's so important for someone's workflow right now.

I do all of that as far as humanly possible. Please do your part and follow warnings I put out when I put them out and not 9 months later ;)

@AndKe
Copy link

AndKe commented Jul 28, 2018

@foosel I (and I should say nooone?) blame you, you do a great job, and it's first and foremost as you say, a PEBCAK.

That said, announcements are on, and there is no valid excuse for what I apparently missed (or thought I did) back then.

One thing I did not document, but may mention now. as this happened to me few days back:
Coming from vacation, I have not printed anything for a month or little more.
Logged in to OctoPrint, and the whole right side (or maybe more) were full of notifications.
I selected first one, and clicked "read" - in opened... in the background of notifications, unreadable.
So I were unable click the "frame" that opened away, or read it, and I think I had to do a refresh, or something, so all of them were suddenly gone.

I think I found them all in the "settings menu" , at least , I found and got to read the one about connect/disconnect that cached my attention.

Long story short: please make the "read" button spawn the article on top, not below, the notifications.

  • and no, this is in no way an excuse for what we failed to upgrade. But it could be an contributing factor for somebody not fully set on getting to read the notifications.

@foosel
Copy link
Member

foosel commented Jul 28, 2018

Sorry, that was poorly phrased on my side - I didn't mean that you blamed me, but on every update I get people that are... let's just say "unfair" ;) and who throw around a lot of blame and don't even consider the issue maybe residing on their end. It was those people I was referring to with regards to all the stuff I already handle which simply doesn't leave a lot of room for further anticipation and resilience against possible sources of errors during operation.

I agree that the notifications in general need a different handling, that's something I've been thinking about how best to solve too.

@MechaNickW
Copy link

I am having a similar issue. I am running an OctoPi 0.12.0 on a Raspi model B, upgrading from 1.3.8 to 1.3.9. I did apply the fixes in the bright red notification way back when they first came out, have kept current on updates ever since with no issue. I get the 503 Service Unavailable error when trying to log into Octoprint, and have tried manually restarting with no success through SSH. I'm trying to reinstall Octoprint manually from the command line, if that doesn't work I will upgrade my OctoPi image. I'm not complaining or expecting a fix on this ancient of a setup, just wanted to identify that this did occur on an instance with the applied pip/python patches.

Gina, thank you SO MUCH for your continued work on this project. I support through Patreon, it's worth every cent and I hope you continue work on Octoprint - it's literally my favorite piece of the 3D printing software toolchain.

@foosel
Copy link
Member

foosel commented Oct 29, 2018

Unless I'm mistaken (if so, please speak up), this is fixed by the steps outlined in this post, so I'll close this.

I don't understand why that fix apparently didn't take hold for some but I honestly can't justify spending more time looking into this considering how old 0.12 is at this point - sorry. 1.3.10 will ship with a bundled backup plugin that allows you to easily migrate to fresher images though.

@foosel foosel closed this as completed Oct 29, 2018
@MechaNickW
Copy link

@foosel
Gina, my issue ended up being outdated hardware. I had applied the patch you link to on my old 0.12 instance already, but things had started to go downhill for the responsiveness of Octoprint. I had updated to 0.15 on the Raspberry Pi Model B, but it simply wasn't enough processing power to run everything anymore. I was having the issues outlined here in my post here: #2799

As an update, I flashed 0.15 on a Raspi 2 and all is working smoooooth. You are 100% justified in spending your efforts doing upgrades and improving the current versions of Octoprint rather than chasing down issues that are due to ancient hardware and software. Thanks again for your efforts, I love that 1.3.10 will have a cleaner way to update OctoPi images! You da best.

@bzamecnik
Copy link

bzamecnik commented Dec 30, 2018

I've also came across the problem. Just to point out to an actionable solution, upgrade pip and reinstall. In my case pip install . didn't work, but python setup.py install did. Better would be read the notices properly and upgrade OctoPi from 0.12 to newest release.

-> https://octoprint.org/blog/2017/11/01/octopi-0.12-pip-issues/?utm_source=rss&utm_medium=important

~/oprint/bin/pip install --index-url https://pypi.python.org/simple --upgrade pip
printf -- "[easy_install]\nindex-url = https://pypi.python.org/simple\n" > ~/.pydistutils.cfg

cd ~/OctoPrint
git pull
~/oprint/bin/python setup.py install
sudo service octoprint restart

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 28, 2020
@foosel foosel added the bug Issue describes a bug label Oct 8, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue describes a bug needs information More information is needed to further process this issue or PR triage This issue needs triage
Projects
None yet
Development

No branches or pull requests

9 participants