[mythtv-users] No live tv and not recording

Stephen Worthington stephen_agent at jsw.gen.nz
Sun Mar 18 17:40:56 UTC 2018


On Sun, 18 Mar 2018 11:45:39 +0100, you wrote:

>Le dimanche 18 mars 2018, 11:07:22 CET Mark Perkins a écrit :
>> On 18 March 2018 6:55:12 pm Klaus Becker <colonius at free.fr> wrote:
>> 
>> Le samedi 17 mars 2018, 23:04:17 CET Mark Perkins a écrit :
>.....
>> 
>> That shows an instance currently running. I would shutdown all backends,
>> confirm that by:
> ps aux | grep myth
>> netstat -peanut | grep 6543
>
>I did it.
>
>> 
>> Then restart the backend / try to play LiveTV / recording / etc / whatever
>> is still causing problems then check the backend log file for errors (and
>> post to the list so others can check too).
>
>
>$ mythbackend --loglevel debug -v record-loglevel
[snip]
>2018-03-18 11:38:49.681508 E  Failed listening on TCP 127.0.0.1:6544 - Error 
>8: The bound address is already in use
>2018-03-18 11:38:49.681524 E  MediaServer: HttpServer Create Error
>2018-03-18 11:38:49.682195 E  Failed listening on TCP 127.0.0.1:6543 - Error 
>8: The bound address is already in use

Mythbackend is still unable to bind its ports, which means something
is broken.  If another copy of mythbackend is not running, it must be
some other problem, such as permissions.

How are you starting and stopping mythbackend?  I have just tried
installing Debian Testing with MythTV packages from
deb-multimedia.org, and it seems that the packages for MythTV are
still using /etc/init.d/mythtv-backend to control the backend.  That
is unreliable in Debian now, as Debian has changed to use systemd and
systemd does not properly handle /etc/init.d files.  In particular, it
does not recognise that things started and stopped using /etc/init.d
files have actually started or stopped - you always have to verify
that the start or stop actually worked.  If it did not work, the
status (started or stopped) that systemd thinks it has for the program
is out of sync with reality.

To start mythbackend:

systemctl start mythtv-backend

To stop mythbackend:

systemctl stop mythtv-backend

If you just run mythbackend manually from your normal user prompt, it
will be run from that user.  But to work properly, it must be run from
the /etc/init.d script via systemd.  When run that way, it is run as a
daemon and started as user root.  After it is started it has its user
changed to mythtv.  Then it will be able to operate properly - running
under your user will likely not give it the right permissions.

However, on my Debian Testing setup, the user mythtv was not created
automatically when I installed the MythTV packages, so if that also
does not happen in Debian Sid, mythbackend will still not work
correctly for you with the above commands.  If I have enough time
tomorrow, I will try creating a mythtv user and its .mythtv directory
and .mythtv/config.xml file, and see if that helps.  Along with the
mythtv user, the mythtv group needs to be created, and all users who
run mythtv need to be added to the mythtv group.  And I also need to
find out how MythTV expects to create logs when running as a daemon,
as the /var/log/mythtv directory is not created either.  But I am
expecting my new Ethernet switch to arrive on the courier tomorrow or
the day after, so if it comes tomorrow, I may not have much spare time
to look at the Debian setup until I get that installed properly.

Ideally, mythbackend should be run using a proper systemd unit file
mythtv-backend.service which would be put in the /lib/systemd/system
or /etc/systemd/system  directory.  Ubuntu does it that way now, but
the way mythbackend gets run in Ubuntu is not quite the same as how it
is run in Debian, so I need to carefully read through the
/etc/init.d/mythtv-backend script to see what needs to be put in the
Debian unit file and what the differences are between Debian and
Ubuntu.

[snip]
>Still no live tv and no recording:
>"Single Record +0 Recorder Failed"
>
>Bye
>
>Klaus


More information about the mythtv-users mailing list