Two MythTV systems on the same LAN

I have an aging MythTV frontend and separate backend that I need to upgrade. The plan of attack is to create a new system, get it running smoothly and work out a migration strategy. Then once the new system is working correctly switch over from old servers to new.

All well and good except I am getting really strange behavior. The two systems seem to interact with each other in strange ways.

It turns out the main thing is to turn off plug-n-play, uPnP.

Myth Backend

I am running Myth backend as a service, so first get the status by running:

systemctl status mythbackend.service

This gave:

[root@mythsvr system]# systemctl status mythbackend.service
mythbackend.service - MythTV backend service
          Loaded: loaded (/lib/systemd/system/mythbackend.service; enabled)
          Active: active (running) since Mon, 24 Jun 2019 21:02:00 +1200; 6s ago
        Main PID: 19631 (mythbackend)
          CGroup: name=systemd:/system/mythbackend.service
                  └ 19631 /usr/bin/mythbackend --logpath /var/log/mythtv

While you could edit the service file directly this is not the correct, supported, approach. This is because if you do an update to the rpm it will wipe your changes.

See:

Red Hat: Chapter 10. Managing Services with systemd
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/system_administrators_guide/chap-Managing_Services_with_systemd#tabl-Managing_Services_with_systemd-Introduction-Units-Locations

Run the following:

systemctl edit mythbackend.service

This will open up nano with a blank document

Insert the following text:

[Service]
ExecStart=
ExecStart=/usr/bin/mythbackend –noupnp –logpath /var/log/mythtv

The first “ExecStart=” is important as it “clears” the ExecStart variable. If you don’t have it you will see errors like:

mythbackend.service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.

Once you have done this run:

systemctl daemon-reload
systemctl restart mythbackend.service

The daemon-reload is important to allow systemctl to reload all the configs from the files.

Editing it this way will create a folder:

/etc/systemd/system/mythbackend.service.d

and the file:

/etc/systemd/system/mythbackend.service.d/override.conf

If you get stuck and need to start again, delete the override.conf and run:

systemctl daemon-reload

If you look at the status now you should see “–noupnp”:

[root@mythsvr system]# systemctl status mythbackend.service
mythbackend.service - MythTV backend service
          Loaded: loaded (/lib/systemd/system/mythbackend.service; enabled)
          Active: active (running) since Mon, 24 Jun 2019 21:02:47 +1200; 2s ago
        Main PID: 19806 (mythbackend)
          CGroup: name=systemd:/system/mythbackend.service
                  └ 19806 /usr/bin/mythbackend --noupnp --logpath /var/log/mythtv

MythTv FrontEnd

Just as you need to disable Universal Plug and Play on the backend you should also disable this on the frontend.

This is what I did for my Fedora frontend. On a frontend you will likely run it from a shortcut on the desktop. So for me I ran:

locate frontend | grep desktop

This returned a location of:

/usr/share/applications/RPMFusion-mythfrontend.desktop

Open this up in your favorite editor and look for a line:

Exec=mythfrontend

Simply change this to:

Exec=mythfrontend –noupnp

and restart your frontend.