Plex server not found via Plex client

SearchEngine27

Dabbler
Joined
Jan 5, 2019
Messages
24
I've tried following https://forums.freenas.org/index.ph...to-install-plex-in-a-freenas-11-0-jail.19412/, but the tutorial is extremely basic, and doesn't explain anything in the tone of "just do this, don't worry about what the command means", to the extent that the tutorial is clearly outdated (some options are missing such as 'VIMAGE: Checked (default)', and since there is zero explanation of what the option does, I have no idea where or what to look for in terms of setting equivalent options - or even if I need to at all in the first place) and on top of that, I'm unable to see my server via my client.

To be clear, I can type into a web browser on my LAN 192.168.X.X:32400/web (where 192.168.X.X is where the address of the server is bound to) and indeed the Plex client comes up, which means there is absolutely no problem with the Jail or the network configuration - the server has served up the client. The issue is that after the server serves the client, the client which ironically came from the server is unable to locate the server.

In the top left of the client page all I see is a spinning wheel with "Looking for servers".

From what I've been able to gather from a morning of googling, is that the server needs to be logged into the account. According to the Plex support area (https://support.plex.tv/articles/200878643-sign-in-to-your-plex-account/):
If you aren’t yet signed into your Server, you’ll usually need to first access it locally via http://localhost:32400/web or http://127.0.0.1:32400/web on the Server’s computer.
which brings me to my next question. FreeNAS is based on a GUI-less BSD. YES, I absolutely can install an X server (or equivalent) along with a web browser, SSH in and transfer the X session to bring up a web browser from within the jail...but why would I do that? That seems extremely pointless for something you should be able to do on a server, since most servers in the world never have GUIs. It seems bizarre to me that a GUI is required in a non-GUI-dominated environment. So how is everyone else logging their Plex server into their account?

I was able to find https://github.com/Arcanemagus/plex-api/wiki/Plex.tv, which doesn't appear to be official, but it does appear to hint at a CRUD API - which is a start in the right direction. I see that there is https://plex.tv/users/sign_in.(xml|json) which seems to be exactly what I'm looking for, but this unofficial documentation doesn't provide any parameters along with it, so I have no idea what the server is looking for. My next stop after posting this is to just attempt to brute force the API until I can magically guess the right parameter combination, but it would be helpful if someone else knew the parameters.

Or for that matter, any other command-line based way to log the server into my Plex account.

As a disclaimer (and I don't think it matters but I'm not 100 percent sure, so might be worth mentioning), I have no purchased Plex yet; I'm using a free Plex account. I want to ensure that Plex works before I just start throwing money at them. I assume a free account should be able to see a server, which is why I don't think this matters - it seems silly that activating a server would be behind a paywall - but stranger things have happened.
Also, there is a lot of talk about "click on the wrench and screwdriver on the plex client and you should see servers", but there are no options under that for my Plex client, and clicking it only brings you directly to a client options page. This is what led me down a google path that told me that the server had to be logged into my account first.
 

SearchEngine27

Dabbler
Joined
Jan 5, 2019
Messages
24
OK I'm seriously at a loss. I found this https://forums.plex.tv/t/freebsd-jail-plex-looking-for-servers/201102/16, where a guy just says
add allowedNetworks=“172.16.0.0/28,192.168.10.0/26”
which in and of itself isn't really helpful at all. My document had no such element or attribute (to the sole existing element in the document) with such a name, so I assumed he meant add it to the "Preferences" element of the XML. So based on my local network I added it to the XML document's Preferences element as "allowedNetworks=“192.168.1.0/24".

Then I restarted my Plex server via 'service plexmediaserver restart', and pointed my web browser on a separate machine on my LAN to 192.168.1.X:32400/web and there was my server finally.

I have absolutely no idea what just happened or why it just started working. Does anyone have any explanation into how Plex works, to tell me if that was something that helped? I guess it needs something in there to tell it what addresses it needs to be accessible from, but it just seems confusing to be so hidden and tucked away.
 

DrKK

FreeNAS Generalissimo
Joined
Oct 15, 2013
Messages
3,630
Right, so, a Plex server does not normally allow someone WHO IS UNAUTHENTICATED to access it directly by IP, *unless* they are part of the "allowedNetworks" subnet. In the Plex GUI, if you are authenticated, you can find under settings->network a place to enter "List of IP addresses and networks that are allowed without auth", where most people have 192.168.1.0/24 in there, or similar. I believe you did the same thing with your manual hack of the XML file.

Now, as time goes on, Plex has become more and more and more hard core, nearly impossible to run LAN-only without WAN authentication back to Plex, etc., and they have various reasons for that. This has, in my estimation, resulted in an uptick of problems like the one you were having.

Anyway, I hope this is what you were talking about, and that this is helpful.
 
Top