linuxserver / docker-tvheadend

GNU General Public License v3.0
168 stars 90 forks source link

403 forbidden - repeating #254

Closed dkuchay closed 3 months ago

dkuchay commented 3 months ago

Is there an existing issue for this?

Current Behavior

Nearing completion of initial configuration I am suddenly brought to a login page where the values I entered either during "wizard" or manual entry are not observed for password. I can get to the passwd file in docker shell but following all help posts I can find I cant kill the tvheadend process to modify the startup. It respawns. Not familiar with the commands to stop the service as none that are documented are working. My yaml:


services: tvheadend: image: lscr.io/linuxserver/tvheadend:latest container_name: tvheadend environment:

This is on macOS and with the uid/gid align with my user login and are working with several other containers. I had the same issue when I was on previous hardware of a MSI cube N100 running opensuse leap. If I missed docs please link.

Expected Behavior

I should be able to login to the web interface with the password that I set during setup. or during the wizard. I have tried both and this has repeated over ten times. I cant get out of the forbidden 403 repeating loop with the docker compose file as exampled. I have tried with and without the-C run option as well. If there is documentation on how to stop the container and adjust its startup and I missed it please link. Unfamiliar init system.

Steps To Reproduce

Use supplied docker-compose and add own directories and tested.

Environment

- OS: macOS Sonoma 14.5
- How docker service was installed: docker desktop app

CPU architecture

arm64

Docker creation

---
services:
  tvheadend:
    image: lscr.io/linuxserver/tvheadend:latest
    container_name: tvheadend
    environment:
      - PUID=501
      - PGID=20
      - TZ=America/New_York
      - net=host
      - RUN_OPTS= -C
    volumes:
      - /Users/darylkuchay/media/containers/tvheadend/config:/config
      - /Volumes/dvr:/recordings
    ports:
      - 9981:9981
      - 9982:9982
    #devices:
      #- /dev/dri:/dev/dri #optional

Container logs

──────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    501
User GID:    20
───────────────────────────────────────

Setting permissions
[custom-init] No custom files found, skipping...
2024-06-07 07:44:53.907 [   INFO] main: Log started
2024-06-07 07:44:53.907 [   INFO] config: Using configuration from '/config'
2024-06-07 07:44:53.909 [   INFO] http: Starting HTTP server 0.0.0.0:9981
2024-06-07 07:44:53.909 [   INFO] htsp: Starting HTSP server 0.0.0.0:9982
2024-06-07 07:44:53.910 [   INFO] config: loaded
2024-06-07 07:44:53.910 [   INFO] config: scanfile (re)initialization with path <none>
2024-06-07 07:44:53.910 [   INFO] transcode: 'video' context type registered
2024-06-07 07:44:53.910 [   INFO] transcode: 'audio' context type registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHH264Decoder' decoder helper registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHTHEORADecoder' decoder helper registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHAACDecoder' decoder helper registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHVORBISDecoder' decoder helper registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHOPUSDecoder' decoder helper registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHMPEG2VIDEOEncoder' encoder helper registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHH264Encoder' encoder helper registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHHEVCEncoder' encoder helper registered
2024-06-07 07:44:53.910 [   INFO] transcode: '&TVHAACEncoder' encoder helper registered
2024-06-07 07:44:53.910 [   INFO] codec: 'mpeg2video' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'mp2' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'aac' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'vorbis' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'flac' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'libx264' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'libx265' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'libvpx' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'libvpx-vp9' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'libtheora' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'libvorbis' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'libopus' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'h264_vaapi' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'hevc_vaapi' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'vp8_vaapi' encoder registered
2024-06-07 07:44:53.910 [   INFO] codec: 'vp9_vaapi' encoder registered
2024-06-07 07:44:53.913 [   INFO] codec: 'webtv-h264' codec profile created
2024-06-07 07:44:53.913 [   INFO] codec: 'webtv-vorbis' codec profile created
2024-06-07 07:44:53.913 [   INFO] codec: 'webtv-aac' codec profile created
2024-06-07 07:44:53.913 [   INFO] codec: 'webtv-vp8' codec profile created
2024-06-07 07:44:53.981 [   INFO] descrambler: adding CAID 2600/FFFF as ConstCW interval 10000ms pc 20 ep default (BISS)
2024-06-07 07:44:53.981 [   INFO] descrambler: adding CAID 0E00/FFFF as MultiPID interval 1000ms pc 2 ep default (PowerVu)
2024-06-07 07:44:54.017 [   INFO] iptv: Using 2 input thread(s)
2024-06-07 07:44:54.044 [   INFO] dvr: Creating new configuration ''
2024-06-07 07:44:54.050 [   INFO] epggrab: module uk_freesat created
2024-06-07 07:44:54.050 [   INFO] epggrab: module uk_freesat_eit created
2024-06-07 07:44:54.050 [   INFO] epggrab: module uk_freeview created
2024-06-07 07:44:54.050 [   INFO] epggrab: module nz_freeview2 created
2024-06-07 07:44:54.050 [   INFO] epggrab: module nz_freeview1 created
2024-06-07 07:44:54.050 [   INFO] epggrab: module viasat_baltic created
2024-06-07 07:44:54.050 [   INFO] epggrab: module Bulsatcom_39E created
2024-06-07 07:44:54.050 [   INFO] epggrab: module uk_cable_virgin created
2024-06-07 07:44:54.050 [   INFO] epggrab: module eit created
2024-06-07 07:44:54.050 [   INFO] epggrab: module psip created
2024-06-07 07:44:54.052 [   INFO] epggrab: module opentv-skynz created
2024-06-07 07:44:54.052 [   INFO] epggrab: module opentv-skyuk created
2024-06-07 07:44:54.052 [   INFO] epggrab: module opentv-ausat created
2024-06-07 07:44:54.052 [   INFO] epggrab: module opentv-skyit created
2024-06-07 07:44:54.053 [   INFO] epggrab: module xmltv created
2024-06-07 07:44:54.053 [   INFO] spawn: Executing "/usr/bin/tv_find_grabbers"
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_file created
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_wg created
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_url created
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_combiner created
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_it created
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_na_tvmedia created
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_zz_sdjson_sqlite created
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_na_dtv created
2024-06-07 07:44:54.159 [   INFO] epggrab: module /usr/bin/tv_grab_zz_sdjson created
2024-06-07 07:44:54.189 [   INFO] tbl-eit: module eit - scraper disabled by config
2024-06-07 07:44:54.190 [   INFO] epgdb: gzip format detected, inflating (ratio 138.6% deflated size 79)
2024-06-07 07:44:54.190 [   INFO] epgdb: parsing 57 bytes
2024-06-07 07:44:54.190 [   INFO] epgdb: loaded v3
2024-06-07 07:44:54.190 [   INFO] epgdb:   config     1
2024-06-07 07:44:54.190 [   INFO] epgdb:   broadcasts 0
2024-06-07 07:44:54.190 [   INFO] dvr: Purging obsolete autorec entries for current schedule
2024-06-07 07:44:54.190 [ NOTICE] START: HTS Tvheadend version 4.3-2323~g73a6bd00d started, running as PID:150 UID:501 GID:20, CWD:/run/s6-rc:s6-rc-init:jLeHiF/servicedirs/svc-tvheadend CNF:/config
2024-06-07 07:44:54.210 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:44:54.243 [   INFO] scanfile: DVB-S - loaded 1 regions with 116 networks
2024-06-07 07:44:54.243 [   INFO] scanfile: DVB-T - loaded 46 regions with 1134 networks
2024-06-07 07:44:54.243 [   INFO] scanfile: DVB-C - loaded 20 regions with 82 networks
2024-06-07 07:44:54.243 [   INFO] scanfile: ATSC-T - loaded 2 regions with 13 networks
2024-06-07 07:44:54.243 [   INFO] scanfile: ATSC-C - loaded 1 regions with 5 networks
2024-06-07 07:44:54.244 [   INFO] scanfile: ISDB-T - loaded 2 regions with 1297 networks
Connection to localhost (127.0.0.1) 9981 port [tcp/*] succeeded!
[ls.io-init] done.
2024-06-07 07:45:09.116 [   INFO] mpegts: lineup.m3u - 17.3 WMHT-3 in IPTV Automatic Network - tuning on IPTV #1
2024-06-07 07:45:10.265 [   INFO] subscription: 0001: "epggrab" subscribing to mux "lineup.m3u - 17.3 WMHT-3", weight: 4, adapter: "IPTV #1", network: "IPTV Automatic Network", service: "Raw PID Subscription"
2024-06-07 07:45:24.229 [  ERROR] http: 192.168.65.1: HTTP/1.1 GET (1) /login -- 403
2024-06-07 07:45:24.344 [  ERROR] http: 192.168.65.1: HTTP/1.1 GET (1) /favicon.ico -- 403
2024-06-07 07:45:54.036 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:46:55.251 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:47:54.037 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:48:54.049 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:49:54.047 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:50:54.043 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:51:54.052 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:52:54.060 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:53:54.061 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:54:54.063 [   INFO] iptv: m3u parse: 0 new mux(es) in network 'IPTV Automatic Network' (total 67)
2024-06-07 07:55:15.178 [WARNING] epggrab: PSIP: ATSC Grabber - data completion timeout for lineup.m3u - 17.3 WMHT-3 in IPTV Automatic Network
2024-06-07 07:55:15.178 [WARNING] epggrab: EIT: EPG Grabber - data completion timeout for lineup.m3u - 17.3 WMHT-3 in IPTV Automatic Network
2024-06-07 07:55:15.178 [   INFO] subscription: 0001: "epggrab" unsubscribing
2024-06-07 07:55:16.178 [   INFO] mpegts: lineup.m3u - 51.2 CatchyC in IPTV Automatic Network - tuning on IPTV #1
2024-06-07 07:55:17.357 [   INFO] subscription: 0003: "epggrab" subscribing to mux "lineup.m3u - 51.2 CatchyC", weight: 4, adapter: "IPTV #1", network: "IPTV Automatic Network", service: "Raw PID Subscription"
darylkuchay@Daryls-Mac-mini ~ %
github-actions[bot] commented 3 months ago

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

j0nnymoe commented 3 months ago

Have you tried not setting a user/pass during the wizard and does the same thing happen? Host networking does not work on MacOS - it's not supported via docker desktop.

MacOS / Docker Desktop isn't something we support/test on.

dkuchay commented 3 months ago

Trying no credentials now. Waiting for scan to complete.

I am surprised by net=host not working as my hdhomerun tuner mapping completed. I think I remember that being an issue and having to look into. Came up with net=host as the likely workaround. Last time I tried this I think I hung on getting the tuner mapped.

So I deleted all contents in the config folder. Deleted TVH container and image in docker app. Using brave browser I try private window and go to the web interface. A login prompt comes up and clicking “sign in” or enter on the prompt does nothing. Refreshed the login prompr.

On Jun 7, 2024, at 8:04 AM, j0nnymoe @.***> wrote:

Have you tried not setting a user/pass during the wizard and does the same thing happen? Host networking does not work on MacOS - it's not supported via docker desktop.

— Reply to this email directly, view it on GitHub https://github.com/linuxserver/docker-tvheadend/issues/254#issuecomment-2154697275, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO46OM35G2G374SVQ56I3NDZGGOUDAVCNFSM6AAAAABI6Q5IS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUGY4TOMRXGU. You are receiving this because you authored the thread.

j0nnymoe commented 3 months ago

Reason I mentioned about host networking, last I checked, it's a docker desktop limitation, not a container limitation.

dkuchay commented 3 months ago

Understood. In the passwd file I see values but they are not decrypting to md5. If I knew how to stop the tvheadend service within the container I think I could fudge my way through. Either changing the password files or scripting for first run. I think first run is what go me though. Is this relevant?: https://skarnet.org/software/s6/s6-svc.html

I see s6 in a lot of places when reading folder contents.

On Jun 7, 2024, at 8:31 AM, j0nnymoe @.***> wrote:

Reason I mentioned about host networking, last I checked, it's a docker desktop limitation, not a container limitation.

— Reply to this email directly, view it on GitHub https://github.com/linuxserver/docker-tvheadend/issues/254#issuecomment-2154740212, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO46OM42XINZBNTQNZIZTADZGGR2TAVCNFSM6AAAAABI6Q5IS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUG42DAMRRGI. You are receiving this because you authored the thread.

j0nnymoe commented 3 months ago

Could you try a different browser? Brave might be breaking it. You shouldn't need to do any messing around like stopping services etc.

dkuchay commented 3 months ago

On safari I receive new behavior. Entering nothing in the login boxes and pressing sign in sends me to a 401 Unauthorized page with the two boxes showing in the middle to start a new Default login or just a New login. This is in a private window.

Is there an option, say within run options, to bypass all authentication? On local network with only two devices ever accessing, me as only user. Dont need it.

Either by Net=host or by port number I can access the gui. If you think net=host is relative to not being able to login I can change it. Brave was authored by the person who invented javascript so I thought that it would be better test than safari. Since the hdhomerun mapped and this is known to need net=host for TVheadend to work with the hdhomerun I am thinking I should try other methods first?

On Jun 7, 2024, at 8:40 AM, j0nnymoe @.***> wrote:

Could you try a different browser? Brave might be breaking it. You shouldn't need to do any messing around like stopping services etc.

— Reply to this email directly, view it on GitHub https://github.com/linuxserver/docker-tvheadend/issues/254#issuecomment-2154755329, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO46OM2DIM53NFZOV7WR5ALZGGS5FAVCNFSM6AAAAABI6Q5IS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUG42TKMZSHE. You are receiving this because you authored the thread.

j0nnymoe commented 3 months ago

If you don't want authentication, just don't set any user/pass during the setup wizard.

dkuchay commented 3 months ago

You just asked me to try that and after I did I reported back that it didnt work:

Either the login promt refreshes on brave browser or I am brought to a 401 Unathorized page on safari.

Not setting a login doesnt work. I still get prompted.

So its not worth asking for instruction how to manually change the password values in the passwd file? That seems like it would be the most logical place to look if I have credentialing problems. What is the hash on the values in that file?

On Jun 7, 2024, at 9:05 AM, j0nnymoe @.***> wrote:

If you don't want authentication, just don't set any user/pass during the setup wizard.

— Reply to this email directly, view it on GitHub https://github.com/linuxserver/docker-tvheadend/issues/254#issuecomment-2154796981, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO46OMY5AURR2CSBFGYCQELZGGVYXAVCNFSM6AAAAABI6Q5IS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUG44TMOJYGE. You are receiving this because you authored the thread.

j0nnymoe commented 3 months ago

You seem to have something else interferring with you install, I'm able to deploy tvheadend with no problems here but using Linux/Docker Engine.

The user details to my knowledge are all stored in the /config volume for tvheadend.

dkuchay commented 3 months ago

This is month 6 of not being able to install and use TVHeadend from docker (linuxserver) and across 3 different platforms. All with this exact issue. Intel and mac mixed. I will look in the config folder for user info that isn't aligning.

Most of the solved threads I see talk about resetting the user password via cli or killing the running instance of and restarting it up with —noacl or similar. I was hoping to accomplish one of these if not both before I ran in to the “works for me” reply. Thank you for your assistance. I will simply look for alternate software to run. No issues with any other containers. Just this one.

On Jun 7, 2024, at 9:29 AM, j0nnymoe @.***> wrote:

You seem to have something else interferring with you install, I'm able to deploy tvheadend with no problems here but using Linux/Docker Engine.

The user details to my knowledge are all stored in the /config volume for tvheadend.

— Reply to this email directly, view it on GitHub https://github.com/linuxserver/docker-tvheadend/issues/254#issuecomment-2154843226, or unsubscribe https://github.com/notifications/unsubscribe-auth/AO46OM2RIWYKLH35FHWG7B3ZGGYTVAVCNFSM6AAAAABI6Q5IS6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNJUHA2DGMRSGY. You are receiving this because you authored the thread.

j0nnymoe commented 3 months ago

Appreciate that you might've been having this issue for 6 months on various platforms, though you've only opened this issue a couple hours ago.

The issue is, specifically with the information you've provided in the issue, we just don't recommend MacOS nor docker desktop in any form for our containers. If you can replicate this issue on a linux host using docker engine (not desktop) then we can attempt to replicate.

dkuchay commented 3 months ago

Understood. Thanks for letting me know. I was able to get a different container of tvheadend to get past the login issue but failed to stream a channel properly so I am closing the issue.