Client Connection Problems (1 Viewer)

rsbrux

Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,029
    93
    Switzerland Switzerland
    Country flag
    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!
     

    Attachments

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    How can I get the Server (presumably DB) connection to work again?
    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.

    How can I get the connection to be more reliable
    I guess try to find out how the client's gentle.config got corrupted, and then don't let it happen again.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    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.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,029
    93
    Switzerland Switzerland
    Country flag
    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?
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    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.

    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.
    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
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,029
    93
    Switzerland Switzerland
    Country flag
    Thanks for all the advice. Unfortunately, I haven't made much progress
    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
    done
    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.
    done
    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?
    both the Intel Compute Stick and my TP-Link TL-WDR-4300 claim to support 802.11n
    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
    • 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).
     

    Attachments

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    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...???

    both the Intel Compute Stick and my TP-Link TL-WDR-4300 claim to support 802.11n
    Okay.

    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)
    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.

    Task Manager doesn't show intensive loading of an resources during the attempts to stream TV (see attached screenshots)
    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.

    logs attached are from attempts with SD channel.
    Are you sure? All your tests appear to be with WWZ Info, which is an HD channel. TsReader tells me the resolution is 1920x1080.
     

    rsbrux

    Documentation Group
  • Team MediaPortal
  • April 15, 2007
    1,029
    93
    Switzerland Switzerland
    Country flag
    The log files from 13:35 show you using MS codecs, while the other 2 show LAV codecs. Were you just testing, or...???
    Indeed, the newly attached logfiles inculde both variations. Subjectively, the MS codecs worked better, but that isn't saying much ;-}
    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 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.
    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.
    This is a mystery tome as well!
    Are you sure? All your tests appear to be with WWZ Info, which is an HD channel. TsReader tells me the resolution is 1920x1080.
    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.
     

    mm1352000

    Development Group
  • Team MediaPortal
  • September 1, 2008
    21,571
    8,218
    New Zealand New Zealand
    Country flag
    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... :)

    Subjectively, the MS codecs worked better, but that isn't saying much ;-}
    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.

    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.
    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.

    This is a mystery tome as well!
    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.

    These attempts managed to produce both sound a video for a minute or two, but the streaming quickly collapsed...
    Hmmm. So, in general this is a slightly better result compared to the HD channel, right?

    MP does not handle these failures gracefully.
    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.
     

    Users Who Are Viewing This Thread (Users: 0, Guests: 1)

    OP Similar threads Forum Replies Date
    B [solved] Client server connection not working with new install General 2
    ge2301 [WiP] MP2Web - A platform independent web client for MP2 MediaPortal 2 56
    M WTV Files does not play on client, MPEG files works well General 0
    ge2301 Android based client for MP2 MediaPortal 2 3
    T Client / Server slow channel-to-channel change (zapping) General Support 1
    horned_reaper Standby is prevented by MediaPortal client General Support 0
    P [solved] MP2 new install, 2 x hdhomerun tuners, client on same PC unable to view TV & recordings Newcomers Forum 8
    J Where the heck is the Client side setup? General 2
    T Server / client channel logo location Installation, configuration support 6
    framug [solved] Some changes/fix in MP1 configuration client and server Submit: code patches (MediaPortal/TV-Server/etc.) 14
    C Streaming to clients over Wifi. MP1 or MP2? Newcomers Forum 0
    Golf4 Client verliert immer wieder die Verbindung Allgemeines Support- und Diskussionsforum 4
    A Synchronizing client databases MediaPortal 1 Talk 10
    P Streaming to two clients from the same card Newcomers Forum 1
    TLD Can not watch tv from remote clients Television (MyTV frontend and TV-Server) 19
    R [further infos missing] some movies freezing evry seconds Submit: Bug Reports 9
    R [solved] MP2 Client ist extrem langsam Allgemeines Support- und Diskussionsforum 5
    I MP Server goes into suspend, because it doesn't detect the MP Client General Support 6
    A Client/Server Setup: Slow TV Startup Television (MyTV frontend and TV-Server) 0
    P MP2 Client Screen Flickering on Resume General 2
    J Server vs Client Install General 5
    Golf4 Client-Konfig clonen ? Allgemeines Support- und Diskussionsforum 2
    A Working server, no video playback on client General 5
    K MpTvClient: Client for Amazon and Android devices General 2
    Testudo TV Wiedergabe funktioniert nicht Allgemeines Support- und Diskussionsforum 1
    Similar threads

























    Top Bottom