tvheadend on ASUS RT-AC68U - trouble accessing webUI
Added by S S over 7 years ago
In the past I have used LibreElec/Kodi on a PC to run Tvheadend serverbut now I would like to run it on my ASUS Router. So far, I have successfully:
-installed ASUSWRT-merlin
-formated a 4G USB stick in ext4 using my desktop PC and attached it to the router
-created an SSH connection to the command prompt on the router
-installed Entware-NG using the merlin script from the command prompt
-used 'opkg' to install Tvheadend from the command prompt
-run 'tvheadend' from the command prompt (plain, no options). In the response text, there are some errors which I have shown in a separate post.
Problem: I am not able to get the tvheadend webUI to respond.
Before tvheadend is started, 192.168.2.1:9981 will go straight to a "Unable to Connect" browser screen. After I start tvheadend, the browser will grind away but doesn't come back immediately with anything. After a while it will give "Unable to Connect". This leads me to believe that something is going on when tvheadend is running.
This is alot of new stuff to me so it could be a fundamental error on my part. Is it the router or tvheadend that is the problem? Is there an easy way to tell? Suggested next steps?
T.
Replies (14)
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by S S over 7 years ago
Okay, I think I'll take that back. The errors near the bottom probably need some fixing. Can anyone take a moment to help me along? Thank you very much.
I realize that I don't have my tuner stick installed at this point. I'm moving through this one step at a time.
admin@RT-AC68U:/tmp/home/root# tvheadend -C
2017-02-16 03:38:55.119 [ INFO] main: Log started
2017-02-16 03:38:55.139 [ INFO] config: loaded
2017-02-16 03:38:55.201 [WARNING] scanfile: no predefined muxes found, check pat h '/usr/share/dvb'
2017-02-16 03:38:55.201 [WARNING] scanfile: expected tree structure - http://git .linuxtv.org/cgit.cgi/dtv-scan-tables.git/tree/
2017-02-16 03:38:55.608 [ INFO] dvr: Creating new configuration ''
2017-02-16 03:38:55.609 [WARNING] access: Created default wide open access contr ole entry
2017-02-16 03:38:55.609 [ INFO] CSA: Using 32bit parallel descrambling
2017-02-16 03:38:55.609 [ INFO] epggrab: module eit created
2017-02-16 03:38:55.609 [ INFO] epggrab: module uk_freesat created
2017-02-16 03:38:55.609 [ INFO] epggrab: module uk_freeview created
2017-02-16 03:38:55.609 [ INFO] epggrab: module viasat_baltic created
2017-02-16 03:38:55.630 [ INFO] epggrab: module opentv-ausat created
2017-02-16 03:38:55.631 [ INFO] epggrab: module opentv-skyuk created
2017-02-16 03:38:55.631 [ INFO] epggrab: module opentv-skynz created
2017-02-16 03:38:55.631 [ INFO] epggrab: module opentv-skyit created
2017-02-16 03:38:55.644 [ INFO] epggrab: module pyepg created
2017-02-16 03:38:55.645 [ INFO] epggrab: module xmltv created
2017-02-16 03:38:55.658 [ ERROR] spawn: Unable to fork() for "/opt/bin/tv_grab_ wl500g_info" -- Cannot allocate memory
2017-02-16 03:38:55.659 [ ERROR] spawn: Unable to fork() for "/opt/bin/tv_grab_ wl500g_info_toffset" -- Cannot allocate memory
2017-02-16 03:38:55.661 [ ERROR] spawn: Unable to fork() for "/opt/bin/tv_grab_ wl500g_info" -- Cannot allocate memory
2017-02-16 03:38:55.662 [ ERROR] spawn: Unable to fork() for "/opt/bin/tv_grab_ wl500g_info_toffset" -- Cannot allocate memory
2017-02-16 03:38:55.663 [ NOTICE] START: HTS Tvheadend version 4.0.9~openwrt1 st arted, running as PID:8578 UID:0 GID:0, CWD:/tmp/home/root CNF:/tmp/home/root/.h ts/tvheadend
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by S S over 7 years ago
I'm pretty sure 'tvheadend' is running. When I use the 'top' or 'ps' commands I see this is the list:
14674 admin 103m S tvheadend
and I do see the following entries when I type in netstat -l -tu -nW but I don't quite know why it would be 0.0.0.0?
tcp 0 0 0.0.0.0:9981 0.0.0.0:* LISTEN
tcp 0 0 0.0.0.0:9982 0.0.0.0:* LISTEN
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by Mark Clarkstone over 7 years ago
Use -b --bindaddr. See --help
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by S S over 7 years ago
After using the advice above, "netstat" now shows LISTENING on 192.168.2.1:9981 and 9982 but still no webUI. There must be something else in there blocking the browser connection to the webUI.
Any suggestion on how to find the roadblock? or at least narrow down why the page isn`t loading?
I added a rule to the iptables using the following with no change in behavior:iptables -I INPUT -p tcp --dport 9981 -j ACCEPT
Same result: When tvheadend is running, I get a blank loading page until I kill tvheadend at which point Firefox reports back "Unable to connect" and stops trying to load the page.
S.
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by Ivar Lumi over 7 years ago
Hi,
I had similar problem with TBS MOI+, my ip range was 192.168.2.x but in TvHeadend config there was 192.168.1.x for some reason.
It was some time ago, don't rember conf file name location.
It edited this UI value:
https://tvheadend.org/projects/tvheadend/wiki/Access_configuration
In your case, you may have similar problem ....
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by S S over 7 years ago
Based on Ivan's comment, I tried finding any file with "192.168.1" using the following. It takes forever as I can't figure out how to exclude binaries with my versions of grep and find. In the end, nothing came up after about an hour so I aborted the search.
find / -exec grep -i "192.168.1" {} +
I also repeated the search on the USB drive only using admin@RT-AC68U:/tmp/mnt/EXT4_USB# find -exec grep -i "192.168.1" {} +
Nothing was found.
Any chance that I'm missing something stupidly simple? Maybe I'm starting/running TH without the correct permissions or something else simple that a Linux noob might overlook? Permissions and users and groups is one aspect of linux that I'm still grappling with.
.
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by Ivar Lumi over 7 years ago
If rember right, it is in:
/.hts/tvheadend/accesscontrol/
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by S S over 7 years ago
Thanks Ivar. Here is the contents of the only file in that directory (a9147a396d1ad251e0500de6af4e69cc){
"index": 1,
"enabled": true,
"username": "*",
"password2": "***Deleted for privacy***",
"prefix": "0.0.0.0/0,::/0",
"streaming": true,
"adv_streaming": true,
"htsp_streaming": true,
"profile": "",
"dvr": true,
"htsp_dvr": true,
"all_dvr": true,
"all_rw_dvr": true,
"dvr_config": "",
"webui": true,
"admin": true,
"conn_limit": 0,
"channel_min": 0,
"channel_max": 0,
"channel_tag": "",
"comment": "Default access entry"
}
Do you think the prefix value needs to be changed?
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by Ivar Lumi over 7 years ago
All seems ok in that file.
You should have somehting else, have you tried to turn off router firewall ?
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by S S over 7 years ago
Tried switching off the router firewall via the router webUI and turning off Windows firewall too just in case. Unfortunately, there was no change in behavior. Thank you for the suggestion though.
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by Joe User over 7 years ago
S S wrote:
and I do see the following entries when I type in netstat -l -tu -nW but I don't quite know why it would be 0.0.0.0?
That just means it is listening on all addresses instead of a specific address.
S S wrote:
Same result: When tvheadend is running, I get a blank loading page until I kill tvheadend at which point Firefox reports back "Unable to connect" and stops trying to load the page.
I would guess that means you actually are connecting, just not getting anything from tvheadend.
Did you try a netstat command while the browser was connecting?
netstat -antW |grep 9981
You can also try tcpdump if it is on your router:
tcpdump -nn tcp port 9981
Run it while trying to connect and it will show all traffic to and from port 9981.
How about a trace log:
tvheadend -d --noacl --trace
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by S S over 7 years ago
Solved: Thanks to one of the users at SmallNetBuilder:ASUSWRT forum!
I hadn't created a swap file which my hardware requires. My interpretation of insignificant errors was incorrect.
One step closer. Now just have to setup the hardware. (Hauppauge 950Q)
Thank you everyone for your help.
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by Ivar Lumi over 7 years ago
Nice to hear.
Once you get running ok, it would be nice if you write minimal guide how to get running ...
RE: tvheadend on ASUS RT-AC68U - trouble accessing webUI - Added by nf gb over 7 years ago
Hi,
Have you managed to setup the hardware? I have the same router and have a similar Hauppauge tuner which already works on a rpi2 but I'm clueless on how to configure it on the router...