1.29.0 IPTV does not consistently connect. Mediaportal client times out before Tv Server establishes timeshifting? (3 Viewers)

doskabouter

Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,938
    Nuenen
    Home Country
    Netherlands Netherlands
    well 2 providers*2 servers*2vpns is a lot of combinations to check :)
    In the end, I would expect that if headers are wrong that you at least get consistent errors and not one day a 302 and the other a 400.
    As a (very) last resort you could check the headers that vlc sends and mimic them in the tvserver, but that's a pretty long shot.
    intermittent errors are indeed the most annoying to debug and fix.
    To get back at your cache thing: As far as I know there isn't anything cached on disk, only thing cached is possibly something in-memory, but nothing a restart of the tvservice wouldn't cure.

    Partly related question: do you use onlinevideos? That also uses MPUrlSourceSplitter as a download-plugin, and could eliminate at least some (tvservice/tvserver) variables here.
    If so (and if you indeed wish to test it that way) I can create a siteutil where you can speficy url and optional headers to be used. Its a bit more flexible to tweak than tvservice, so that might help?
     

    Gcarr

    MP Donator
  • Premium Supporter
  • August 17, 2014
    224
    78
    Home Country
    United States of America United States of America
    Yeah, it's a lot of stuff to manage... but it was all done with hopes it would help isolate the problem. I think it did help to prove that my installation wasn't corrupted but I don't think it's necessary to bother with the laptop anymore.
    The siteutil thing might be interesting to try. Earlier I was trying to figure out how to use curl to do something like that but that would take a person of my experience a long time to get right.
    I've never really used onlinevideos, tinkered with it a time or two. Can I use it with these urls?
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,938
    Nuenen
    Home Country
    Netherlands Netherlands
    not yet, I first have to prepare a piece where you can fill in your urls and what not. I'll notify you when ready. might take a couple of days though...
     

    Gcarr

    MP Donator
  • Premium Supporter
  • August 17, 2014
    224
    78
    Home Country
    United States of America United States of America
    The provider still says there were no changes to the service, but he did give me a new account to try and the results were the same. I was able to get a debug log of VLC connecting. There were a few slight differences in the headers between MP and VLC. Which reminds me, I could have sworn I had seen a user agent string in the logs that was for "VLC 1.01". I cannot find that in the logs now.
    Code:
    ***MP***
    CurlWorker(): Start, url: 'http://website.xyz:8080/username/password/7955'
    CurlDebug(): CURL message: 'Hostname was NOT found in DNS cache'
    CurlDebug(): CURL message: 'Trying 200.20.20.20...'
    CurlDebug(): CURL message: 'Connected to website.xyz (200.20.20.20) port 8080 (#11068)'
    CurlDebugCallback(): sent HTTP header: 'GET /username/password/7955 HTTP/1.1
    Range: bytes=0-
    Host: website.xyz:8080
    Accept: */*
    '
    CurlDebug(): received HTTP header: 'HTTP/1.1 401 Unauthorized'
    CurlDebug(): error response code: 401
    
    ***VLC***
    main debug: creating access: http://website.xyz:8080/username/password/2228
    main debug:  (path: \\website.xyz:8080\username\password\2228)
    http debug: resolving website.xyz ...
    http debug: outgoing request:
    GET /username/password/2228 HTTP/1.1
    Host: website.xyz:8080
    Accept: */*
    Accept-Language: en_US
    User-Agent: VLC/3.0.16 LibVLC/3.0.16
    Range: bytes=0-
    http debug: incoming response:
    HTTP/1.1 302 Found
    Date: Mon, 15 Aug 2021 19:09:23 GMT
    Content-Type: text/html; charset=UTF-8
    Transfer-Encoding: chunked
    Connection: keep-alive
    access-control-allow-origin: *
    location: http://abc1.website.xyz:8080/username/password/2228?token=GBVdBBF1==
    
    CF-Cache-Status: DYNAMIC
    Report-To: {"endpoints":[{"url":"https:\/\/cloudflare.com\/report\/v3?s=123"}],"group":"grp","max_age":604800}
    NEL: {"success_fraction":0,"report_to":"grp","max_age":604800}
    Server: cloudflare
    CF-RAY: 5555555123-IAD
    alt-svc: h3-27=":443"; ma=86400, h3-28=":443"; ma=86400, h3-29=":443"; ma=86400, h3=":443"; ma=86400
    
    http debug: connection failed
    main debug: no access modules matched
    main debug: redirecting to: http://abc1.website.xyz:8080/username/password/2228?token=GBVdBBF1==
    main debug: creating access: http://abc1.website.xyz:8080/username/password/2228?token=GBVdBBF1==
    main debug:  (path: \\abc1.website.xyz:8080\username\password\2228)
    main debug: looking for access module matching "http": 27 candidates
    http debug: resolving abc1.website.xyz ...
    
    http debug: outgoing request:
    GET /username/password/2228?token=GBVdBBF1== HTTP/1.1
    Host: abc1.website.xyz:8080
    Accept: */*
    Accept-Language: en_US
    User-Agent: VLC/3.0.16 LibVLC/3.0.16
    Range: bytes=0-
    
    http debug: incoming response:
    HTTP/1.1 200 OK
    Server: nginx
    Date: Mon, 16 Aug 2021 21:09:31 GMT
    Content-Type: video/mp2t
    Connection: close
    Access-Control-Allow-Origin: *
     
    Last edited:

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,938
    Nuenen
    Home Country
    Netherlands Netherlands
    Hm, it could indeed be the missing useragent causing the problems.
    You should be able to specify that in the tvservice somehow.

    Can and would you pm me the full urls so I can do some small tests?
    Way easier then programming the lot, publish it in onlinevideos and explain to you how you should test... (I'm going to do that anyway, but takes a bit more time)
     

    Gcarr

    MP Donator
  • Premium Supporter
  • August 17, 2014
    224
    78
    Home Country
    United States of America United States of America
    Hm, it could indeed be the missing useragent causing the problems.
    You should be able to specify that in the tvservice somehow.
    Omigod, that was it! :LOL: I had no idea but, there was a setting in the plugin for this. Apparently I'll need to specify that when I import playlists in the future. Weird that I was "Unauthorized" for not specifying a user agent though.

    I do distinctly remember seeing the VLC 1version 1 user agent in the logs because it struck me as odd since that version was so old. I'm pretty sure I didn't accidentally change the user agent for every channel but I don't know how it could have changed itself either.

    Anyway, for future reference In the Plugin, go to the database editor tab. Then in the HTTP section you'll see option to enter the user agent.

    And thank you for hanging in there and helping me with this. I never would have figured this out on my own. :)

    Range: bytes=0-
    User-Agent: VLC/3.0.16 LibVLC/3.0.16
    Host: website.xyz:8080
    Accept: /
     

    Gcarr

    MP Donator
  • Premium Supporter
  • August 17, 2014
    224
    78
    Home Country
    United States of America United States of America
    @doskabouter Turns out there is one more issue, I think this was the probably original problem since this causes the same error I reported in the first post (unknown error - http 400) and the other problem we fixed yesterday (http 401 - unauthorized) must have happened somewhere along the line somehow. But, the good news is, I think I found a pattern to this problem. It seems that if you change the MP version, you have to follow up with an installation of the MediaPortalUrlSourceSplitter plugin. Doesn't matter which version, you can reinstall the same one. Then everything works good again. Here's the summary of the testing I performed.

    Yesterday after adding user agent - ver 1.26 with 2.2.22 works fine (not sure what order I did this in)
    Today upgraded to ver 1.29pre with 2.2.25 failed with http 400 error (not sure what order I did this in)
    downgraded to ver 1.26 with 2.2.22 works fine (not sure what order I did this in)
    Upgrade to 2.2.25 works fine
    upgrade to 1.27 = 400 error
    downgrade to 1.26 = 400 error
    downgrade to 2.2.22 works fine
    upgrade to 1.27 = 400 error
    downgrade to 1.26 = 400 error
    reinstall 2.2.22 works fine
    upgrade to 1.27 = 400 error
    reinstall 2.2.22 works fine
    upgrade to 1.28 = 400 error
    upgrade to 2.2.23 works fine
    upgrade to 1.29pre 400 error
    upgrade to 2.2.25 works fine
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,938
    Nuenen
    Home Country
    Netherlands Netherlands
    That sounds completely plausible, that MPIPTV plugin (which comes with official TVServer installation) is always used after an upgrade, despite MPUrlSourceSplitter being installed and used in the original version.
    I'm going to do some tests to see if I can replicate that and possibly fix it
     

    Gcarr

    MP Donator
  • Premium Supporter
  • August 17, 2014
    224
    78
    Home Country
    United States of America United States of America
    Ah that makes sense now. Let me know if you need some testing.
     

    doskabouter

    Development Group
  • Team MediaPortal
  • September 27, 2009
    4,566
    2,938
    Nuenen
    Home Country
    Netherlands Netherlands
    Just did an update of my tvserver from 1.28 and 1.29 and ideed, it's forgotten that is uses mpurlsourcesplitter...
    Have to fix that quickly to keep the WAF ok

    Edit: an install of MPUrlSourceSplitter fixes it indeed. I'm going to investigate what happens exactly and try to fix it for the next release of Mediaportal
     

    Users who are viewing this thread

    Top Bottom