Page 1 of 1

backend service fails right away

Posted: Tue Oct 01, 2019 5:31 pm
by Jeff42
£Start the mythtv-backend
sudo systemctl stop mythtv-backend
mythtv-setup
sudo systemctl daemon-reload
sudo systemctl start mythtv-backend
systemctl status mythtv-backend
* mythtv-backend.service - MythTV Backend
Loaded: loaded (/lib/systemd/system/mythtv-backend.service; enabled; vendor p
Active: active (running) since Tue 2019-10-01 18:17:28 BST; 502ms ago
Docs: https://www.mythtv.org/wiki/Mythbackend
Main PID: 1671 (mythbackend)
Tasks: 1 (limit: 2200)
Memory: 3.5M
CGroup: /system.slice/mythtv-backend.service
`-1671 /usr/bin/mythbackend --quiet --syslog local7

Oct 01 18:17:28 raspberrypi systemd[1]: Started MythTV Backend.

So far so good, so I try the mythtv frontend to see if I get a channel but it cant find the backend. so I check its status and its stopped and tried to restart too quickly?

then goes
pi@raspberrypi:~ $ systemctl status mythtv-backend
* mythtv-backend.service - MythTV Backend
Loaded: loaded (/lib/systemd/system/mythtv-backend.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-10-01 18:23:29 BST; 1min 16s ago
Docs: https://www.mythtv.org/wiki/Mythbackend
Process: 3962 ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS (code=exited, status=138)
Main PID: 3962 (code=exited, status=138)

Oct 01 18:23:28 raspberrypi systemd[1]: mythtv-backend.service: Failed with result 'exit-code'.
Oct 01 18:23:29 raspberrypi systemd[1]: mythtv-backend.service: Service RestartSec=1s expired, scheduling restart.
Oct 01 18:23:29 raspberrypi systemd[1]: mythtv-backend.service: Scheduled restart job, restart counter is at 10.
Oct 01 18:23:29 raspberrypi systemd[1]: Stopped MythTV Backend.
Oct 01 18:23:29 raspberrypi systemd[1]: mythtv-backend.service: Start request repeated too quickly.
Oct 01 18:23:29 raspberrypi systemd[1]: mythtv-backend.service: Failed with result 'exit-code'.
Oct 01 18:23:29 raspberrypi systemd[1]: Failed to start MythTV Backend.

Re: backend service fails right away

Posted: Tue Oct 01, 2019 5:56 pm
by MikeB2013
You need to check the mythbackend log (/var/log/mythtv/mythbackend.log) the last few lines may give a clue as to why it is restarting.
Restarting too many times usually means something is wrong after using mythtv-setup, although it can also be due to network problems.

Mike

Re: backend service fails right away

Posted: Tue Oct 01, 2019 7:22 pm
by blm-ubunet
I could be completely wrong but..
From personal experience syslog-ging is not compatible with systemd without a lot of extra plumbing..
Without that plumbing, the backend appears to run for sometime & until all server interfaces lock.

Also I believe you need mythtv compiled with systemd support for all to work nicely.

There's a systemd service file example on mythtv wiki but that was not reliable either. There was some discussion in mythtv IRC that revealed some configuration that has worked well for over 6 months. I'll post it here later.

https://irc.mythtv.org/ircLog/channel/4/2019-01-23
--systemd-journal --quiet

Re: backend service fails right away

Posted: Tue Oct 01, 2019 10:19 pm
by Jeff42
it would appear the storage directory I specified wasnt writable. I had to chmod to do so.

it is now running thanks both for the tips. Later tonight maybe I'll try to configure it with my hd home run tuner. So far typing freqs at it doesnt seem to work for getting a channel in there. Is there a handy guide for doing the mythtv-setup program?