[mythtvnz] [Mythtv] How to view the backend logs

Stephen Worthington stephen_agent at jsw.gen.nz
Sun May 27 12:21:47 BST 2018


On Sun, 27 May 2018 21:38:21 +1200, you wrote:

>Hey guys, thanks for the replies.
>
>I was to Ubuntu 14.04 Mythtv 0.27. I had left it on that version
>because once I had it working I didn't want to risk breaking it.
>However seeing as it was already broken, I upgraded the box to 16.04
>and Mythtv 0.28, this helped a little (I can now watch live TV) but
>can't record. Also there is a delay of 30 seconds to a minute when
>trying to watch live TV during which time there is a blank screen.
>This also occurs when changing channels. My scheduled recordings list
>is now blank. and trying to record results in nothing happening, no
>recording, nothing appears in Upcoming recordings etc
>
>I have a turner card from hauppauge with two tuners, I'm not sure the
>model but can look it up if someone can tell me the commandline magic
>to do so. (this has worked fine the last 3-4 years).
>
>I have a media PC box under my TV which has a backend and front end
>mythtv on it. And I also watch over the network from my ubuntu PC
>using Kodi media center. Kodi says no response from Mythtv backend if
>I try to use it. I checked the IP Address and it's still correct and I
>can ping the backend no problem.
>
>I looked at the logs and it seems to be having connection issues
>opening the master server socket, the 30 second timeout on
>ReadStringList, occured about the same time as I tried to watch a live
>TV channel, and might be responsible for the big delay I'm seeing. I
>havn't tried changing the logging level yet.
>
>May 27 21:20:53 MediaPC mythbackend: mythbackend[1816]: N CoreContext
>mainserver.cpp:7978 (reconnectTimeout) MainServer: Connected
>successfully
>May 27 21:20:54 MediaPC mythbackend: mythbackend[1816]: N TVRecEvent
>recordinginfo.cpp:687 (ApplyRecordRecGroupChange)
>ApplyRecordRecGroupChange: LiveTV to LiveTV (2)
>May 27 21:20:54 MediaPC mythbackend: mythbackend[1816]: I TVRecEvent
>tv_rec.cpp:4247 (TuningNewRecorder) TVRec[3]: TuningNewRecorder -
>CreateRecorder()
>May 27 21:21:23 MediaPC mythbackend: mythbackend[1816]: E
>MythSocketThread(-1) mythsocket.cpp:858 (ReadStringListReal)
>MythSocket(1252db0:98): ReadStringList: Error, timed out after 30000
>ms.
>May 27 21:21:23 MediaPC mythbackend: mythbackend[1816]: W
>MythSocketThread(-1) mainserver.cpp:7680 (connectionClosed)
>MainServer: Unknown socket closing MythSocket(0x1252db0)
>May 27 21:21:23 MediaPC mythbackend: mythbackend[1816]: E CoreContext
>mythsocket.cpp:358 (SendReceiveStringList) MythSocket(1252db0:-1): No
>response.
>May 27 21:21:23 MediaPC mythbackend: mythbackend[1816]: E CoreContext
>mainserver.cpp:8016 (reconnectTimeout) MainServer: Failed to open
>master server socket, timeout
>May 27 21:21:23 MediaPC mythbackend: mythbackend[1816]: I
>MythSocketThread(97) mainserver.cpp:7669 (connectionClosed) Control
>sock(1252db0) disconnected
>May 27 21:21:24 MediaPC mythbackend: mythbackend[1816]: N CoreContext
>mainserver.cpp:7967 (reconnectTimeout) MainServer: Connecting to
>master server: 192.168.1.2:6543
>May 27 21:21:24 MediaPC mythbackend: mythbackend[1816]: N CoreContext
>mainserver.cpp:7978 (reconnectTimeout) MainServer: Connected
>successfully

Command line magic for seeing what tuners you have:

lspci
lsusb

Some tuners are USB tuners on a PCI or PCIe card, and only show up in
lsusb (eg Hauppauge WinTV Nova-T-500).  The rest should show up in
lspci.

Some things to try:

1) Power the PC down and turn it off at the wall.  Leave it that way
for at least 30 seconds.  This is to make sure all the capacitors have
discharged and all the hardware will be cold booting when you power it
on again.  Doing this can clear some very strange conditions, and
usually they do not come back again for a long time.  Various bits of
electronics can be subject to "lockup" conditions caused by voltage
spikes or cosmic ray hits or other strange things.  So one or more
bits of a buffer or register or RAM location stop working and get
stuck as a 1 or a 0 until the condition can be cleared.  PCs that are
on 24/7 like MythTV are often never turned off completely - any time
they are rebooted, it is done with the power never going off.  So
something like this can persist across many reboots.  I recommend
doing this at least once a year - and that is also a good time to be
thinking about cleaning the PC and oiling the fans at the same time.

2) Does the problem go away if you restart mythbackend?

systemctl restart mythtv-backend

There are various problems that happen due to race conditions at boot
time, and mostly they go away if you restart mythbackend later after
everything else has finished starting up.

Please also post a full log from mythbackend from startup until the
problem appears in the log.  There can be things earlier in the log
that you will not be recognising as a problem, but other people will
notice.

When the problem is happening, what do these commands show:

netstat -pan | grep myth
netstat -pan | grep mysql



More information about the mythtvnz mailing list