"Failed to start /etc/rc.local"

since last update the autostart of two of my python tools seems broken.

it says “Failed to start /etc/rc.local”

the script worked fine until last update.

also there ist a strange message in “dmesg”
[ 3.461625] systemd[1]: Job plymouth-log.service/start deleted to break ordering cycle starting with basic.target/start

has anyone an idea what could have happened?

logs are on: http://paste.osmc.io/jobewivike

cheers bendsch

I don’t think it’s updates that have caused your problem. :wink:

Spot the error:

May 08 22:01:55 B2RASP2 rc.local[249]: Traceback (most recent call last):
May 08 22:01:55 B2RASP2 rc.local[249]: File "/home/osmc/CouchPotatoServer/CouchPotato.py", line 131, in <module>
May 08 22:01:55 B2RASP2 rc.local[249]: l = Loader()
May 08 22:01:55 B2RASP2 rc.local[249]: File "/home/osmc/CouchPotatoServer/CouchPotato.py", line 40, in __init__
May 08 22:01:55 B2RASP2 rc.local[249]: settings.setFile(self.options.config_file)
May 08 22:01:55 B2RASP2 rc.local[249]: File "/home/osmc/CouchPotatoServer/couchpotato/core/settings.py", line 66, in setFile
May 08 22:01:55 B2RASP2 rc.local[249]: self.p.read(config_file)
May 08 22:01:55 B2RASP2 rc.local[249]: File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
May 08 22:01:55 B2RASP2 rc.local[249]: self._read(fp, filename)
May 08 22:01:55 B2RASP2 rc.local[249]: File "/usr/lib/python2.7/ConfigParser.py", line 546, in _read
May 08 22:01:55 B2RASP2 rc.local[249]: raise e
May 08 22:01:55 B2RASP2 rc.local[249]: ParsingError: File contains parsing errors: /root/.couchpotato/settings.conf
May 08 22:01:55 B2RASP2 rc.local[249]: [line 538]: 'passwor'
May 08 22:01:55 B2RASP2 rc.local[249]: Traceback (most recent call last):
May 08 22:01:55 B2RASP2 rc.local[249]: File "/home/osmc/CouchPotatoServer/CouchPotato.py", line 131, in <module>
May 08 22:01:55 B2RASP2 rc.local[249]: l = Loader()
May 08 22:01:55 B2RASP2 rc.local[249]: File "/home/osmc/CouchPotatoServer/CouchPotato.py", line 40, in __init__
May 08 22:01:55 B2RASP2 rc.local[249]: settings.setFile(self.options.config_file)
May 08 22:01:55 B2RASP2 rc.local[249]: File "/home/osmc/CouchPotatoServer/couchpotato/core/settings.py", line 66, in setFile
May 08 22:01:55 B2RASP2 rc.local[249]: self.p.read(config_file)
May 08 22:01:55 B2RASP2 rc.local[249]: File "/usr/lib/python2.7/ConfigParser.py", line 305, in read
May 08 22:01:55 B2RASP2 rc.local[249]: self._read(fp, filename)
May 08 22:01:55 B2RASP2 rc.local[249]: File "/usr/lib/python2.7/ConfigParser.py", line 546, in _read
May 08 22:01:55 B2RASP2 rc.local[249]: raise e
May 08 22:01:55 B2RASP2 rc.local[249]: ConfigParser.ParsingError: File contains parsing errors: /root/.couchpotato/settings.conf
May 08 22:01:55 B2RASP2 rc.local[249]: [line 538]: 'passwor'
May 08 22:01:55 B2RASP2 sudo[469]: pam_unix(sudo:session): session closed for user root
May 08 22:01:55 B2RASP2 systemd[1]: rc-local.service: control process exited, code=exited status=1

hmmm ist it because i start CP with sudo?

i dont thik that this causes the problem, tried it with and without sudo - makes no difference …

further: if i start the CP manually in console it works.

According to the log above you have password spelt wrong in the configuration file, which is causing it to crash.

hmmm … that is not possible. it works with manual startup. also this does not explain why the other python app (sickbeard) does not start up automatically.

The error is there in black and white, it is clearly causing the Python script that you are running from rc.local to crash. Please fix the error in settings.conf and see if it fixes the problem with rc.local.

strange if i start couchpotato manually with sudo i get the same error as posted in the log, if i start it without sudo everything works fine.

anyway this does not explain why sickbeard is not starting.

When you start it without sudo you will use a different config file :wink:

oh ok, my bad. but still: i only appended sudo to the startup command because the rc.local wouldn t start the jobs anymore.

so this is a problem that came while i was trying to fix the stuff on my own.

see the logs starting up without sudo: http://paste.osmc.io/logeranago

hmm

13:45:27 T:1642116128 NOTICE: Thread LanguageInvoker start, auto delete: false
13:45:27 T:1642116128 NOTICE: -->Python Interpreter Initialized<–
13:45:29 T:1659155488 ERROR: EXCEPTION: Non-Existent Control 300

could it be that python is not unable to load on startup because some necessary services are not loaded the time the rc.local script is called?

There’s your problem.

If you’re starting couchpotato manually from the command line then you are running it under the osmc user account. Any commands you run in /etc/rc.local are running as root.

If you need to run a command in rc.local under the osmc user account you need to use sudo, like so:

sudo -u osmc command-to-run

thx a lot, it seems to be working now!!