Summary: | media-tv/tvheadend-4.2.8 xmltv.sock and tvheadend.pid are missing when using systemd | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | James Chew <james05+gentoo> |
Component: | Current packages | Assignee: | James Le Cuirot <chewi> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | ||
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=792456 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | systemd service file for tvheadend |
Description
James Chew
2019-07-18 05:22:09 UTC
The /etc/tvheadend/epggrab/xmltv.sock can be created when I start tvheadend from the command line (hence the problem is when it's started as a systemd service): # /usr/bin/tvheadend -u tvheadend -g video -c /etc/tvheadend 2019-07-18 13:29:40.160 [ INFO] main: Log started 2019-07-18 13:29:40.161 [ INFO] tcp: No systemd socket: creating a new one 2019-07-18 13:29:40.161 [ INFO] http: Starting HTTP server 0.0.0.0:9981 2019-07-18 13:29:40.161 [ INFO] tcp: No systemd socket: creating a new one 2019-07-18 13:29:40.161 [ INFO] htsp: Starting HTSP server 0.0.0.0:9982 2019-07-18 13:29:40.168 [ INFO] config: loaded 2019-07-18 13:29:40.168 [ INFO] config: scanfile (re)initialization with path <none> 2019-07-18 13:29:40.803 [ INFO] scanfile: DVB-S - loaded 1 regions with 113 networks 2019-07-18 13:29:40.803 [ INFO] scanfile: DVB-T - loaded 44 regions with 1111 networks 2019-07-18 13:29:40.803 [ INFO] scanfile: DVB-C - loaded 17 regions with 58 networks 2019-07-18 13:29:40.803 [ INFO] scanfile: ATSC-T - loaded 2 regions with 13 networks 2019-07-18 13:29:40.803 [ INFO] scanfile: ATSC-C - loaded 1 regions with 5 networks 2019-07-18 13:29:40.803 [ INFO] scanfile: ISDB-T - loaded 2 regions with 1669 networks 2019-07-18 13:29:42.761 [ INFO] linuxdvb: adapter added /dev/dvb/adapter3 2019-07-18 13:29:42.761 [ INFO] linuxdvb: adapter 3 setting exclusive flag 2019-07-18 13:29:44.833 [ INFO] linuxdvb: adapter added /dev/dvb/adapter2 2019-07-18 13:29:44.833 [ INFO] linuxdvb: adapter 2 setting exclusive flag 2019-07-18 13:29:47.009 [ INFO] linuxdvb: adapter added /dev/dvb/adapter1 2019-07-18 13:29:47.010 [ INFO] linuxdvb: adapter 1 setting exclusive flag 2019-07-18 13:29:49.187 [ INFO] linuxdvb: adapter added /dev/dvb/adapter0 2019-07-18 13:29:49.187 [ INFO] linuxdvb: adapter 0 setting exclusive flag 2019-07-18 13:29:49.253 [ INFO] dvr: Creating new configuration '' 2019-07-18 13:29:49.253 [ INFO] dvr: Creating new configuration 'sdtv' 2019-07-18 13:29:49.254 [ INFO] epggrab: module eit created 2019-07-18 13:29:49.254 [ INFO] epggrab: module uk_freesat created 2019-07-18 13:29:49.254 [ INFO] epggrab: module uk_freeview created 2019-07-18 13:29:49.254 [ INFO] epggrab: module nz_freeview created 2019-07-18 13:29:49.254 [ INFO] epggrab: module viasat_baltic created 2019-07-18 13:29:49.254 [ INFO] epggrab: module Bulsatcom_39E created 2019-07-18 13:29:49.254 [ INFO] epggrab: module psip created 2019-07-18 13:29:49.256 [ INFO] epggrab: module opentv-ausat created 2019-07-18 13:29:49.256 [ INFO] epggrab: module opentv-skyit created 2019-07-18 13:29:49.257 [ INFO] epggrab: module opentv-skynz created 2019-07-18 13:29:49.257 [ INFO] epggrab: module opentv-skyuk created 2019-07-18 13:29:49.257 [ INFO] epggrab: module pyepg created 2019-07-18 13:29:49.257 [ INFO] epggrab: module xmltv created 2019-07-18 13:29:49.259 [ INFO] xmltv: xmltv: external socket enabled 2019-07-18 13:29:49.311 [ INFO] epgdb: gzip format detected, inflating (ratio 72.3% deflated size 138) 2019-07-18 13:29:49.312 [ INFO] epgdb: parsing 191 bytes 2019-07-18 13:29:49.312 [ INFO] epgdb: loaded v2 2019-07-18 13:29:49.312 [ INFO] epgdb: config 1 2019-07-18 13:29:49.312 [ INFO] epgdb: brands 0 2019-07-18 13:29:49.312 [ INFO] epgdb: seasons 0 2019-07-18 13:29:49.312 [ INFO] epgdb: episodes 0 2019-07-18 13:29:49.312 [ INFO] epgdb: broadcasts 0 2019-07-18 13:29:49.312 [ NOTICE] START: HTS Tvheadend version 4.2.8 started, running as PID:23153 UID:109 GID:27, CWD:/lib/systemd/system CNF:/etc/tvheadend # ls -la /etc/tvheadend/epggrab total 4 drwx------ 1 tvheadend video 54 Jul 18 13:33 . drwx------ 1 tvheadend video 226 Jul 18 13:32 .. -rw------- 1 tvheadend video 2293 Feb 1 14:16 config drwx------ 1 tvheadend video 7616 Jul 18 13:13 otamux drwx------ 1 tvheadend video 16 Feb 8 15:17 xmltv srwxr-xr-x 1 tvheadend video 0 Jul 18 13:29 xmltv.sock I don't use systemd on Gentoo and I only run tvheadend on one system that isn't capable of running systemd at all. I also don't use XMLTV. I'd therefore be very grateful if you could suggest a fix that works for you. Actually if I had to guess, it's the RestrictAddressFamilies entry in the unit file. It should include AF_UNIX. Created attachment 585844 [details]
systemd service file for tvheadend
I tried a few options, but only managed to get the xmltv.sock file when I recreated the tvheadend.service file as attached. That's completely different to what we have now, even right down to the Type. Can you start with what we have and remove the lines one at a time? I would start with RestrictAddressFamilies. (In reply to James Le Cuirot from comment #6) > That's completely different to what we have now, even right down to the > Type. Can you start with what we have and remove the lines one at a time? I > would start with RestrictAddressFamilies. Yes I started with that; deleted all the lines that I felt would have made a difference, specifically: DevicePolicy=closed DeviceAllow=char-DVB rw DeviceAllow=char-drm rw RestrictAddressFamilies=AF_INET AF_INET6 ProtectSystem=yes ProtectHome=yes NoNewPrivileges=yes And yet, that did not solve the problem. I.e. after starting tvheadend /etc/tvheadend/epggrab/xmltv.sock is missing /run/tvheadend/tvheadend.pid file is missing Thus, I ended up taking the developer's systemd service file, modified from there and it works. |