Live TV and recordings not starting [SOLVED]

For discussion of topics specific to MythTV on OSX
Post Reply
tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Live TV and recordings not starting [SOLVED]

Post by tvdave »

I have checked the logs and there appears to be a problem with the way I have configured it.

Here is the main log
2014-07-19 19:06:05.139388 E [304/3335] CoreContext livetvchain.cpp:289 (GetEntryAt) - It appears that your backend may be misconfigured. Check your backend logs to determine whether your capture cards, lineups, channels, or storage configuration are reporting errors. This issue is commonly caused by failing to complete all setup steps properly. You may wish to review the documentation for mythtv-setup.
2014-07-19 19:06:05.139413 E [304/3335] CoreContext livetvchain.cpp:306 (EntryToProgram) - EntryToProgram(0@1970-01-01T10:00:00) failed to get pginfo
2014-07-19 19:06:05.139420 E [304/3335] CoreContext tv_play.cpp:2282 (HandleStateChange) - TV: HandleStateChange(): LiveTV not successfully started
2014-07-19 19:06:05.139633 E [304/3335] CoreContext tv_play.cpp:2315 (HandleStateChange) - TV: LiveTV not successfully started
2014-07-19 19:06:05.140054 I [304/3335] CoreContext tv_play.cpp:2550 (HandleStateChange) - TV: Main UI disabled.
2014-07-19 19:06:05.140075 E [304/3335] CoreContext tv_play.cpp:8621 (DoEditSchedule) - TV: doEditSchedule(): no active ctx playingInfo.
2014-07-19 19:06:05.140088 I [304/3335] CoreContext tv_play.cpp:411 (StartTV) - TV: Entering main playback loop.


And from the backend

2014-07-19 19:07:44.869594 E [204/12035] EIT mythdb.cpp:183 (DBError) - DB Error (programrating insert):
Query was:
INSERT INTO programrating ( chanid, starttime, system, rating) VALUES (?, ?, ?, ?)
Bindings were:
:CHANID=1007, :RATING="G", :START=2014-07-25T07:30:00Z, :SYS=""
Driver error was [2/1062]:
QMYSQL3: Unable to execute statement
Database error was:
Duplicate entry '1007-2014-07-25 07:30:00--G' for key 'chanid'

2014-07-19 19:07:47.638620 E [204/11051] TVRecEvent dtvmultiplex.cpp:327 (ParseTuningParams) - DTVMux: ParseTuningParams -- Unknown tuner type = 0xffffffff80000000
2014-07-19 19:07:47.638649 E [204/11051] TVRecEvent recorders/dtvchannel.cpp:319 (SetChannelByString) - DTVChan[1](12102BE8-0): SetChannelByString(3): Failed to initialize multiplex options
2014-07-19 19:07:47.638657 E [204/11051] TVRecEvent tv_rec.cpp:3792 (TuningFrequency) - TVRec[1]: Failed to set channel to 3. Reverting to kState_None
2014-07-19 19:12:36.196754 I [204/12547] Scheduler scheduler.cpp:2099 (HandleReschedule) - Reschedule requested for MATCH 0 1 1 2014-07-26T21:00:00Z EITScanner
2014-07-19 19:12:36.224649 I [204/12547] Scheduler scheduler.cpp:2212 (HandleReschedule) - Scheduled 0 items in 0.0 = 0.00 match + 0.00 check + 0.00 place

Restart the backend
Listening on TCP [fe80::6a5b:35ff:fe89:a44d%en0]:6544
2014-07-19 19:16:48.128661 I [444/1287] CoreContext main_helpers.cpp:668 (run_backend) - Main::Registering HttpStatus Extension
2014-07-19 19:16:48.130825 I [444/1287] CoreContext serverpool.cpp:399 (listen) - Listening on TCP 127.0.0.1:6543
2014-07-19 19:16:48.130896 I [444/1287] CoreContext serverpool.cpp:399 (listen) - Listening on TCP 192.168.0.225:6543
2014-07-19 19:16:48.131014 I [444/1287] CoreContext serverpool.cpp:399 (listen) - Listening on TCP [::1]:6543
2014-07-19 19:16:48.131125 I [444/1287] CoreContext serverpool.cpp:399 (listen) - Listening on TCP [fe80::1%lo0]:6543
2014-07-19 19:16:48.131249 I [444/1287] CoreContext serverpool.cpp:399 (listen) - Listening on TCP [fe80::6a5b:35ff:fe89:a44d%en0]:6543
2014-07-19 19:16:48.138563 N [444/1287] CoreContext autoexpire.cpp:264 (CalcParams) - AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min
2014-07-19 19:16:49.016341 I [444/1287] CoreContext bonjourregister.cpp:115 (BonjourCallback) - Bonjour: Service registration complete: name 'Mythbackend on media.local' type '_mythbackend._tcp.' domain: 'local.'
2014-07-19 19:16:49.902338 I [444/12547] Scheduler scheduler.cpp:2099 (HandleReschedule) - Reschedule requested for MATCH 0 0 0 - SchedulerInit
2014-07-19 19:16:50.508608 I [444/12547] Scheduler scheduler.cpp:2212 (HandleReschedule) - Scheduled 0 items in 0.0 = 0.00 match + 0.00 check + 0.01 place
2014-07-19 19:16:50.509568 I [444/12547] Scheduler scheduler.cpp:2279 (HandleRunSchedulerStartup) - Scheduler: Seem to be woken up by USER
2014-07-19 19:18:06.216690 N [444/12803] Expire autoexpire.cpp:264 (CalcParams) - AutoExpire: CalcParams(): Max required Free Space: 1.0 GB w/freq: 15 min

Everything works.

Any ideas????
Last edited by tvdave on Sun Jul 27, 2014 11:27 am, edited 1 time in total.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Live TV and recordings not starting

Post by pvr4me »

What tuner(s) are you using? I presume an HDHomerun (which model)? Unfortunately, I have no experience with these and I can't find a decent guide on the wiki. I suspect that something is askew in the tuner setup.

Craig
Formerly the MacPorts guy.
tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Re: Live TV and recordings not starting

Post by tvdave »

Hi Craig,

Yes I am using the original HD HomeRun Dual Tuner updated to the current firmware. The HD HomeRun has not given any problems - even when the backend fails to work, I can use the HD HomeRun GUI application to stream TV to the Mac using VLC.

The strange issue is that if I simply stop and start the backend, it works perfectly (I have successfully been recording for a few days now). The issue only raises it's head when I have to reboot the machine.

I am wondering whether some daemon is slow to execute and is causing the backend to fail to start properly.

Is there a way to delay startup of the backend for maybe a minute or so to check if that is the case?

Is it worth trying to upgrade the backend using one of the prebuilt DMG files (or will it not work with the Macports setup)?
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Live TV and recordings not starting

Post by pvr4me »

Are you saying that, after restarting the backend machine, myth can NEVER make a successful recording UNTIL you use Myth_Stop_Start to stop the backend service and then restart it? And that after that step, all is well?

Short answer, don't reboot! ;) Seriously, my backend machine runs for months at a time. I only reboot when applying security updates that require it.

What other software/services do you have running on the backend machine? What external devices do you have connected to it? I had one Seagate USB disk drive that was unusable--it took ~40 seconds to wake from sleep mode and OS X would sometimes give up waiting for it.

You can check the MySQL log to see if it is reporting anything useful. Look for *.err files in the following directory:

/opt/dvr/var/db/mysql5

I suppose you could carefully check the time stamps between the MySQL and mythbackend logs to determine for sure if the database is ready when the backend tries to start. For most of us, however, it just works!

Focus your testing on scheduled recordings. I believe the current MacPorts version includes almost all of jya's recent LiveTV fixes--but I just don't use Live TV.

Mixing the MacPorts backend with jya's bundled frontend "should" work but "is not a supported configuration". There is very little difference between the two.

Craig
Formerly the MacPorts guy.
tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Re: Live TV and recordings not starting

Post by tvdave »

I am going to test something and report back. I currently connect to the HDHomeRun using its broadcast device name. I will reconfigure the backend to connect using the HDHomeRun's (fixed) IP address. I have read that sometimes there can be a delay whilst the name resolves and that using the IP address may overcome this.

The don't reboot theory is great - however, if I get a power dip I need the device to come back automatically. (Yes - I know about UPSs but I can't justify spending more money)

This box is a dedicated media server - It runs SQL, Mythbackend, Mythfronted and OSX network services (file and screen sharing for maintenance). No external devices (I plug a USB HD in only when I need to backup).

I will keep testing and let everyone know once I solve the problem.

Dave
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Live TV and recordings not starting

Post by pvr4me »

A tangent, but are you using your system disk for recordings? That is not recommended. By design, Myth wants to fill your recordings drive(s) with recordings--all but for a small buffer space. If you set the buffer big enough, you can probably get away with it. Much cleaner to have a separate disk.

Craig
Formerly the MacPorts guy.
tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Re: Live TV and recordings not starting

Post by tvdave »

Yes I am using the system drive - it has 500Mb and we don't usually keep recordings very long so I don't see space as becoming an issue. At the moment there is probably over 400Mb free.
tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Re: Live TV and recordings not starting [SOLVED]

Post by tvdave »

I reconfigured the Capture Cards in the backend to reference the HD HomeRun by IP addresss rather than broadcast name. The backend now works perfectly.

Perhaps add this into the instructions as there seems to sometimes be a delay with name resolution that causes the backend to fail to find the tuners. By name, I am referring to the name that HD HomeRun broadcasts to the network (eg 12102xxx-0 and 12102xxx-1) rather than a DNS name.
User avatar
pvr4me
Senior
Posts: 763
Joined: Fri Feb 07, 2014 7:25 pm
Location: near Toronto, Canada
Contact:
Canada

Re: Live TV and recordings not starting [SOLVED]

Post by pvr4me »

Thanks for reporting back and I'm glad it is working now.

Regarding the instructions, it IS a wiki so you can (register and) edit yourself. Keep in mind that lots of people use the device ID without issues. Also that a potential user will have to ensure that their HDHomeruns are assigned fixed IP addresses.

Craig
Formerly the MacPorts guy.
User avatar
rwagner
Developer
Posts: 217
Joined: Thu Feb 06, 2014 11:37 pm
United States of America

Re: Live TV and recordings not starting

Post by rwagner »

tvdave wrote:Yes I am using the system drive - it has 500Mb and we don't usually keep recordings very long so I don't see space as becoming an issue. At the moment there is probably over 400Mb free.
Do you mean 500GB and 400GB? Filesystems typically do not behave well with so little free space available.
tvdave
Junior
Posts: 57
Joined: Sun Jun 29, 2014 10:11 am
Australia

Re: Live TV and recordings not starting [SOLVED]

Post by tvdave »

Rwagner you are correct - I meant GB!
Post Reply