Android connection issues

Seems my last post on spotty android connections was never noticed and automatically closed. Issues have gotten worse now. Am on latest version of Plex server (Ubuntu) and android (pixel 2xl) and am now unable to connect on 4g, and only intermittently on WiFi. A few months ago, I went through a full reinstall on Ubuntu but that just left me with an empty library needing rebuilding and still having connection issues.

It’s left me wondering if the only real benefit of the lifetime Plex pass is to pay for serving myself a constant stream of ads for Tidal subscription.

Have tried reinstalling the android app but still cannot access my music library over 4g. I have no connection issues with any other service/application

If your connection is intermittent even on WiFi, then you may have an issue on your server end. Please provide logs from both the Android app and PMS. Let me know approximately what time the issues occurred.

Hi, appreciate the response.

Have attached logs from android client and ubuntu server from a few minutes ago.

Today I cleared all data from android. At time of logs, when wifi was switched on, I can access music library, when wifi is off, music library is “not found”.

I can access the music library from web client on Chrome/Windows and from Windows Desktop client without issue.

Of course, just as I’m writing this, the music library has started working over 4G with wifi off, but this has happened intermittently over the past few weeks. I’ve attached a second set of logs from when music library loaded on android from just now.

Let me know if there’s anything else you need.

Thanks,
Beirti

plex-log-android-musiclibworkigon4g.zip (140.3 KB)

plex-log-android-musiclibnotworkingon4g.zip (135.7 KB) Plex Media Server Logs_2019-06-25_23-34-15.zip (9.3 MB)

Should have also said, I can access the box over wifi from other wifi networks, not just the same network as the server is on. Logs from previous post are from server network

I thought it was working when using WiFi.

Badly worded, apologies. What I meant to say was:

The server music library is ‘generally’ accessible from the android app when I have a wifi connection on my phone, regardless of what network I am connected to over wifi. There are times when the music library is completely inaccessible from the android app over wifi, but I can’t pin it down to specific circumstances

Up until I gathered the logs this evening, I have not been able to access my library from the android app using a 4G connection for the past few weeks

I’m not seeing anything that jumps out at me in your log. Can you try something. while connected via WiFi, start playing an album with more than 1 song. Any album. While the first song is playing, turn off your WiFi and switch to 4G. See if the rest of the song plays and then if the next song plays. They should as these should get cached. Wait to see what happens with the 3rd song. if your 4G isn’t working, then it should fail to play. Get me the log from the app when this happens.

Also, have you tried accessing your server using your mobile browser and Plex Web? This will help identify if it is something with the app or your connection.

Will get logs later on. Have confirmed I can access the server using my mobile browser but not via Plex app when on 4G this morning.

Sorry for the delay in responding. When playing via a WiFi connection and then switching off WiFi as suggested above, tracks keep playing without issue. The issue seems to be on making the initial connection over 4g. It’s still an intermittent issue though as it’s been working 90% of the time today.

I just did a speed test from my phone and get 20mb down, 6mb up with 17ms latency over 4g. My home internet connection has 100mb down and 6-8mb up with 10ms latency. Could it be possible that intermittent high latency over 4g is affecting the Plex app?

There’s always been an issue with the Plex android application not recognising that there is no data connection available, e.g. when underground, and it keeps attempting to connect until you manually disable WiFi and data on the phone. Possibly related?

Very possible, considering it was mostly working for you recently.

This could be related if you have a bad 4g connection. The app will use a secured connection to your server, if you have a bad connection, then that secured connection cannot be made or the data gets corrupted along the way so the results are not trusted and used. One thing you can try is to make sure your server uses the “preferred” security setting, then in your app allow insecure connections.

I’ve done some more debugging, while the issue isn’t permanently fixed, I wanted to post the information for devs or any other users getting this issue.

I set up Plex media server on my Windows PC (Core i7 32g) which is significantly more powerful than my HTPC.

Some more observations

  • I get the same intermittent connection issues to both the Linux HTPC and the Windows Desktop
  • No other phone applications or speed tests are showing significant latency at any time when I’ve been unable to connect to my plex server over 4G
  • I enabled explicit port forwarding from the Google Wifi router to both the server and PC over different ports. This had no effect. Still intermittent connections with the same log line showing for both servers:
07-13 21:45:59.340  i: [conn] Device Chrome response time is Infinity ms
07-13 21:45:59.340  i: [conn] Connection FAILURE Chrome ~ Connection: https://192-168-86-93.f9722d38c69345caab0c02c8f94ef043.plex.direct:32400 token used: true types: [myplex] state: Unreachable
07-13 21:45:59.341  i: Time out fetching https://192.168.86.62:32400/resources?X-Plex-Token=...U4Yx.
07-13 21:45:59.341  i: [conn] Device Chrome response time is Infinity ms
07-13 21:45:59.342  i: [conn] Connection FAILURE Chrome ~ Connection: https://192-168-86-62.cc918c183441457ba9c03c8027b26b0c.plex.direct:32400 token used: true types: [myplex] state: Unreachable
  • I noticed in the debugging logs that the phone is attempting to connect over HTTPS even though the PLEX server does not have a valid SSL certificate. From painful experience in my day-day job, I have seen invalid/missing certificates for HTTPS cause delays with Java applications making SSL connections
07-13 21:50:39.171  e: [ServerWebSocket] Websocket error
07-13 21:50:39.171  e: An exception occurred: javax.net.ssl.SSLException: Read error: ssl=0x7567ff3508: I/O error during system call, Software caused connection abort
07-13 21:50:39.177  e: Stacktrace: javax.net.ssl.SSLException: Read error: ssl=0x7567ff3508: I/O error during system call, Software caused connection abort
	at com.android.org.conscrypt.NativeCrypto.SSL_read(Native Method)
	at com.android.org.conscrypt.NativeSsl.read(NativeSsl.java:399)
	at com.android.org.conscrypt.ConscryptFileDescriptorSocket$SSLInputStream.read(ConscryptFileDescriptorSocket.java:546)
	at okio.n$2.read(SourceFile:139)
	at okio.a$2.read(SourceFile:237)
	at okio.s.b(SourceFile:67)
	at okio.s.a(SourceFile:60)
	at okio.s.i(SourceFile:73)
	at com.squareup.okhttp.internal.c.c.b(SourceFile:110)
	at com.squareup.okhttp.internal.c.c.a(SourceFile:99)
	at com.squareup.okhttp.internal.c.a.a(SourceFile:97)
	at com.squareup.okhttp.a.b.a(SourceFile:169)
	at com.squareup.okhttp.a.b.a(SourceFile:42)
	at com.squareup.okhttp.a.b$1.a(SourceFile:100)
	at com.squareup.okhttp.k.e(SourceFile:168)
	at com.squareup.okhttp.internal.i.run(SourceFile:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:764)

07-13 21:51:00.164  e: [ServerWebSocket] Websocket error
07-13 21:51:00.173  e: An exception occurred: java.net.SocketTimeoutException: failed to connect to 139-162-194-175.f9722d38c69345caab0c02c8f94ef043.plex.direct/139.162.194.175 (port 8443) from /192.0.0.4 (port 43552) after 5000ms
07-13 21:51:00.187  e: Stacktrace: java.net.SocketTimeoutException: failed to connect to 139-162-194-175.f9722d38c69345caab0c02c8f94ef043.plex.direct/139.162.194.175 (port 8443) from /192.0.0.4 (port 43552) after 5000ms
	at libcore.io.IoBridge.connectErrno(IoBridge.java:185)
	at libcore.io.IoBridge.connect(IoBridge.java:129)
	at java.net.PlainSocketImpl.socketConnect(PlainSocketImpl.java:137)
	at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:390)
	at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:230)
	at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:212)
	at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:436)
	at java.net.Socket.connect(Socket.java:621)
	at com.squareup.okhttp.internal.l.a(SourceFile:197)
	at com.squareup.okhttp.p.a(SourceFile:198)
	at com.squareup.okhttp.p.a(SourceFile:172)
	at com.squareup.okhttp.p.a(SourceFile:358)
	at com.squareup.okhttp.ae$1.a(SourceFile:117)
	at com.squareup.okhttp.internal.http.o.l(SourceFile:329)
	at com.squareup.okhttp.internal.http.o.a(SourceFile:246)
	at com.squareup.okhttp.i.a(SourceFile:276)
	at com.squareup.okhttp.j.a(SourceFile:234)
	at com.squareup.okhttp.i.a(SourceFile:196)
	at com.squareup.okhttp.i.a(SourceFile:34)
	at com.squareup.okhttp.k.e(SourceFile:162)
	at com.squareup.okhttp.internal.i.run(SourceFile:33)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
	at java.lang.Thread.run(Thread.java:764)
  • I noticed that the server status webpage intermittently says that it is unavailable from outside the network but then it flicks to being available. I can’t tell if this is a delay in the web page processing or an actual issue.
  • To mitigate more network slowness, I switched my Virgin Media router in to modem mode to allow Google WiFi to handle the NAT’ing. If I then force stop the android application and restart it (while on 4G connection), it starts by telling me that the server is unavailable, but then if I click ‘retry’ it connects within 10 seconds.

So, I don’t know if the issue has gone away yet by switching the router in to modem mode, but there are a few posts about ‘double NATing’ which suggested this may be a known issue. It’s just very strange that the issue never occurs when the client device has a WiFi connection. I still

I think I’ve discovered something. The debug logs from the android app show a timeout connecting to the ‘plex.direct’ url: https://192-168-86-62.cc918c183441457ba9c03c8027b26b0c.plex.direct:32400

I can access this url from my desktop computer but when I try to load it in my android chrome web browser it does not load at all on 4G, but loads immediately if I connect to WiFi. I’ll investigate my DNS settings for my mobile provider to see if there’s something going on there.

Just got off the phone with EE UK Customer support.

“I’m unable to access this specific URL”
“We do not support any third party applications”
“So you don’t support any websites?”
“We support apple music”

For the benefit of anyone else stuck on this mobile network, the workaround I’ve put in place is to use no-ip.com to map my home’s dynamic IP to a static URL. If I use that as a direct connection in the Plex app, it seems to work straight away

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.