Mythtv backend no upnp problem

I found one thread on this, unresolved, from 2009. Yikes.

Here is the problem. You go into yast2 to start the mythbackend. It starts but fails with this error message:

mythbackend.service - MythTV backend service Loaded: loaded (/usr/lib/systemd/system/mythbackend.service; enabled) Active: failed (Result: exit-code) since Mon 2013-12-30 22:02:06 PST; 1h 55min ago Process: 331 ExecStart=/usr/bin/mythbackend --logpath /var/log/mythtv $MYTHBACKEND_OPTIONS (code=exited, status=130) Main PID: 331 (code=exited, status=130)
Dec 30 22:02:02 linux-wh01 mythbackend[331]: 2013-12-30 22:02:02.998452 I Added logging to mythlogserver at TCP:35327 Dec 30 22:02:03 linux-wh01 mythbackend[331]: 2013-12-30 22:02:03.029393 I UPNP Search 1 secs Dec 30 22:02:03 linux-wh01 mythbackend[331]: 2013-12-30 22:02:03.366678 I UPNP Search 1 secs Dec 30 22:02:04 linux-wh01 mythbackend[331]: No UPnP backends found Dec 30 22:02:04 linux-wh01 mythbackend[331]: Would you like to configure the database connection now? [no] Dec 30 22:02:04 linux-wh01 mythbackend[331]: [console is not interactive, using default ‘no’] Dec 30 22:02:04 linux-wh01 mythbackend[331]: 2013-12-30 22:02:04.793924 I No UPnP backends found Dec 30 22:02:04 linux-wh01 mythbackend[331]: 2013-12-30 22:02:04.794083 C Failed to init MythContext. Dec 30 22:02:04 linux-wh01 systemd[1]: mythbackend.service: main process exited, code=exited, status=130/n/a Dec 30 22:02:06 linux-wh01 systemd[1]: Unit mythbackend.service entered failed state.
Warning: Unit file changed on disk, ‘systemctl daemon-reload’ recommended.

Now to be totally accurate here, I found one thread in German about this problem and used the google translator to grind through the posted solution.
https://forums.opensuse.org/deutsch-german/hilfe-und-helfen/anwendungen/print-493264-kein-automatischer-start-von-mythbackend-beim-booten-2.html

The guts of the discussion is to create this file:
sudo cp /var/adm/fillup-templates/sysconfig.mythbackend /etc/sysconfig/mythbackend

Well the first file does exist and the second doesn’t, so no harm doing this command. But it didn’t solve the problem.

So looking at the error message from the service start up, this file is indicated:
/usr/lib/systemd/system/mythbackend.service

The file contents are listed below. I added --noupnp , which didn’t do any good.

[Unit]
Description=MythTV backend service
After=network.target
After=mysql.service

[Service]
Type=simple
EnvironmentFile=/etc/sysconfig/mythbackend
User=mythbackend
Group=video
ExecStart=/usr/bin/mythbackend --noupnp --logpath /var/log/mythtv $MYTHBACKEND_OPTIONS

[Install]
WantedBy=multi-user.target

Ah, so this /etc/sysconfig/mythbackend file was required. So our German speaking buddies are onto something. The contents of this file are listed below. I added the --noupnp .

Path: Applications/mythTV/mythbackend

Description: Basic configuration for the mythTV backend

Type: string

Default “”

default options for the mythTV backend

MYTHBACKEND_OPTIONS="–noupnp"

So this MYTHBACKEND_OPTIONS looks like an environment variable. However, it doesn’t show up with the env command:

mythtv@linux-wh01:/etc/sysconfig> env | grep MYTH*
mythtv@linux-wh01:/etc/sysconfig>

Nada. I also edited the output of the env command and searched for myth variables, just in the event I wasn’t grepping correctly. So is MYTHBACKEND_OPTIONS actually an environment variable?

Lastly, perhaps I am reading the error file from services regarding mythbackend incorrectly and the upnp isn’t the reason it is failing to start.