Posts: 1,016
Joined: Sep 2012
Reputation:
55
janbar
Posting Freak
Posts: 1,016
2019-01-20, 22:47
(This post was last modified: 2019-01-21, 00:31 by janbar.)
I can see the logged line in error: MythTV PVR Client: (CPPMyth)__connectAddr: failed to connect (22).
It means the addon failed to connect to the backend for an unknown reason. I guess the network is down or the backend can't be joined.
You should check the network connection from your backend by pinging the kodi host when that happens.
EDIT: Errata, it seems your backend isn't configured correctly: You have to set the real IP address of the backend in myth-setup.
This address is provided by the backend to the addon to connect the live recorder.
Posts: 30
Joined: Jan 2017
Reputation:
1
This seems strange to me, as Kodi is well able to find the backend and play previously-recorded episodes. The IPv4 addresses of the kodi processor and the mythtv backend are both assigned (to fixed values) by the DHCP server on my router.
kodi processor = 192.168.1.19 (Local Host Name = FamilyRoom)
Mythtv backend = 192.168.1.18 (Local Host Name = willow)
Question: Is Kodi expecting to stream from the Mythtv backend, or is it expecting to stream from a device directly on the Kodi processor? Certainly, the program listings are coming from MythTV, and they work fine (both in the ``Channels`` page and in the ``program Guide`` page.
Do you know where the Kodi configuration file(s) are that contain the parameters relating to the backend processor? If so, I could upload them to this post. OR, if the setting is sent by MythTV, where does MythTV store it?
Posts: 137
Joined: Feb 2017
Reputation:
4
Is mythtv set up to allow remote frontends? what version of mythtv are you running? prior to v29 you had to edit the bind-address in th my.cnf file from 127.0.0.1 to your backend ip.
Posts: 30
Joined: Jan 2017
Reputation:
1
2019-01-22, 05:04
(This post was last modified: 2019-01-22, 05:14 by AtwoodWilliam.)
Disaacso:
MythTV is currently set up to allow remote frontends. I am successfully using Kodi (on RPi) to access the backend, and I can play previously-recorded programs. I can also see the current entries in the Program Guide, and the current program on a channel if I select that channel. So it appears that Kodi has the correct address of the backend.
My current version of MythTV is v0.28.2-6-g9031599.
In what folder is the my.cnf file located? I am positive that this address is correctly set in the mythtv-setup pages, but if I can find out where this file lives, I can view it and report what I see.
Janbar:
I have only one backend (willow), and it has a single Hauppauge WinTV-HVR-955Q on it. As noted above, I have configured the backend with its IPv4 address (and not 127.0.0.1), so that it can be accessed by the frontend. The frontend is well able to see it and retrieve information from it. Thus the only issue that I have is that watching Live TV is not working.
Thank you for the detailed link to the 0.29 instructions, but I am still running 0.28, which has much less flexibility.
All:
I will look at mythtv-setup tomorrow morning, when the backend is not recording a program, just to confirm that address setting, but I am positive that it is set to 192.168.1.18.
Note that both machines also have valid global IPv6 addresses, as these are provided by my ISP, and reflected through the router. I hope that this does not make a difference.
Posts: 1,016
Joined: Sep 2012
Reputation:
55
janbar
Posting Freak
Posts: 1,016
2019-01-22, 11:08
(This post was last modified: 2019-01-22, 11:10 by janbar.)
Maybe you pointed your issue: ipv6.
You should replace with the default values in mythtv-setup: "::1", and it will work as expected (that will disable usage of IPv6).
If you enable DEBUG logging you will see the full details of what happen before getting the connection error 22.
Posts: 30
Joined: Jan 2017
Reputation:
1
The IPv6 issue was indeed the cause. A classic example of "a little knowledge..."
As can be seen below from the output of "ifconfig" on the backend, the backend has six (!) IPv6 addresses. (Why my ISP assigns 5 global IPv6 addresses remains a mystery to me...)
Since I have no control over the global addresses, and since they are subject to change at the whim of the ISP, I chose to use the Link Local address, reasoning that it would not vary over time. Since I did not at that time know that the Master Backend sends the appropriate address to a requesting frontend, I was not concerned about the fact that the address is written as the concatenation of the actual address and the interface name: fe80::10fa:8dce:82a4:bfcf%enp9s25. This, of course, is not valid on the frontend, as it does not have an interface with this name. Perhaps someone will modify the code on MythTV to strip out the interface name before sending the address part.
bill@willow:~$ ifconfig
enp0s25 Link encap:Ethernet HWaddr 00:21:70:ac:98:f4
inet addr:192.168.1.18 Bcast:192.168.1.255 Mask:255.255.255.0
inet6 addr: 2607:f2c0:927c:4f00:ad6d:abaa:3a45:c6f7/64 Scope:Global
inet6 addr: 2607:f2c0:927c:4f00:35d7:117c:de28:b480/64 Scope:Global
inet6 addr: 2607:f2c0:927c:4f00:dbd0:6288:bc29:22a3/64 Scope:Global
inet6 addr: 2607:f2c0:927c:4f00:d949:204d:f601:7c30/64 Scope:Global
inet6 addr: fe80::10fa:8dce:82a4:bfcf/64 Scope:Link
inet6 addr: 2607:f2c0:927c:4f00:b00c:2846:ca96:3c8e/64 Scope:Global
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:852063 errors:0 dropped:0 overruns:0 frame:0
TX packets:3853112 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:120649045 (120.6 MB) TX bytes:5251846347 (5.2 GB)
Interrupt:22 Memory:f6ae0000-f6b00000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:785915 errors:0 dropped:0 overruns:0 frame:0
TX packets:785915 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:176000191 (176.0 MB) TX bytes:176000191 (176.0 MB)
bill@willow:~$
Replacing the bad Link Local address with blank caused the viewing of channels in real-time to work properly.
I may try putting a golbal-scope IPv6 address in the right place as an experimen, at some point when I have time, but for now I consider this problem solved.
Thank you all very much for your help.
Bill
Posts: 3
Joined: Aug 2017
Reputation:
1
A few years later and this still seems to be a problem. This was the post that gave me a hint to solve this for me. My backend was configured with the hostname rather than the numerical IP address. I could play recordings on my kodi frontend perfectly well, but live TV came up with an immediate "Channel Unavailable". After trying a hundred different things, I finally put the actual IP address in the backend setting (i.e. 192.168.2.118) and it works. Very annoying, but relieved to finally solve it!
Don't forget to set your backend's address as a static IP, otherwise mythtv will stop working at all if the address is renegotiated.