Backend failure on boot

Have a MythTV related problem? Ask for help from other MythTV users here.

Moderator: Forum Moderators

Post Reply
philrosenberg
Newcomer
Posts: 6
Joined: Thu Apr 16, 2015 8:31 am
Great Britain

Backend failure on boot

Post by philrosenberg » Fri Nov 30, 2018 10:00 pm

Hi
I'm running mythtv on debian, just a single box with a backend and frontend. This is debian stretch with mythtv 0.28.

The backend is failing to start on boot systemctl status gives me the following

Code: Select all

$ sudo systemctl status mythtv-backend

● mythtv-backend.service - LSB: Start/Stop the MythTV server.
   Loaded: loaded (/etc/init.d/mythtv-backend; generated; vendor preset: enabled)
   Active: active (exited) since Fri 2018-11-30 21:37:59 GMT; 3min 22s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 829 ExecStart=/etc/init.d/mythtv-backend start (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/mythtv-backend.service

Nov 30 21:37:59 <hostname> systemd[1]: Starting LSB: Start/Stop the MythTV server....
Nov 30 21:37:59 <hostname> mythtv-backend[829]: Starting MythTV server: mythbackend .
Nov 30 21:37:59 <hostname> systemd[1]: Started LSB: Start/Stop the MythTV server..
Nov 30 21:38:00 <hostname> mythtv-backend[829]: Cannot login to database
Nov 30 21:38:00 <hostname> mythtv-backend[829]: Would you like to configure the database connection now? [no]
Nov 30 21:38:00 <hostname> mythtv-backend[829]: [console is not interactive, using default 'no']
So it seems like it is having problems connecting to the database. Except if I just run mythbackend from the terminal it works fine.

I don't really know enough about systemd to work out what is going on or how to diagnose things properly. Any help much appreciated.

Phil

User avatar
pgbennett
Developer
Posts: 264
Joined: Mon Apr 27, 2015 5:41 pm
United States of America

Re: Backend failure on boot

Post by pgbennett » Fri Nov 30, 2018 11:37 pm

It uses $HOME/.mythtv/config.xml to find the database parameters. I suspect you configured it from a different user id than it is using for the backend. You can copy the .mythtv/config.xml from the user where you ran it successfully to the home directory of where systemd is running it (normally it is run using the mythtv user).

philrosenberg
Newcomer
Posts: 6
Joined: Thu Apr 16, 2015 8:31 am
Great Britain

Re: Backend failure on boot

Post by philrosenberg » Sun Dec 02, 2018 8:50 pm

Thanks for the reply

I ended up rebuilding my system as I got totally lost. I am running on a raspberry pi and ended up accidentally adding non-rpi repos and made a right mess of upgrading from jessie to stretch. I'm running (your?) mythtv-light package and have very nearly got a full frontend and backend setup running. Your post did help though as I still couldn't get the backend to run as a service, then I realised I had no mythtv user, which was the cause of that. Just having some permission issues now, but I'll create a new post to ask about those.

Post Reply