[mythtv-users] I broke my mythTV, help!

Douglas Peale Douglas_Peale at comcast.net
Tue Nov 6 04:28:26 UTC 2018


On 11/5/18 7:42 PM, Bill Meek wrote:
> On 11/5/18 9:20 PM, Douglas Peale wrote:
>> sudo systemctl enable mythtvbackend
>> Failed to enable unit: Unit file mythtvbackend.service does not exist.
>>
>> Hmm, wrong name.
>
> My typo, but in your previous post (bottom of this) the service
> name was mythbackend.service.
>
> You have two instances of the service. The one in the 1st post:
>
>     /etc/systemd/system/mythbackend.service
There were two mythbackend files there, mythbackend.service, and mythbackend.service.d I moved both to my home directory in case
I need to put them back.
>
> and the one just below:
>
>     /lib/systemd/system/mythtv-backend.service
>
> Disable one, I'd remove the one in /etc. Do a:
>
>     sudo systemctl daemon-reload
>
> after that.
>
> As to the DB login failure, make sure the password in
> ~mythtv/.mythtv/config.xml is correct (you may have
> config.xml in a different place. The systemctl cat...
> mentioned before should help you locate where it is.

I have verified that I can log into the database, and the password in the config.xml file is the same one I used to log in.

Interestingly, the mythtv-backend.service refers to mythbackend

20:16:42:/lib/systemd/system
$ cat mythtv-backend.service
[Unit]
Description=MythTV Backend
Documentation=https://www.mythtv.org/wiki/Mythbackend
After=mysql.service network.target
 
[Service]
User=mythtv
EnvironmentFile=-/etc/mythtv/additional.args
ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
StartLimitBurst=10
StartLimitInterval=10m
Restart=on-failure
RestartSec=1
 
[Install]
WantedBy=multi-user.target


This is the content of mythbackend.service:

20:19:21:~
$ cat mythbackend.service
[Unit]
Description=MythTV backend service
# The following line will cause mythbackend to be terminated if the database dies.
# If you do not want this then use a weaker binding such as "Requires" or "Wants".
BindsTo=mysql.service
Wants=network-online.target
After=mysql.service network-online.target

# Persistently named adapters
# Needs a systemd tag added to your udev persistent naming rules
#Requires=dev-dvb-adapter0-frontend0.device
#After=dev-dvb-adapter0-frontend0.device

[Service]
# Wait for a dbus notification from mythbackend before starting other services
# This is enabled by default 0.28 onwards (may be in 0.27 as well)
# To disable this change type to simple
Type=notify
NotifyAccess=main

# Allow core dumps
# The core resource limit on the user specified below can reduce what
# is specified here. So it needs to be set as well.
LimitCORE=infinity

User=mythtv

StandardOutput=null
StandardError=journal

ExecStart=/full/path/to/mythbackend $MYTHBACKEND_ARGS

[Install]
WantedBy=multi-user.target


For completeness, I'm including the results of the cat:

There was nothing for mythtvbackend.

$ sudo systemctl cat mythbackend
# /etc/systemd/system/mythbackend.service
[Unit]
Description=MythTV backend service
# The following line will cause mythbackend to be terminated if the database dies.
# If you do not want this then use a weaker binding such as "Requires" or "Wants".
BindsTo=mysql.service
Wants=network-online.target
After=mysql.service network-online.target

# Persistently named adapters
# Needs a systemd tag added to your udev persistent naming rules
#Requires=dev-dvb-adapter0-frontend0.device
#After=dev-dvb-adapter0-frontend0.device

[Service]
# Wait for a dbus notification from mythbackend before starting other services
# This is enabled by default 0.28 onwards (may be in 0.27 as well)
# To disable this change type to simple
Type=notify
NotifyAccess=main

# Allow core dumps
# The core resource limit on the user specified below can reduce what
# is specified here. So it needs to be set as well.
LimitCORE=infinity

User=mythtv

StandardOutput=null
StandardError=journal

ExecStart=/full/path/to/mythbackend $MYTHBACKEND_ARGS

[Install]
WantedBy=multi-user.target

# /etc/systemd/system/mythbackend.service.d/environment.conf
[Service]
# Command line arguments to be passed by systemd to mythbackend on startup.
# This variable must be defined or the service will not start.
Environment="MYTHBACKEND_ARGS=--logpath=/home/roger/logs --verbose=none,dvbsicache,tempdebug:debug"

# Environment variables for the mythbackend program itself
Environment=MYTHCONFDIR=/etc/mythtv


$ sudo systemctl cat mythtv-backend
# /lib/systemd/system/mythtv-backend.service
[Unit]
Description=MythTV Backend
Documentation=https://www.mythtv.org/wiki/Mythbackend
After=mysql.service network.target
 
[Service]
User=mythtv
EnvironmentFile=-/etc/mythtv/additional.args
ExecStart=/usr/bin/mythbackend --quiet --syslog local7 $ADDITIONAL_ARGS
StartLimitBurst=10
StartLimitInterval=10m
Restart=on-failure
RestartSec=1
 
[Install]
WantedBy=multi-user.target


(deleted a bunch of e-mail history here)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.mythtv.org/pipermail/mythtv-users/attachments/20181105/778359e1/attachment.sig>


More information about the mythtv-users mailing list