Killed my octopi instance after installing multi cam plugin!?

I tried to install the fiament manger and the
psycopg2 I get the following error:

/oprint/bin/pip install psycopg2
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting psycopg2
  Using cached psycopg2-2.8.5.tar.gz (380 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/pi/oprint/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-uCshxT/psycopg2/setup.py'"'"'; __file__='"'"'/tmp/pip-install-uCshxT/psycopg2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-yc_uiA
         cwd: /tmp/pip-install-uCshxT/psycopg2/
    Complete output (23 lines):
    running egg_info
    creating /tmp/pip-pip-egg-info-yc_uiA/psycopg2.egg-info
    writing /tmp/pip-pip-egg-info-yc_uiA/psycopg2.egg-info/PKG-INFO
    writing top-level names to /tmp/pip-pip-egg-info-yc_uiA/psycopg2.egg-info/top_level.txt
    writing dependency_links to /tmp/pip-pip-egg-info-yc_uiA/psycopg2.egg-info/dependency_links.txt
    writing manifest file '/tmp/pip-pip-egg-info-yc_uiA/psycopg2.egg-info/SOURCES.txt'

    Error: pg_config executable not found.

    pg_config is required to build psycopg2 from source.  Please add the directory
    containing pg_config to the $PATH or specify the full executable path with the
    option:

        python setup.py build_ext --pg-config /path/to/pg_config build ...

    or with the pg_config option in 'setup.cfg'.

    If you prefer to avoid building psycopg2 from source, please install the PyPI
    'psycopg2-binary' package instead.

    For further information please check the 'doc/src/install.rst' file (also at
    <https://www.psycopg.org/docs/install.html>).

    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.


Have I octopi 4 setup with 1.4.2
..........................................................................

I tried arround with update python and install pip.

As it not worked I let it go and started to implement muliple cameras after Cris Righleys Guide.
Sometime later I had to reboot and vola octoprint is not starting any more at all!!
I reverted all the mulicam changes but nothing changed as soon as octoprint service started it exited.
so my last deed was to take an backup older config.yaml, but still octoprint does not start properly.
with the old yaml it shows the dialog attached as a picture before I only got the standear messager the octoprint service is not running 
Attached the log file form the start 

Is there a possibility to make the backup (all settings and plugins) of octoprint work from the commandline?

It would be really hard for me if not because this was my ne instance and 2 evenings of hard work.
Appreciate your help
[octoprint.log|attachment](upload://kraEeqiDE4Bjc0e9GKiqBn2LvXe.log) (39.7 KB) ![2020-08-25 22_37_26-OctoPrint|690x191](upload://6G2WFS3NKJlf8QV7trE3NM66rft.png)

At least I found the backup guide

so this is cleared for me
but it would be better to get the actual up and runningn again

Your post isn't formatted right so I can't get the logs out. Trying to copy the links into my post to see if they're clickable.

EDIT: it worked, taking a look

octoprint.log (39.7 KB)

Sorry for my fault have over seen the upload button just draged and dropped

octoprint.log (39.7 KB)

Is the log file attached one where it errors? It seems that there is no error except the settings - this is probably because you changed the config.yaml file and something is now out of sync, maybe.

You found the backup guide, great, but I'm still not sure what has gone wrong as the log seems to think the server is OK (with the exception of the settings error) but that could be hiding the actual error in the instance

You could try safe mode, to make sure it is not a 3rd party plugin also.

I will move this over to get help so it gets a bit more attention

the problem is , that if I take the old yaml file rename the old log it isnt generating a log at all after reboot
I attach the yaml file with that the exit ist done at once and no new log file is created!

● octoprint.service - LSB: OctoPrint daemon
Loaded: loaded (/etc/init.d/octoprint; generated)
Active: active (exited) since Thu 2020-08-27 10:57:13 BST; 2min 33s ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/octoprint.service

Aug 27 10:57:13 3dp-evolution.pi systemd[1]: Starting LSB: OctoPrint daemon...
Aug 27 10:57:13 3dp-evolution.pi octoprint[521]: Starting OctoPrint Daemon: OctoPrint.
Aug 27 10:57:13 3dp-evolution.pi systemd[1]: Started LSB: OctoPrint daemon.

And the last know log before the problem occured after the reboot +critical config.yaml

octopi1.4.2.futsch.zip (487.6 KB)

Thanks in advance for your help!

Ok, so if the log is not created then maybe something is wrong with the logging config, or the install got corrupted. Try this, to see if you get an error:
sudo service octoprint stop (stops it)
~/oprint/bin/octoprint serve (starts the server manually - should print the log to the terminal)

Let me know if you find anything.

I printed it in the post above so if i start
this appears in the cli

● octoprint.service - LSB: OctoPrint daemon
Loaded: loaded (/etc/init.d/octoprint; generated)
Active: active (exited) since Thu 2020-08-27 10:57:13 BST; 2min 33s ago
Docs: man:systemd-sysv-generator(8)
Tasks: 0 (limit: 4915)
CGroup: /system.slice/octoprint.service

Aug 27 10:57:13 3dp-evolution.pi systemd[1]: Starting LSB: OctoPrint daemon...
Aug 27 10:57:13 3dp-evolution.pi octoprint[521]: Starting OctoPrint Daemon: OctoPrint.
Aug 27 10:57:13 3dp-evolution.pi systemd[1]: Started LSB: OctoPrint daemon.
but as I said no logs no octoprint running

That's just the octoprint service status, not the actual server. Try the commands and paste the output (if any) into a post

Should print something looking like this, not the service status you pasted above. (mine's running from the debugger, not terminal, but it will be similar)

You are the best !!
your last advice has brought me to the cause of the error!

so I started :slight_smile:~ $ ~/oprint/bin/octoprint serve
2020-08-27 15:56:25,130 - octoprint.startup - CRITICAL - Could not initialize settings manager: Error parsing the configuration file, it appears to be invalid YAML. The parser reported an error on line 64, column 17.

and found the critical error in the startup messages:
error in yaml file line 64 :slight_smile:

It was the installation of the multicam plugin entry and the
URL that I have entered! ?

What the heck ist wrong in line 64

grafik

       multicam_profiles:

line64 - URL:http://192.168.66.15/webcam/?action=stream

if I remove everything but "/webcam/?action=stream" as the standard entry
same error
I removed the hole entry after URL:
Server is starting again

What the ...

First, thank you so much you saved me 2 days!!

Seccond if you can tell me what is wrong with the not working entry

THANKS
Kai

P.S: were can I find more of the important commands you send:
~/oprint/bin/octoprint serve

Disclaimer: I'm not a yaml expert.

All other lines have a space after the ":".

You were absolutly right!
It is the blank space that killed the whole cenario.
I mean yes it is a fault, but should never stop the octoprint from starting.
@fossel
is it possible to capture such an "format error in config.yaml as a warning but not in a total stop of octoprint?

Was just coming here to reply, but saw I was beaten to it!

The issue with this, is that the settings are required for the server to run, so how does it know how to run, basically. How did the settings get there in the first place? Did you manually enter them or through the web UI?

The other reason (I believe) this does not come through in the logs, is that in order for the logs to initialise, it depends on the logging settings. As a result, bad settings means no logging.

There may be a way of handling the error, but in theory there should not be errors in config.yaml since it is read and set by the YAML library. And it is printed to console, if you run manually

For this, I'm sure there was a section in the docs that listed CLI commands, but now cannot find it! Will let you know if I do.

You should also now be able to do this:


to help out anyone else who comes across this issue.

One Information about the url, think this is important:
I "did not" edit the config.yaml by hand!
As of now I dont know how the missing blank came there!
When I have made 42 backups! of the sd card I will try again and hope to find out how this happens

1 Like