Project

General

Profile

Can't access Web UI through http://localhost:9981 in Raspberry Pi

Added by Jon Gott almost 11 years ago

I just enabled tvheadend on raspbmc and I am trying to access the Web UI but I cannot access it for some reason. I am using http://10.0.0.12:. Any suggestions? I am able to access the Pi through web using 10.0.0.12:8080. Any sugestions are welcome. Thanks!! :)


Replies (10)

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by Prof Yaffle almost 11 years ago

Probably access control... have a look in /home/hts/.hts/tvheadend/accesscontrol (or wherever the tvheadend user's home directory is). In there you'll find a series of numbered files, one per access control rule. Make sure that the one corresponding to your user is enabled and has the right permissions... something like:

wibble@blob:~/.hts/tvheadend/accesscontrol$ more 1
{
        "enabled": 1,
        "username": "xbmc",
        "password": "xbmc",
        "comment": "Admin user",
        "prefix": "0.0.0.0/0",
        "streaming": 1,
        "dvr": 1,
        "dvrallcfg": 1,
        "webui": 1,
        "admin": 1,
        "id": "1" 
}

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by Prof Yaffle almost 11 years ago

Also, make sure that tvheadend is actually running, otherwise there clearly won't be any web interface to which to connect...!

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by Jon Gott almost 11 years ago

Thank you! I went through the Raspbmc settings again and way down at the bottom of the system configuration there is a section for "Service Management". One of the on/of toggles is "TVHeadend Server (port 9981). It was off by default apparently.

Thanks for your help!

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by Jim Learmonth almost 11 years ago

A bit late, but a useful command from a shell is ...
netstat -an | grep 9981

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by Anton Bungin over 5 years ago

Seems to be a similar problem (on Ubuntu) after installing Digital Devices drivers.
No GUI appears neither with 127.0.0.1:9981 nor 192.168.1.139:9981

At first:
root@tvbung:/home/anton# netstat -an | grep 9981
tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN
tcp 354 0 127.0.0.1:9981 127.0.0.1:35798 CLOSE_WAIT
tcp 358 0 192.168.1.139:9981 192.168.1.139:37678 CLOSE_WAIT
tcp 348 0 192.168.1.139:9981 192.168.1.139:37702 CLOSE_WAIT
tcp 342 0 127.0.0.1:9981 127.0.0.1:35790 CLOSE_WAIT
tcp 358 0 192.168.1.139:9981 192.168.1.139:37680 CLOSE_WAIT
tcp 348 0 192.168.1.139:9981 192.168.1.139:37658 CLOSE_WAIT
tcp 0 0 192.168.1.139:37766 192.168.1.139:9981 ESTABLISHED
tcp 347 0 192.168.1.139:9981 192.168.1.139:37766 ESTABLISHED

Then:
root@tvbung:/home/anton# netstat -an | grep 9981
tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN
tcp 354 0 127.0.0.1:9981 127.0.0.1:35798 CLOSE_WAIT
tcp 358 0 192.168.1.139:9981 192.168.1.139:37678 CLOSE_WAIT
tcp 348 0 192.168.1.139:9981 192.168.1.139:37702 CLOSE_WAIT
tcp 416 0 192.168.1.139:9981 192.168.1.55:54492 ESTABLISHED
tcp 342 0 127.0.0.1:9981 127.0.0.1:35790 CLOSE_WAIT
tcp 0 0 192.168.1.139:9981 192.168.1.55:54493 ESTABLISHED
tcp 358 0 192.168.1.139:9981 192.168.1.139:37680 CLOSE_WAIT
tcp 348 0 192.168.1.139:9981 192.168.1.139:37658 CLOSE_WAIT
tcp 0 0 192.168.1.139:37766 192.168.1.139:9981 ESTABLISHED
tcp 347 0 192.168.1.139:9981 192.168.1.139:37766 ESTABLISHED

root@tvbung:/home/anton# service tvheadend status
● tvheadend.service
Loaded: loaded (/etc/init.d/tvheadend; bad; vendor preset: enabled)
Active: active (running) since Чт 2019-04-25 20:44:59 MSK; 28min ago
Docs: man:systemd-sysv-generator(8)
Process: 11493 ExecStop=/etc/init.d/tvheadend stop (code=exited, status=0/SUCCESS)
Process: 11522 ExecStart=/etc/init.d/tvheadend start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/tvheadend.service
└─11535 /usr/bin/tvheadend -f -u hts -g video

апр 25 20:44:59 tvbung tvheadend11535: tcp: No systemd socket: creating a new one
апр 25 20:44:59 tvbung tvheadend11535: htsp: Starting HTSP server 0.0.0.0:9982
апр 25 20:44:59 tvbung tvheadend11535: config: loaded
апр 25 20:44:59 tvbung tvheadend11535: config: scanfile (re)initialization with path <none>
апр 25 20:45:02 tvbung tvheadend11535: scanfile: DVB-S - loaded 1 regions with 94 networks
апр 25 20:45:02 tvbung tvheadend11535: scanfile: DVB-T - loaded 44 regions with 1104 networks
апр 25 20:45:02 tvbung tvheadend11535: scanfile: DVB-C - loaded 17 regions with 53 networks
апр 25 20:45:02 tvbung tvheadend11535: scanfile: ATSC-T - loaded 2 regions with 9 networks
апр 25 20:45:02 tvbung tvheadend11535: scanfile: ATSC-C - loaded 1 regions with 5 networks
апр 25 20:45:02 tvbung tvheadend11535: scanfile: ISDB-T - loaded 2 regions with 1000 networks

The same problem with any other browser on this and other PCs

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by Anton Bungin over 5 years ago

root@tvbung:/home/anton# netstat -lpn
Активные соединения с интернетом (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 127.0.0.1:5940 0.0.0.0:* LISTEN 1845/teamviewerd
tcp 0 0 127.0.1.1:53 0.0.0.0:* LISTEN 1451/dnsmasq
tcp 0 0 127.0.0.1:631 0.0.0.0:* LISTEN 1071/cupsd
tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN 11535/tvheadend
tcp 0 0 0.0.0.0:9982 0.0.0.0:* LISTEN 11535/tvheadend
tcp6 0 0 ::1:631 :::* LISTEN 1071/cupsd
udp 0 0 0.0.0.0:37384 0.0.0.0:* 1451/dnsmasq
udp 0 0 0.0.0.0:5353 0.0.0.0:* 1219/avahi-daemon:
udp 0 0 0.0.0.0:54888 0.0.0.0:* 1451/dnsmasq
udp 0 0 0.0.0.0:60529 0.0.0.0:* 1219/avahi-daemon:
udp 0 0 127.0.1.1:53 0.0.0.0:* 1451/dnsmasq
udp 0 0 0.0.0.0:68 0.0.0.0:* 1425/dhclient
udp 0 0 0.0.0.0:68 0.0.0.0:* 1431/dhclient
udp 0 0 0.0.0.0:631 0.0.0.0:* 1305/cups-browsed
udp6 0 0 :::5353 :::* 1219/avahi-daemon:
udp6 0 0 :::59344 :::* 1219/avahi-daemon:
raw6 0 0 :::58 :::* 7 1216/NetworkManager
raw6 0 0 :::58 :::* 7 1216/NetworkManager
Активные сокеты домена UNIX (only servers)
Proto RefCnt Flags Type State I-Node PID/Program name Путь
unix 2 [ ACC ] STREAM LISTENING 34233 1738/systemd /run/user/1000/systemd/private
unix 2 [ ACC ] STREAM LISTENING 15962 1216/NetworkManager /var/run/NetworkManager/private-dhcp
unix 2 [ ACC ] SEQPACKET LISTENING 44045 1/init /run/udev/control
unix 2 [ ACC ] STREAM LISTENING 29178 3566/dbus-daemon /tmp/dbus-JFC7h6g76f
unix 2 [ ACC ] STREAM LISTENING 31019 1948/gnome-keyring- /run/user/1000/keyring/control
unix 2 [ ACC ] STREAM LISTENING 31020 1948/gnome-keyring- /run/user/1000/keyring/ssh
unix 2 [ ACC ] STREAM LISTENING 31022 1948/gnome-keyring- /run/user/1000/keyring/pkcs11
unix 2 [ ACC ] STREAM LISTENING 26834 1393/Xorg /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 35038 2042/gnome-session- /tmp/.ICE-unix/2042
unix 2 [ ACC ] STREAM LISTENING 1344 2198/pulseaudio /run/user/1000/pulse/native
unix 2 [ ACC ] STREAM LISTENING 35037 2042/gnome-session-
/tmp/.ICE-unix/2042
unix 2 [ ACC ] STREAM LISTENING 26833 1393/Xorg /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 30642 3129/unity-scope-lo @anton-com.canonical.Unity.Scope.applications.T1294340367132
unix 2 [ ACC ] STREAM LISTENING 41453 1930/ibus-daemon
/tmp/ibus/dbus-Sne5Edol
unix 2 [ ACC ] STREAM LISTENING 44537 1989/gpg-agent /home/anton/.gnupg/S.gpg-agent
unix 2 [ ACC ] STREAM LISTENING 41266 1/init /run/uuidd/request
unix 2 [ ACC ] STREAM LISTENING 41267 1/init /var/run/avahi-daemon/socket
unix 2 [ ACC ] STREAM LISTENING 41268 1/init /var/run/cups/cups.sock
unix 2 [ ACC ] STREAM LISTENING 41269 1/init /run/snapd.socket
unix 2 [ ACC ] STREAM LISTENING 41270 1/init /run/snapd-snap.socket
unix 2 [ ACC ] STREAM LISTENING 41271 1/init /var/run/dbus/system_bus_socket
unix 2 [ ACC ] STREAM LISTENING 41274 1/init /run/acpid.socket
unix 2 [ ACC ] STREAM LISTENING 44040 1/init /run/systemd/private
unix 2 [ ACC ] STREAM LISTENING 30641 3129/unity-scope-lo anton-com.canonical.Unity.Scope.scopes.T129432592892
unix 2 [ ACC ] STREAM LISTENING 44053 1/init /run/systemd/journal/stdout
unix 2 [ ACC ] STREAM LISTENING 44077 1/init /run/systemd/fsck.progress
unix 2 [ ACC ] STREAM LISTENING 39091 1846/dbus-daemon
/tmp/dbus-Ux2Sk13QRM
unix 2 [ ACC ] STREAM LISTENING 34344 2057/dbus-daemon /tmp/dbus-yKuYDojz6m
unix 2 [ ACC ] STREAM LISTENING 44855 3131/unity-files-da @anton-com.canonical.Unity.Scope.files.T1284981253800
unix 2 [ ACC ] STREAM LISTENING 24883 1742/upstart
/com/ubuntu/upstart-session/1000/1742
unix 2 [ ACC ] STREAM LISTENING 30635 3118/unity-scope-ho anton-com.canonical.Unity.Master.Scope.files.T1283675431571
unix 2 [ ACC ] STREAM LISTENING 27419 3555/dbus-daemon
/tmp/dbus-alZ4fvp38I
unix 2 [ ACC ] STREAM LISTENING 30634 3118/unity-scope-ho @anton-com.canonical.Unity.Master.Scope.applications.T1283662957459

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by Anton Bungin over 5 years ago

And after long opening the page stops with "unsuccessful try", but with another port:
http://192.168.1.139:37766/

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by Mike W over 4 years ago

Just found this as I've had the same experience. Was able to login to any networked computer, but NOT the server. However, when I used my local IP address in the browser, rather than 'localhost', it worked! So solution seems to be, if your server is, say at 192.168.0.1 use http://192.168.0.1:9981 and NOT http://localhost:9981 as the browser URL.

RE: Can't access Web UI through http://localhost:9981 in Raspberry Pi - Added by saen acro over 4 years ago

netstat -lpnt | grep tvheadend

simple way to find it
    (1-10/10)