Project

General

Profile

[SOLVED] tv_grab_kazer : no output detected /returned no data (but does manually)

Added by Arnaud Schaer over 11 years ago

hello

another issue here with the integration of grabbers ... is there some sort of timeout in tvheadend, some sort of "give up before the script outputs anything" ?

I'm trying it on geexbox. I've the same behaviour on tvheadend 3.0, 3.1, 3.4.

if I run a "top" when I see tvheadend grabbing xmltv, as you can seen root user is used :

1261   925 root     R     7584  1.1   0  0.0 {tv_grab_fr_kaze} /usr/bin/perl -w /usr/bin/tv_grab_fr_kazer

in fact, in geexbox, there is only one user (root) :

# cat /etc/passwd
root:x:0:0:root:/root:/bin/sh
#

If I launch the grabber by hand, with user root wich runs tvheadend of course, I get results (arround 10 seconds after having launched the command) (!!) :

# date;/usr/bin/tv_grab_fr_kazer 2>/dev/null | head -10 ; date
Sun Apr 21 11:16:42 UTC 2013
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE tv SYSTEM "xmltv.dtd">

<tv source-info-url="http://www.kazer.org/" source-info-name="KaZeR's XMLTV" generator-info-name="XMLTV/$Id: tv_grab_fr_kazer,v 1.6 2011/06/19 20:06:35 dekarl Exp $" generator-info-url="http://www.xmltv.org/">
  <channel id="6TER.kazer.org">
    <display-name>6 TER</display-name>
  </channel>
  <channel id="ART1.kazer.org">
    <display-name>ARTE</display-name>
  </channel>
Sun Apr 21 11:16:54 UTC 2013
#

but tvheadend can't get that output ...

Apr 21 11:14:29 geexbox tvheadend[925]: /usr/bin/tv_grab_fr_kazer: grab /usr/bin/tv_grab_fr_kazer
Apr 21 11:14:29 geexbox tvheadend[925]: Apr 21 11:14:29.263 [   INFO]:/usr/bin/tv_grab_fr_kazer: grab /usr/bin/tv_grab_fr_kazer
Apr 21 11:14:35 geexbox tvheadend[925]: /usr/bin/tv_grab_fr_kazer: no output detected
Apr 21 11:14:35 geexbox tvheadend[925]: Apr 21 11:14:35.980 [  ERROR]:/usr/bin/tv_grab_fr_kazer: no output detected
Apr 21 11:14:35 geexbox tvheadend[925]: /usr/bin/tv_grab_fr_kazer: grab returned no data
Apr 21 11:14:35 geexbox tvheadend[925]: Apr 21 11:14:35.984 [WARNING]:/usr/bin/tv_grab_fr_kazer: grab returned no data

==> it throws an error 6 seconds after the start of the process, that is (with example above) ... 6 seconds BEFORE the script effectively can output anything...

I really can't get it to work, it's very frustrating ...


Replies (5)

RE: tv_grab_kazer : no output detected /returned no data (but does manually) - Added by Arnaud Schaer over 11 years ago

note : I found that it is due to the fact that it's SYSTEMD that launches the process. But I don't know why, neither how to correct it ...

When I launch the process manually, tv_grab works ... :(

RE: tv_grab_kazer : no output detected /returned no data (but does manually) - Added by Arnaud Schaer over 11 years ago

if anyone is interested, I solved it with adding to the systemd service for tvheadend the 3 lines :

StandardInput=tty
StandardOutput=tty
TTYPath=/dev/tty10

RE: [SOLVED] tv_grab_kazer : no output detected /returned no data (but does manually) - Added by Gabriel Sosa about 11 years ago

Sorry but where exactly did you add this? What file? And where within the file? Can you paste the complete file?

RE: [SOLVED] tv_grab_kazer : no output detected /returned no data (but does manually) - Added by Arnaud Schaer about 11 years ago

hello

for geexbox, here it is :

  1. cat /lib/systemd/system/tvheadend.service
    [Unit]
    Description=TV streaming server _ screen
    After=syslog.target pvr.service
    ConditionPathExists=/run/geexbox/pvr/tvheadend

[Service]
#type=forking
User=root
ExecStartPre= -/bin/sleep 30
ExecStart=/usr/bin/tvheadend -c /etc/tvheadend -s
StandardInput=tty
StandardOutput=tty
TTYPath=/dev/tty10
Restart=always
#RemainAfterExit=yes

[Install]
WantedBy=multi-user.target

RE: [SOLVED] tv_grab_kazer : no output detected /returned no data (but does manually) - Added by Frédéric DAVOUST over 10 years ago

Hi,

For those who are on ubuntu, i had the same problem because i used the root user to configure the grabber.
So, for it to work, you need to configure it with the user used by tvheadend.

To know witch user the daemon uses :
take a look on your /etc/default/tvheadend
you'll see something like this :

# TVH_USER
#   if set to "" will run as root
TVH_USER="hts" 

# TVH_GROUP
#   if set to "" will run as root
TVH_GROUP="video" 

Here, the user hts in the group video is used for the daemon ...

Configure the grabber :
as root (or any su enable user)
su hts
whoami (to see if you are really the user hts)
/usr/bin/tv_grab_fr_kaser --configure (make sure to have your userhash)

that's all

What it did is to create tv_grab_fr_kazer.conf here :
/home/hts/.xmltv

then ... tvheadend will launch it with the correct conf file.

hope it will be usefull.
(sorry for my pour english)

    (1-5/5)