Client Connection Problems

Discussion in 'Installation, configuration support' started by rsbrux, January 21, 2016.

  1. rsbrux
    • Team MediaPortal

    rsbrux Documentation Group

    Joined:
    April 15, 2007
    Messages:
    1,022
    Likes Received:
    67
    Ratings:
    +91 / 1
    Home Country:
    Switzerland Switzerland
    Show System Specs
    I have an Intel Compute Stick running Windows 10 set up as a second MP1 client (the first one is on the same machine as the TV Server). It was working (kind of) briefly, but after a Windows update, it no longer connects with the TV Server. Even when it was connecting to the TV Server, the TV streaming was intermittent, often stuttering, then stopping and presenting the connection screen.
    The TV Server machine has a fixed IP address which I have entered into gentle.config (on the server).
    My questions:
    1. How can I get the Server (presumably DB) connection to work again?
    2. How can I get the connection to be more reliable
    I don't believe that the network connection is at fault, even though the Compute Stick connects via WiFi. The TV Server is connected to the WLAN router by cable, and the Compute Stick client has no problem streaming video from the Internet via Online Videos. I realize that the TV stream needs more capacity than the Online Videos stream, but that shouldn't cause MP to think that it has no connection to the server. I am running the Compute Stick client with the Windows 10 native decoders (not LAV).
    I have attached logfiles, recording:
    1. A failed attempt to access the TV Server
    2. Subsequently, in the same session, successful streaming of Online Videos
    TIA for any tips!


     

    Attached Files:

  2. Google AdSense Guest Advertisement



    to hide all adverts.
  3. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Fix the gentle.config file on the client. It's completely corrupted. You can fix it by replacing it with the gentle.config file from the server.

    I guess try to find out how the client's gentle.config got corrupted, and then don't let it happen again.
     
    • Thank You! Thank You! x 1
  4. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    For example, this is the kind of thing that can cause files to be corrupted:
    "1/18/2016 7:38:34 AM";"EventLog";"(0)";"Error";"The previous system shutdown at 10:03:32 PM on ‎1/‎17/‎2016 was unexpected.";"2147489656"
    "1/18/2016 3:51:32 PM";"EventLog";"(0)";"Error";"The previous system shutdown at 10:58:34 AM on ‎1/‎18/‎2016 was unexpected.";"2147489656"
    "1/19/2016 10:40:07 AM";"EventLog";"(0)";"Error";"The previous system shutdown at 10:38:31 AM on ‎1/‎19/‎2016 was unexpected.";"2147489656"

    This unexpected shutdown seems to be happening every day. Not good.
     
    • Thank You! Thank You! x 1
  5. rsbrux
    • Team MediaPortal

    rsbrux Documentation Group

    Joined:
    April 15, 2007
    Messages:
    1,022
    Likes Received:
    67
    Ratings:
    +91 / 1
    Home Country:
    Switzerland Switzerland
    Show System Specs
    Thanks for your answers. The shutdowns were caused by me. The TV Server connection problems seem to hang the MP client when I use the Frames skin; the default skin appears to handle them more gracefully. There were several factors causing connection problems. Windows 10 seems to be notorious for them.
    After much tinkering around and a reboot of my WLAN router, I now have a stable network connection, i.e. I can stream Online Videos and I can call up the TV Guide or the Recordings list from the TV Server with no problems. However, I still get no live TV stream from the Server. The attached log files come from a couple of fruitless attempts, flanked by successful access of the TV Guide and the Recordings list, to ensure that the DB connection was still intact.
    Any more tips?
     
  6. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    I have several tips:
    1. Disable the IPv6 protocol in the compute stick's NIC properties. This should stop some of the connection lags like this:
    [2016-01-23 14:59:56,696] [Log ] [MPMain ] [INFO ] - succeeded:confused:ucceeded TvControl.VirtualCard
    [2016-01-23 15:00:17,744] [Log ] [MPMain ] [INFO ] - tvhome:startplay

    2. Install and use the LAV codecs. I would not recommend the MS DTV-DVD codecs on W10. Apparently they are not able to decode MPEG 2 video on W10. That's in addition to the fact that they have never been able to decode AC3/DD audio in MP due to licensing constraints.


    According to the log files, technically it looks like MP was able to start TV. However, it's obvious that the stream would have been completely unwatchable, and the .NET remoting connection appears to drop as you have said.

    To me it looks like "something" - maybe the router, wireless connection or compute stick CPU - is overwhelmed almost as soon as the TV stream starts. I say this based on two things:
    1. The disconnection of the remoting connection from the client side.
    TV stream starts:
    [2016-01-23 15:04:48,789] [Log ] [MPMain ] [INFO ] - TVHome.ViewChannelAndCheck(): View channel=SRF 1 HD
    [2016-01-23 15:04:48,851] [Log ] [MPMain ] [INFO ] - succeeded:confused:ucceeded TvControl.VirtualCard

    ...and connection drops:
    [2016-01-23 15:05:08,526] [Log ] [TvClient-TvHome: HeartBeat transmitter thread] [ERROR] - TvServer: Failed to execute remote TV server operation (IsAnyCardRecording) The operation has timed out after 3000.
    ...
    [2016-01-23 15:05:12,589] [Log ] [TvClient-TvHome: HeartBeat transmitter thread] [INFO ] - RemoteControl - timed out after 3003 msec
    ...
    [2016-01-23 15:05:14,460] [Log ] [MPMain ] [INFO ] - RemoteControl - Disconnected

    Actually the server does not seem to realise that the connection is gone, which is interesting.

    2. The presence of a huge number of continuity errors in the TsReader log without any continuity errors in the TV Server TsWriter log.
    Continuity errors just mean that the stream is missing chunks/parts. Such a stream will be pixelated, jerky etc. ... and maybe completely unwatchable.
    Normally I see continuity errors in the server's TsWriter log file, and they mean signal strength/quality is low or the time-shift HDD is overloaded. However in your case they are only present in the client's TsReader log. This tells me that parts of the stream are being lost by the network link between the client and server.

    Keep in mind that the 720p h.264 TV stream you've been testing with is probably somewhere between 7.5 and 12 Mb/s. I would guess OnlineVideos internet streams are more likely to be 3 Mb/s or less, and they can be heavily buffered. In other words: it isn't fair to compare OV and TV. I'm definitely not convinced that your network connection is stable yet.


    I looked at the specs for your compute stick, and I honestly wonder if it is actually capable of handling a TV stream with wireless networking and such a low power CPU and GPU. One other thing I wondered is whether your router supports 802.11n wireless... or only 802.11g?

    Some more suggestions...
    • try temporarily disabling any security software (eg. Windows Defender) you have on the compute stick
    • try to view task manager and check the CPU and network load while starting a TV stream
    • try an SD channel instead of an HD channel
     
    • Like Like x 1
    • Thank You! Thank You! x 1
  7. rsbrux
    • Team MediaPortal

    rsbrux Documentation Group

    Joined:
    April 15, 2007
    Messages:
    1,022
    Likes Received:
    67
    Ratings:
    +91 / 1
    Home Country:
    Switzerland Switzerland
    Show System Specs
    Thanks for all the advice. Unfortunately, I haven't made much progress
    done
    done
    both the Intel Compute Stick and my TP-Link TL-WDR-4300 claim to support 802.11n
    • WIndows Defender is rather difficult to disable under Windows 10 Home. I disabled it through the Settings GUI, but that didn't stop the service. It can't be stopped through the Computer Management GUI. (see attached screenshots)
    • Task Manager doesn't show intensive loading of an resources during the attempts to stream TV (see attached screenshots)
    • logs attached are from attempts with SD channel. Sorry about the long TV logs, I didn't get around to collecting them right away. I think they should still contain the corresponding time frame(s).
     

    Attached Files:

  8. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Just having a quick look...

    Disabling IPv6 seems to have had the intended effect. (y)

    The log files from 13:35 show you using MS codecs, while the other 2 show LAV codecs. Were you just testing, or...???

    Okay.

    The main objective is to prevent security software from overloading the compute stick's CPU and HDD. As long as the Windows Defender service's CPU and HDD usage is low then that's fine.

    I'm not sure what the screenshots are meant to show. I mean, most of them seem to show the MP process with very low CPU usage - fine. However in one case the overall CPU usage is 39%. That is something to pay attention to... but I can't see which process(es) are responsible. Also in all cases overall network usage is 0%. I don't understand how that can be if you're streaming TV at that time.

    Are you sure? All your tests appear to be with WWZ Info, which is an HD channel. TsReader tells me the resolution is 1920x1080.
     
    • Thank You! Thank You! x 1
  9. rsbrux
    • Team MediaPortal

    rsbrux Documentation Group

    Joined:
    April 15, 2007
    Messages:
    1,022
    Likes Received:
    67
    Ratings:
    +91 / 1
    Home Country:
    Switzerland Switzerland
    Show System Specs
    Indeed, the newly attached logfiles inculde both variations. Subjectively, the MS codecs worked better, but that isn't saying much ;-}
    I looked at this again, and disabling Defender in the Settings GUI seems to prevent t from using an significant CPU. However, it is still the top process for memory usage. I guess I'll have to disable it in the registry, something I was hoping to avoid.
    This is a mystery tome as well!
    Thanks for pointing that out! Since the channel in question only broadcasts text and webcam panoramas, I naively assumed that it was SD. I have now attached logs from some attempts with an SD channel (both with MS and with LAV codecs, as mentioned above). These attempts managed to produce both sound a video for a minute or two, but the streaming quickly collapsed, with MP claiming that the connection was interrupted. MP does not handle these failures gracefully. If I wait long enough, the client will produce an error message and ask me to reconfigure the server address. At this point I can close the MP client GUI. However, the MP client process continues to run and has to be killed via Task Manager before WatchDog will collect the logs.
     
    • Like Like x 1
  10. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    Thanks for the update. :)

    The more I read, the more I think either:
    1. The compute stick is simply not powerful enough to handle TV with MP, OR...
    2. Something - such as non-optimal configuration, or another process such as Windows Defeneder - is overloading the compute stick in some way, such that the network connection drops etc.
    This is just speculation based on my "gut feeling". I hope we'll find a real answer eventually... :)

    Could you please add a screenshot of the LAV video codec settings?
    I'd like to know what hardware acceleration (DXVA) setting you're using.

    Can you configure it not to do real time scanning?
    ...or can you configure it to trust MP?
    To be clear, I'm not saying Windows Defender is the problem (or even a problem). I just recognise that if the stick's resources are overloaded then it has no hope of playing TV smoothly.

    I meant that it wasn't clear what MP was doing when you took the screenshots. So, I couldn't know if you were attempting to stream TV etc.
    Again, from my perspective the main point of using task manager is to check that the stick's resources are not overloaded while streaming TV. If you only check when MP is idle then it doesn't give a true picture of the situation.

    Hmmm. So, in general this is a slightly better result compared to the HD channel, right?

    Yeah, that's understood. :(


    Some other things that I think would be worth trying...
    • try UNC paths rather than RTSP for streaming (wiki)
    • try to copy SD and HD TV recordings to the compute stick's HDD and check if the compute stick can play them smoothly (if it can't, we might suspect the network is not the primary problem)
    • try channels/recordings with MPEG 2 video (if you have them) instead of h.264 video (if this makes a difference, we might suspect the load from decoding the video is overloading the CPU or GPU (...or maybe thermal throttling is occurring)
    • install this patch
    ...and anything relating to network security on both client and server (eg. firewalls, network security monitors etc.) is worth checking.
     
    • Like Like x 1
    • Thank You! Thank You! x 1
  11. mm1352000
    • Team MediaPortal

    mm1352000 Development Group

    Joined:
    September 1, 2008
    Messages:
    21,527
    Likes Received:
    4,738
    Ratings:
    +8,205 / 17
    Home Country:
    New Zealand New Zealand
    • Like Like x 1
    • Thank You! Thank You! x 1
Loading...

Users Viewing Thread (Users: 0, Guests: 0)

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice
  • About The Project

    The vision of the MediaPortal project is to create a free open source media centre application, which supports all advanced media centre functions, and is accessible to all Windows users.

    In reaching this goal we are working every day to make sure our software is one of the best.

             

  • Support MediaPortal!

    The team works very hard to make sure the community is running the best HTPC-software. We give away MediaPortal for free but hosting and software is not for us.

    Care to support our work with a few bucks? We'd really appreciate it!