Project

General

Profile

Grabber works in Terminal, Not in TVH

Added by Kurt Diehl over 6 years ago

Hello,

First post here! I just installed TVH for the first time and I am attempting to setup the tv_grab_zz_sdjson_sqlite grabber to pull in the EPG date from Schedules Direct. I have already run the --manage-lineups and --configure arguments. In addition, I have successfully run the grabber from the terminal (it lists out ALLLL of the program guide that it downloads). However, when I attempt to run that same command from TVH, I get the following response in the log:

2018-06-29 13:50:37.607 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: grab /usr/bin/tv_grab_zz_sdjson_sqlite

2018-06-29 13:50:37.610 spawn: Executing "/usr/bin/tv_grab_zz_sdjson_sqlite"

2018-06-29 13:50:38.526 spawn: Opening the local database

2018-06-29 13:50:38.528 spawn: Unable to create settings table in database /home/tvserver/.xmltv/SchedulesDirect.DB: attempt to write a readonly database

2018-06-29 13:50:38.549 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: no output detected

2018-06-29 13:50:38.549 xmltv: /usr/bin/tv_grab_zz_sdjson_sqlite: grab returned no data

Any thoughts as to what I am doing wrong? I even tried to change the permissions of the DB file to read/write.

Any help would be appreciated! Thank you in advance

Regards,
Kurt


Replies (12)

RE: Grabber works in Terminal, Not in TVH - Added by Robert Cameron over 6 years ago

When you ran it from the command line, did you do it as the same user that Tvheadend runs as?

RE: Grabber works in Terminal, Not in TVH - Added by Kurt Diehl over 6 years ago

Robert Cameron wrote:

When you ran it from the command line, did you do it as the same user that Tvheadend runs as?

Thank you for the response, Robert! I apologize for my ignorance here, but I just assumed that it ran as the same user that I setup when I installed Ubuntu. What username does it run under?

RE: Grabber works in Terminal, Not in TVH - Added by Robert Cameron over 6 years ago

Kurt Diehl wrote:

Robert Cameron wrote:

When you ran it from the command line, did you do it as the same user that Tvheadend runs as?

Thank you for the response, Robert! I apologize for my ignorance here, but I just assumed that it ran as the same user that I setup when I installed Ubuntu. What username does it run under?

Well, from your output, it looks like Tvheadend is running as tvserver. Under which user are you running it as from the command line?

(I may be incorrect as to the user, but it's a best guess based on provided output.)

RE: Grabber works in Terminal, Not in TVH - Added by Kurt Diehl over 6 years ago

Robert Cameron wrote:

Kurt Diehl wrote:

Robert Cameron wrote:

When you ran it from the command line, did you do it as the same user that Tvheadend runs as?

Thank you for the response, Robert! I apologize for my ignorance here, but I just assumed that it ran as the same user that I setup when I installed Ubuntu. What username does it run under?

Well, from your output, it looks like Tvheadend is running as tvserver. Under which user are you running it as from the command line?

(I may be incorrect as to the user, but it's a best guess based on provided output.)

tvserver is the user I was using. That's what I log into when I open Linux, anyway. I'm rather new to Linux, so I could be off on what I'm telling you. If this is helpful, the prompt is "tvserver@TVServer" when I open the command line.

RE: Grabber works in Terminal, Not in TVH - Added by Robert Cameron over 6 years ago

What is the output of: systemctl cat tvheadend

RE: Grabber works in Terminal, Not in TVH - Added by Kurt Diehl over 6 years ago

Robert Cameron wrote:

What is the output of: systemctl cat tvheadend

tvserver@TVServer:~$ systemctl cat tvheadend
  1. /run/systemd/generator.late/tvheadend.service
  2. Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/init.d/tvheadend
Before=multi-user.target
Before=multi-user.target
Before=multi-user.target
Before=graphical.target
After=remote-fs.target
After=udev.service

[Service]
Type=forking
Restart=no
TimeoutSec=5min
IgnoreSIGPIPE=no
KillMode=process
GuessMainPID=no
RemainAfterExit=yes
SuccessExitStatus=5 6
ExecStart=/etc/init.d/tvheadend start
ExecStop=/etc/init.d/tvheadend stop
lines 2-24/24 (END)

RE: Grabber works in Terminal, Not in TVH - Added by Kurt Diehl over 6 years ago

By the way, thank you for your help with this!

RE: Grabber works in Terminal, Not in TVH - Added by Robert Cameron over 6 years ago

Wow, I thought Ubuntu had fully and properly switched to systemd units.

OK, what's the output of: ps aux | grep tvheadend | grep -v grep

RE: Grabber works in Terminal, Not in TVH - Added by Kurt Diehl over 6 years ago

tvserver@TVServer:~$ ps aux | grep tvheadend | grep -v grep
hts 894 0.1 0.9 1535592 35896 ? Ssl 08:58 1:27 /usr/bin/tvheadend -f -u hts -g video

Sorry for the poor formatting, this is how it came out.

RE: Grabber works in Terminal, Not in TVH - Added by Robert Cameron over 6 years ago

So, your Tvheadend is running as hts. You need to setup the grabber for this user, not tvserver.

RE: Grabber works in Terminal, Not in TVH - Added by Kurt Diehl over 6 years ago

Ok good catch! I'm going to figure out how to do that and respond back. Thank you for your help!!

RE: Grabber works in Terminal, Not in TVH - Added by Kurt Diehl over 6 years ago

Looks like that did the trick! Thank you so much for all of your help!!!

    (1-12/12)