UMS disconnects from PS4 every 20 minutes

For help and support with Universal Media Server
Forum rules
Please make sure you follow the Problem Reporting Guidelines before posting if you want a reply
Post Reply
keithmartin322
Posts: 4
Joined: Sun Jul 10, 2016 10:26 am

UMS disconnects from PS4 every 20 minutes

Post by keithmartin322 »

For months now, I have experienced the same issue that many other users have experienced. UMS disconnects from PS4 every 20 minutes like clockwork. I'm currently running UMS 6.40 and Java 8.91 on OSX 10.11.5 and Media Player 2.00 on PS4. All software was fully removed, including configuration files, and installed clean before my test. I've rolled back to older versions as far back as 6.3.0.

The test consists of playing the same file on both a PS3 and PS4 at the same time. I have never seen this disconnect happen on the PS3 side. Another thing worth mentioning is that whether media is playing or not is totally inconsequential. The disconnect happens roughly 20 minutes after the UPNPHelper discovery and the granting of access to the device.

Here's where the PS3 connects:
INFO 2016-07-09 19:27:45.623 [New I/O worker #3] No IP filter specified, access granted to /192.168.0.43
and the PS4:
INFO 2016-07-09 19:28:09.670 [UPNPHelper] No IP filter specified, access granted to /192.168.0.44
and finally the PS4 disconnect:
DEBUG 2016-07-09 19:48:17.056 [StopPlaying Event] Matched media renderer "PlayStation 4" based on address /192.168.0.44
INFO 2016-07-09 19:48:17.056 [StopPlaying Event] Stopped playing S01E03 - Bringing Up Buster.mp4 on your PlayStation 4
DEBUG 2016-07-09 19:48:17.056 [StopPlaying Event] The full filename of which is: /Volumes/23GREEN_MEDIA/TV Shows/Cancelled:Ended/Arrested Development/Season 1/S01E03 - Bringing Up Buster.mp4 and the address of the renderer is: 192.168.0.44
DEBUG 2016-07-09 19:48:17.057 [StopPlaying Event] Reading resume: false (default: true)
TRACE 2016-07-09 19:48:17.057 [StopPlaying Event] Fully Played feature logging:
TRACE 2016-07-09 19:48:17.057 [StopPlaying Event] duration: 1278.0
TRACE 2016-07-09 19:48:17.057 [StopPlaying Event] getLastStartPosition: 0.0
TRACE 2016-07-09 19:48:17.057 [StopPlaying Event] getStartTime: 1468107002650
TRACE 2016-07-09 19:48:17.057 [StopPlaying Event] getLastStartSystemTime: 1.468107003013E12
TRACE 2016-07-09 19:48:17.057 [StopPlaying Event] elapsed: 1094.0
TRACE 2016-07-09 19:48:17.057 [StopPlaying Event] minimum play time needed: 1175.76
TRACE 2016-07-09 19:48:17.057 [StopPlaying Event] final decision: not fully played
Looking at the logs, it looks like the PS3 checks in with the server far more often than the PS4 once the media has started playing. This sequence repeats if you follow it through the logs:
TRACE 2016-07-09 19:34:15.777 [New I/O worker #12] Opened request handler on socket /192.168.0.43:58248
TRACE 2016-07-09 19:34:15.778 [New I/O worker #12] Request: HTTP/1.1 : GET : description/fetch
DEBUG 2016-07-09 19:34:15.778 [New I/O worker #12] Matched media renderer "PlayStation 3" based on address /192.168.0.43
TRACE 2016-07-09 19:34:15.778 [New I/O worker #12] Received on socket: Host: 192.168.0.11:5001
TRACE 2016-07-09 19:34:15.778 [New I/O worker #12] Received on socket: Date: Sat, 09 Jul 2016 23:34:15 GMT
TRACE 2016-07-09 19:34:15.778 [New I/O worker #12] Received on socket: User-Agent: UPnP/1.0
TRACE 2016-07-09 19:34:15.778 [New I/O worker #12] Received on socket: X-AV-Client-Info: av=5.0; cn="Sony Computer Entertainment Inc."; mn="PLAYSTATION 3"; mv="1.0";
TRACE 2016-07-09 19:34:15.778 [New I/O worker #12] HTTP User-Agent: UPnP/1.0
TRACE 2016-07-09 19:34:15.778 [New I/O worker #12] Recognized media renderer: PlayStation 3
TRACE 2016-07-09 19:34:15.778 [New I/O worker #12] HTTP: description/fetch / 0-0
TRACE 2016-07-09 19:34:15.779 [New I/O worker #12] Sent to socket: Content-Type: text/xml; charset="utf-8"
TRACE 2016-07-09 19:34:15.780 [New I/O worker #12] Sent to socket: Cache-Control: no-cache
TRACE 2016-07-09 19:34:15.780 [New I/O worker #12] Sent to socket: Expires: 0
TRACE 2016-07-09 19:34:15.780 [New I/O worker #12] Sent to socket: Accept-Ranges: bytes
TRACE 2016-07-09 19:34:15.780 [New I/O worker #12] Sent to socket: Connection: keep-alive
TRACE 2016-07-09 19:34:15.780 [New I/O worker #12] Sent to socket: Server: Mac_OS_X-x86_64-10.11.5, UPnP/1.0, UMS/6.4.0
TRACE 2016-07-09 19:34:15.780 [New I/O worker #12] Sent to socket: Content-Length: 2942
It appears that the PS4 on the other hand doesn't send a status update like this once the media has begun playing. The final instance of this checkin happens when Cling reports that the media transport state has switched to "PLAYING."
TRACE 2016-07-09 19:30:03.012 [New I/O worker #14] Opened request handler on socket /192.168.0.44:59906
TRACE 2016-07-09 19:30:03.012 [New I/O worker #14] Request: HTTP/1.1 : GET : get/105/S01E03+-+Bringing+Up+Buster.mp4
DEBUG 2016-07-09 19:30:03.012 [New I/O worker #14] Matched media renderer "PlayStation 4" based on address /192.168.0.44
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] Received on socket: Host: 192.168.0.11:5001
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] Received on socket: User-Agent: MediaPlayer/2.00 libhttp/3.55 (PlayStation 4)
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] Received on socket: Connection: Keep-Alive
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] HTTP User-Agent: MediaPlayer/2.00 libhttp/3.55 (PlayStation 4)
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] Recognized media renderer: PlayStation 4
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] HTTP: get/105/S01E03+-+Bringing+Up+Buster.mp4 / 0-0
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] Asked stream chunk : TimeRange [start=null, end=null] of S01E03 - Bringing Up Buster.mp4 and player null
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] Setting lastStartPosition from time-seeking: 0.0
TRACE 2016-07-09 19:30:03.013 [New I/O worker #14] Did not send subtitle headers because dlna.getMedia returned null or configuration.isDisableSubtitles was true
TRACE 2016-07-09 19:30:03.014 [New I/O worker #14] Sent to socket: Content-Type: video/mp4
TRACE 2016-07-09 19:30:03.014 [New I/O worker #14] Sent to socket: Accept-Ranges: bytes
TRACE 2016-07-09 19:30:03.014 [New I/O worker #14] Sent to socket: Connection: keep-alive
TRACE 2016-07-09 19:30:03.014 [New I/O worker #14] Sent to socket: Server: Mac_OS_X-x86_64-10.11.5, UPnP/1.0, UMS/6.4.0
TRACE 2016-07-09 19:30:03.014 [New I/O worker #14] Sent to socket: Content-Length: 178097010
The next entry related to PS4 doesn't come until the moment of the disconnect. Not sure if I'm totally off base here.

Next, I let the system sit idle for 20 minutes with no media playing and lo and behold, the PS4 disconnected again.

Here's it's initial check in:
TRACE 2016-07-09 20:46:27.068 [New I/O worker #10] Opened request handler on socket /192.168.0.44:64410
TRACE 2016-07-09 20:46:27.068 [New I/O worker #10] Request: HTTP/1.1 : GET : description/fetch
DEBUG 2016-07-09 20:46:27.068 [New I/O worker #10] Matched media renderer "PlayStation 4" based on address /192.168.0.44
TRACE 2016-07-09 20:46:27.068 [New I/O worker #10] Received on socket: Host: 192.168.0.11:5001
TRACE 2016-07-09 20:46:27.068 [New I/O worker #10] Received on socket: Date: Sun, 10 Jul 2016 00:46:26 GMT
TRACE 2016-07-09 20:46:27.068 [New I/O worker #10] Received on socket: User-Agent: MediaPlayer/2.00 UPnP/1.0 DLNADOC/1.50 (PlayStation 4)
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] HTTP User-Agent: MediaPlayer/2.00 UPnP/1.0 DLNADOC/1.50 (PlayStation 4)
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] Recognized media renderer: PlayStation 4
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] HTTP: description/fetch / 0-0
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] Sent to socket: Content-Type: text/xml; charset="utf-8"
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] Sent to socket: Cache-Control: no-cache
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] Sent to socket: Expires: 0
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] Sent to socket: Accept-Ranges: bytes
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] Sent to socket: Connection: keep-alive
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] Sent to socket: Server: Mac_OS_X-x86_64-10.11.5, UPnP/1.0, UMS/6.4.0
TRACE 2016-07-09 20:46:27.069 [New I/O worker #10] Sent to socket: Content-Length: 2942
TRACE 2016-07-09 20:46:27.219 [New I/O worker #11] Opened request handler on socket /192.168.0.44:59937
TRACE 2016-07-09 20:46:27.220 [New I/O worker #11] Request: HTTP/1.1 : GET : images/icon-256.png
DEBUG 2016-07-09 20:46:27.220 [New I/O worker #11] Matched media renderer "PlayStation 4" based on address /192.168.0.44
TRACE 2016-07-09 20:46:27.220 [New I/O worker #11] Received on socket: Host: 192.168.0.11:5001
TRACE 2016-07-09 20:46:27.220 [New I/O worker #11] Received on socket: User-Agent: MediaPlayer/2.00 libhttp/3.55 (PlayStation 4)
TRACE 2016-07-09 20:46:27.220 [New I/O worker #11] Received on socket: Connection: Keep-Alive
TRACE 2016-07-09 20:46:27.220 [New I/O worker #11] HTTP User-Agent: MediaPlayer/2.00 libhttp/3.55 (PlayStation 4)
TRACE 2016-07-09 20:46:27.220 [New I/O worker #11] Recognized media renderer: PlayStation 4
TRACE 2016-07-09 20:46:27.220 [New I/O worker #11] HTTP: images/icon-256.png / 0-0
TRACE 2016-07-09 20:46:27.221 [New I/O worker #11] Available Content-Length: 26681
TRACE 2016-07-09 20:46:27.221 [New I/O worker #11] Sent to socket: Content-Type: image/png
TRACE 2016-07-09 20:46:27.221 [New I/O worker #11] Sent to socket: Accept-Ranges: bytes
TRACE 2016-07-09 20:46:27.221 [New I/O worker #11] Sent to socket: Connection: keep-alive
TRACE 2016-07-09 20:46:27.221 [New I/O worker #11] Sent to socket: Expires: Wed, 02 Nov 2016 18:33:07 GMT
TRACE 2016-07-09 20:46:27.221 [New I/O worker #11] Sent to socket: Server: Mac_OS_X-x86_64-10.11.5, UPnP/1.0, UMS/6.4.0
TRACE 2016-07-09 20:46:27.221 [New I/O worker #11] Sent to socket: Content-Length: 26681
and then exactly 20 minutes later....nothing. With no media playing, it just sort of vanishes without a trace from the logs.

My next course of action is to roll back to 5.5.0 and see whether or not I can reproduce there and then work my way back up.
Attachments
ums_dbg_idle.zip
(82.44 KiB) Downloaded 438 times
ums_dbg.zip
(72.13 KiB) Downloaded 435 times
keithmartin322
Posts: 4
Joined: Sun Jul 10, 2016 10:26 am

Re: UMS disconnects from PS4 every 20 minutes

Post by keithmartin322 »

Same result as far back as 6.0.0. Media would not play on PS4 with version 5.5.0. There's something else at play here since this worked properly at one point, though I cannot pin down exactly what change triggered the issue.
keithmartin322
Posts: 4
Joined: Sun Jul 10, 2016 10:26 am

Re: UMS disconnects from PS4 every 20 minutes

Post by keithmartin322 »

By removing the line

Code: Select all

<string>-Djava.net.preferIPv4Stack=true</string>
or changing it to

Code: Select all

<string>-Djava.net.preferIPv4Stack=false</string>
from info.plist within the OSX UMS application package, it now forces Java to lookup devices with ipv6 instead of ipv4 and the disconnects have stopped. Not sure what else breaks with this change in play.

It's worth saying for anyone that goes this route, the issue will come back if you ever update to a different UMS version. This would need to be removed/changed from true to false after every installation.
User avatar
SubJunk
Lead Developer
Posts: 3714
Joined: Sun May 27, 2012 4:12 pm

Re: UMS disconnects from PS4 every 20 minutes

Post by SubJunk »

keithmartin322 wrote:Same result as far back as 6.0.0. Media would not play on PS4 with version 5.5.0. There's something else at play here since this worked properly at one point, though I cannot pin down exactly what change triggered the issue.
Two things changed around the same time, which was the PS4 media player update, and a Java 8 update. We have had several people report that uninstalling and installing Java (the same version as they uninstalled) fixes it too.

Soon we will have a 7.0.0 pre-release build which at the moment has the preferIPv4Stack option removed, as well as a major upgrade to our dependency Netty, so hopefully we get some testers for that
erick diangilis
Posts: 161
Joined: Sun May 22, 2016 8:25 am

Re: UMS disconnects from PS4 every 20 minutes

Post by erick diangilis »

hey there is an update 8.92 for the java wich is a patch for the 8.91 on the oracle website here's the link http://www.oracle.com/technetwork/java/ ... 33155.html. all you have to do is accept the license agrément and choose the correct 8.92 update for your operation system.
the only versions of the ums that i had some problems were the 6.3.1 and the 6.3.1.1 the rest after this is working fine with no disconnection at all.
my ps4 is wired connected directly to the modem wich is also a wifi router tp link, my Windows is the 10 64bits, i'm using java 8.112b02 jdk early access and the java 9 also jdk update 126 early access, the ps4 is with media player 2.00 and i'm using the ums 6.4.1 snapshot that subjunk provided on another topic to help a guy name fliedel.
i set the ps4 to dynamic ip adress, the mtu i set up manually provided from my internet service, the dns options i set up manually too, no proxy option activated, and rest is automatic.


i hope this informations can help you somehow have a nice day. ;)
Post Reply