Project

General

Profile

only EPG elements in UI

Added by m auk over 7 years ago

Hi,

tvheadend: version 4.3-315~g0f7e658

Distributor ID: Ubuntu
Description: Ubuntu 16.04.3 LTS

Since the last update - I only appear to see the EPG info.

I have found the below in ~/.hts/tvheadend/accesscontrol


"uilevel": -1,
"uilevel_nochange": -1,

Tried changing to 0, -0, 2, -2 and none have made a difference.

Any ideas?

The user I am logged in as is specified in .hts/tvheadend/superuser

(posted in issue before finding forum - apologies if double-post)

tvh.png (43 KB) tvh.png

Replies (14)

RE: only EPG elements in UI - Added by m auk over 7 years ago

narrowed this down - it only occurs when reverse proxying the UI.

if i go to ip:9981 the full UI shows.

reverse proxy is setup as below:

ProxyPass /tv http://IPADDR:9981/tv retry=0
ProxyPassReverse /tv http://IPADDR:9981/tv

I know this isnt an apache forum - but if anyone has a rev proxy setup can they share? the above worked fine until recently

RE: only EPG elements in UI - Added by Jaroslav Kysela over 7 years ago

Add websocket proxy config to apache. The last tvh webui uses websocket instead HTTP for the instant connection to the server.

RE: only EPG elements in UI - Added by m auk over 7 years ago

would that be:

ws://IPADDR:9981/tv

?

RE: only EPG elements in UI - Added by Jaroslav Kysela over 7 years ago

The config should be similar to http one.. TVH use 'ws://IPADDR:9981/comet/ws' only at the moment (without the proxy prefix).

RE: only EPG elements in UI - Added by m auk over 7 years ago

n/m - that got it. thanks!


ProxyPass /tv ws://IPADDRESS:9981/tv
ProxyPassReverse /tv ws://IPADDRESS:9981/tv

RE: only EPG elements in UI - Added by Joey Joey about 7 years ago

Can you show the entire vhost config?

I enabled proxy_wstunnel in apache and changed the config from http:// to ws:// but am getting error 500. Apache complains that there is no handler...

<Location /tvheadend>
ProxyPass ws://tvheadend.domain.local:9981/tvheadend
ProxyPassReverse ws://tvheadend.domain.local:9981/tvheadend
</Location>

RE: only EPG elements in UI - Added by Dietmar Konermann about 7 years ago

Faced the issue. This works for me now:

ProxyPass /tvh/comet/ws ws://localhost:9981/tvh/comet/ws
ProxyPassReverse /tvh/comet/ws ws://localhost:9981/tvh/comet/ws
ProxyPass /tvh http://localhost:9981/tvh
ProxyPassReverse /tvh http://localhost:9981/tvh

So I only pass /comet/ws to ws://

Cheers
Diddle.

RE: only EPG elements in UI - Added by saen acro about 7 years ago

What is advantage of proxy vs port redirect?

RE: only EPG elements in UI - Added by m auk about 7 years ago

Dietmar Konermann wrote:

Faced the issue. This works for me now:

ProxyPass /tvh/comet/ws ws://localhost:9981/tvh/comet/ws
ProxyPassReverse /tvh/comet/ws ws://localhost:9981/tvh/comet/ws
ProxyPass /tvh http://localhost:9981/tvh
ProxyPassReverse /tvh http://localhost:9981/tvh

So I only pass /comet/ws to ws://

Cheers
Diddle.

That worked a charm for me too - only difference is my base URL is tv rather than tvh and im proxying to a different IP rather than locally:

ProxyPass /tv/comet/ws ws://192.168.0.2:9981/tv/comet/
ProxyPassReverse /tv/comet/ws ws://192.168.0.2:9981/tv/comet/ws
ProxyPass /tv http://192.168.0.2:9981/tv
ProxyPassReverse /tv http://192.168.0.2:9981/tv@

RE: only EPG elements in UI - Added by Joey Joey about 7 years ago

This worked!

Wasn't obvious to me that the websocket proxy should be added specifically for comet.

@Saen acro, I'm proxying multiple service through a dedicated web proxy in the DMZ using SSL. This makes maintenance easier and tightens security.

RE: only EPG elements in UI - Added by saen acro about 7 years ago

Joey Joey wrote:

@Saen acro, I'm proxying multiple service through a dedicated web proxy in the DMZ using SSL. This makes maintenance easier and tightens security.

Time and processor loosing.
Good firewall rules on cheap router make same easier and faster.
Port change, access list limit easy pizi.
VPN... make miracles ;)

RE: only EPG elements in UI - Added by J Blanc about 7 years ago

FYI, the way you're using websockets will not work in Safari/WebKit, because they read the standard as explicitly refusing HTTP Authentication. I've raised a bug on this.

RE: only EPG elements in UI - Added by Marcia Hopper about 7 years ago

For Nginx the following man helped me:
http://nginx.org/en/docs/http/websocket.html

EPG was the only tab and I had the following error in logs:

[  ERROR] http: 172.17.0.1: HTTP/1.0 GET /path/tvheadend/comet/ws -- 415

Working Nginx conf:

location /path/tvheadend {
    proxy_pass http://127.0.0.1:9981;
    proxy_set_header Host $host;
    proxy_set_header X-Real-IP $remote_addr;
    proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header Upgrade $http_upgrade;
    proxy_set_header Connection "upgrade";
}

Run params:

/usr/bin/tvheadend -C -c /config --noacl --http_root /path/tvheadend

RE: only EPG elements in UI - Added by rpluto . about 6 years ago

How ...

Base on the settings from ngix.

For apache is need more than

the Proxy and the reverse

And based on this is information need some rewrite
https://stackoverflow.com/questions/22002744/how-to-set-up-an-apache-proxy-for-meteor-sockjs-and-websocket

So after that my reverse proxy is ok

Settings

  ProxyPass /tvheadend http://localhost:9981/tvheadend
  ProxyPassReverse /tvheadend http://localhost:9981/tvheadend
<Location /tvheadend/comet/ws>
        RewriteEngine on
        RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]
        RewriteCond %{HTTP:CONNECTION} ^Upgrade$ [NC]
        RewriteRule .* ws://localhost:9981/tvheadend/comet/ws [P]
 </Location>

I use --http_root /tvheadend/

    (1-14/14)