Project

General

Profile

Problems starting tvheadend daemon with RHEL/Centos 7 systemd

Added by Vladimir Gv almost 8 years ago

Hi, after compiling tvheadend on a EL7 machine I have some trobles starting the daemon with "systemctl start tvheadend". The service never starts and eventually fails (after 2-3 minutes). The solution I found is to edit "/usr/lib/systemd/system/tvheadend.service" and change from "Type=forking" to "Type=simple":

[Unit]
Description=Tvheadend - a TV streaming server and DVR
After=syslog.target network.target auditd.service

[Service]
EnvironmentFile=/etc/sysconfig/tvheadend
ExecStart=/usr/bin/tvheadend -f -p /var/run/tvheadend.pid $OPTIONS
PIDFile=/var/run/tvheadend.pid
Type=simple
Restart=on-failure
RestartSec=54s

[Install]
WantedBy=multi-user.target

Do you think it is a bug on tveadend? I don't have any issues with other daemons on this machine.
Thank you!


Replies (4)

RE: Problems starting tvheadend daemon with RHEL/Centos 7 systemd - Added by Vladimir Gv almost 8 years ago

I found out it's a timeout issue because latest tvheadend starts quite slow on EL7. Increasing the TimeoutSec param in tvh daemon configuration solved the issue. My wondering is what makes tvheadend start so slow in latest versions comparing to old versions?!

RE: Problems starting tvheadend daemon with RHEL/Centos 7 systemd - Added by Mark Clarkstone almost 8 years ago

Vladimir Gv wrote:

I found out it's a timeout issue because latest tvheadend starts quite slow on EL7. Increasing the TimeoutSec param in tvh daemon configuration solved the issue. My wondering is what makes tvheadend start so slow in latest versions comparing to old versions?!

Try running it from terminal & see what the hold up is. It's more than likely decompression of the config files.

RE: Problems starting tvheadend daemon with RHEL/Centos 7 systemd - Added by Vladimir Gv almost 8 years ago

I suspect it is more likely a network interfaces issue. If I start tvh on a EL7 virtual machine (dual-core) where I have only an eth0, it starts under 2 minutes. But if I run it on a real server (12 cores) with 4 ethernet interfaces, the issue is happening and it's starting on more than 2 minutes.

RE: Problems starting tvheadend daemon with RHEL/Centos 7 systemd - Added by Robert Cameron almost 8 years ago

This sounds similar to the problem another user was having with LibreELEC and Tvheadend. If the LE device was disconnected from the network when booted, Tvheadend would not bind to any network interface, even the loopback. The solution was the change the network configuration from dynamic/automatic to manual and assign a static IP: this allowed Tvheadend to start up as normal and bind to the local loopback interface.

Perhaps what is being experienced is something similar?

    (1-4/4)