Plex connection dies after 20 mins without fail

tommoose13

Cadet
Joined
Oct 16, 2015
Messages
8
I was having issues with the plex media server plugin service dying after 20 minutes of runtime, so I created a new jail running 12.3 with default settings and manually installed PMS. On the plugin version the service in the jail would stop and throw errors if I tried to restart the service itself, the only way to restart it was to restart the plugin/jail. With the manual install (v1.24.1.4931), the service does not stop when the server becomes unreachable, but the only way to get it working again is to restart the jail, stopping/starting the process in the jail shell provides proper command outputs but does not resolve the issue.

I've looked at several other threads with similar issues, but there's either an error or another condition I'm missing in my instance (I do have swap partitions and they're 0% utilized, no errors in dmesg, plex logs don't indicate anything is wrong.) When plex dies (always at ~20mins after jail starts) the service is running and the processes are visible in top, but any media playback is halted, app.plex.tv says unable to connect securely to the server, and the management interface (ip.addr:32400) returns "address unreachable." As soon as the jail is restarted I get another 20mins of perfect functionality.

I was able to ping the jail, then I attempted to assign the jail to a 2nd nic to eliminate VNET/BPF, which didn't work, and now after putting the settings back to VNET/BPF I am not able to ping the jail, but the symptoms are the same otherwise.

Why does it work for 20 mins then refuse connections with no errors? Any ideas where I should start looking? Resetting a jail four times in a movie is not exactly a useable viewing experience. :frown:
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
This smells like an IP conflict.
 

tommoose13

Cadet
Joined
Oct 16, 2015
Messages
8
Thanks for the suggestion, I hadn't thought to check that. I poured through my router's leased IP list and can confirm there are no duplicates. I tried to change the IP address of the jail to a different unused address just to test, and it refuses to load the plex web management interface; as soon as I put it back (in this case to 10.0.0.139) it works again.

I attempted to access the plex server (while it was working on my MacBook) from my windows laptop, and it was unable to reach the server from either 10.0.0.139:32400 or app.plex.tv, so I'm down to one device that can access from only one ip address? o_O

I may try to hook up server/clients to a completely isolated router to see if it is something with my network config outside of truenas.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How long are your DHCP leases? If Plex renews and gets a different IP, this could also result in what you're seeing. Is it possible to hardcode the IP handed out to Plex?
 

tommoose13

Cadet
Joined
Oct 16, 2015
Messages
8
Heh, this is yet another reason why I dislike the ISP-included modem-router, what the lease time is I can't see. I can reserve an IP for a mac address, which I did when testing an alternate static IP, but no dice there. The network topology is a hot mess with that as my main router, it's something I've been wanting to fix but lower on the priority list since most things work as intended.

After remembering to change the default routes in truenas and the jail, I got it working in it's own isolated environment on a router I have sitting around for a project (plex app server detection issues aside, access via IP:port mgmt interface is working on both machines, testing long-play now.)
 

tommoose13

Cadet
Joined
Oct 16, 2015
Messages
8
Well, you certainly have a good nose! Seems to be working now in isolation, all that's left is to untangle my plex account and get it to sync properly with the server. Thank you for sending me in the right direction! :grin:
 
Top