Project

General

Profile

TVH - unstable version - [ ERROR] tcp: bind: *: Address already in use

Added by Joerg B about 10 years ago

Hi,

since a few versions, I can't start the unstable version of TVH anymore, the stable version works without any problems.
When I want to run TVH I got this error message:
2014-11-20 10:57:13.665 [ ERROR] tcp: bind: *: Address already in use

I started some investigation and the main difference for me is the port listening.

This is my netstat with the unstable version:
Proto Recv-Q Send-Q Local Address Foreign Address State User Inode PID/Program name
tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN 0 91276 22879/tvheadend
tcp 0 0 0.0.0.0:9982 0.0.0.0:* LISTEN 0 91279 22879/tvheadend
As soon as I use the unstable version, the user is set to 0, which seems to be wrong. While in the stable version it's user 116 and all is fine.

the entry in etc/passwd is always the same:
hts:x:116:125::/home/hts:/bin/bash

Any ideas? The stable version is not an option, as I would like to use the SAT>IP function.

Edit: Almost forgot. I'm using Xubuntu 14.04.

Joerg


Replies (4)

RE: TVH - unstable version - [ ERROR] tcp: bind: *: Address already in use - Added by Prof Yaffle about 10 years ago

How are you starting tvh? Or what does ps -eaf | grep tvh say about the process?

EDIT

The tcp: bind: *: Address already in use bit suggests that tvh is already running, perhaps...

RE: TVH - unstable version - [ ERROR] tcp: bind: *: Address already in use - Added by Joerg B about 10 years ago

It seems TVH is already running, but perhaps not stable since the PID is permanently changing.

ps -eaf | grep tvh:
UID PID PPID C STIME TTY TIME CMD
hts 11982 1 0 11:25 ? 00:00:00 tvheadend -f -u hts -g video
qa 12003 31168 0 11:25 pts/1 00:00:00 grep --color=auto tvh

after a few seconds:
UID PID PPID C STIME TTY TIME CMD
hts 12005 1 43 11:25 ? 00:00:00 tvheadend -f -u hts -g video
qa 12026 31168 0 11:25 pts/1 00:00:00 grep --color=auto tvh

RE: TVH - unstable version - [ ERROR] tcp: bind: *: Address already in use - Added by Prof Yaffle almost 10 years ago

Sounds like you've got an installed version that, as you say, is crashing and respawning. Check syslog, you'll see the crash and startup messages there. Xubuntu Trusty is a perfectly good base, so I doubt that's relevant.

Check your tvh version, see if you can work out why/where it's crashing, try a later version; after that, you're into gdb and backtracing to see why/where it's dying. You also need to figure out why you have two versions - I presume you have one installed as a service (from PPA or dpkg -i *.deb) and one that's starting independently (e.g. from build.linux?). If it's not that then you perhaps have 3.4 and 3.9 installed at the same time (somehow...!). ps -eaf | grep tvh would be a starting point.

FWIW, I had a lot of crashing with the newer versions when I jumped from build 1987ish to 2100+ - it eventually seemed to fix itself when I 'walked' through 1990, 1995 and so on. I presume I had a config issue that incremental upgrades dealt with better than the big leap, but that remains a guess.

RE: TVH - unstable version - [ ERROR] tcp: bind: *: Address already in use - Added by Joerg B almost 10 years ago

After I installed and uninstalled TVH a few times, it suddenly works since today morning.
I have no idea why it's working now??

    (1-4/4)