plex doesn't work

itskando

Contributor
Joined
Apr 30, 2018
Messages
172

AirborneTrooper

Contributor
Joined
Jun 20, 2014
Messages
148
Definitely! I figured out most of it between google and scouring this and plex forums. Unfortunately, nobody at Plex was willing to help until after I figured it out and 2 days later.
 

itskando

Contributor
Joined
Apr 30, 2018
Messages
172
Definitely! I figured out most of it between google and scouring this and plex forums. Unfortunately, nobody at Plex was willing to help until after I figured it out and 2 days later.

Don't feel bad. Look at the thread you posted to; if I recall: nobody at Plex ever responded to me until you ; j
I owe these great folks everything ~
 

gribbler

Dabbler
Joined
Dec 5, 2013
Messages
22
I had created a new plugin install for plexpass and ended up needing to make the changes to the interface to use vnet.

@itskando - your line
“vnet0|192.168.86.10/24"

has different type quotations around it
it starts with a “ and should be a " - they look quite similar
 

itskando

Contributor
Joined
Apr 30, 2018
Messages
172

itskando

Contributor
Joined
Apr 30, 2018
Messages
172
I'm trying to get Plex to work properly and my situation seems to be similar to what you described in this thread.

Plex doesn't find metadata.
Transcoding doesn't work.

I tried going to Jails->Edit and add:

IPv4 Default route: <Set to the IP of my router>
VNET: on
Berkelet Packet Filter: on
auto-start: on (I think this corresponds to "boot: on")

But after doing so I can't access plex at all. That is, when entering the Plex IP in my web browser it just hangs there and nothing happens.

I was wondering if this could be some router setting that needs to be set, now that I have "included it" by giving its IP to the Plex jail.

The only thing I have done in the router is to change the DHCP setting so that its range is outside the IP range I'm planning to use for the NAS. DHCP starts at 192.168.0.100, while the Plex jail has the IP 192.168.0.52. The NAS has a static IP in the router, but I have not "told" the router in any way about the Plex jail's IP. Do I need to do this? I'm not sure how I would go about it since the jail doesn't have a MAC address? (or?)

I'm just throwing questions at you now, but anything you know is greatly appreciated!

I will add anything I learn to the thread you made, it seems odd to me that the Plex plugin doesn't have some official "these things you absolutely have to do to make it work"-list!

.
.
.

For me:
Code:
Router (IPv4 Default Route) IP: 192.168.86.001
Router DHCP-Reserved IPs:       192.168.86.021 - 192.168.86.200
IPMI IP:                        192.168.86.002
freeNAS OS IP:                  192.168.86.003 (If you )
Plex Jail IP:                   192.168.86.010


Go to freeNAS OS client (by typing its IP into your web browser),
login, and go to the Shell tab in the side bar.
In the command line interface (CLI), type iocage get all <plexJailName>,
where <plexJailName> is the name of your Plex jail.

Please go to Posts #11 and #12 in this thread to check out my jail parameters.
(Note that after the jail parameters were posted, some had to change.)

You can copy and paste my jail parameters and your jail parameters into
the left and right panes of this site to compare them.

I do not believe that Berkeley Packet Filter should be set to on, as discussed here.
 
Last edited:

Obi-Wan

Dabbler
Joined
Dec 28, 2018
Messages
17
Thank you!

My IP table looks pretty much like yours except I'm missing an entry for the Plex jail.

I had some progress on my end. First i tried using DHCP, which worked! The plex jail was assigned an IP by the router and transcoding worked.

I still wanted to use a static IP however, and realized that I had simply forgotten to pick vnet0 in the drop-down menu in the FreeNAS GUI. Doing this allowed me to access Plex normally after setting my router IP as the Default Router. I suppose this is the same as the vnet0 part of this line:

Code:
iocage set ip4_addr="vnet0|172.16.1.250/24"


Transcoding now works with a static IP as well!

Before I started writing this list metadata didn't work. As I've written in point 2 below however, I was able to fix it, so now everything seems to work perfectly fine! I still wonder about the IP reservation of the jail in my router as noted in 1), but It can't really be that important now that everything works!
  1. The Plex jail is not visible in the DHCP Client List of my router (a TP-Link Archer C7 AC1750)
    • Not sure if it has be, or if I have to reserve an IP on the router side if I know it is well outside the DHCP range.
    • Which MAC-address do I use in any case? There is an auto-generated double MAC-address given for the vnet0 interface in the jail, but I don't understand how that address can be visible to the router.
  2. I still don't get metadata
    • I have a hunch here that I might have messed up some permissions, I need to look at this.
    • While I was writing this I was able to fix it by moving all the files one directory level up.
    • I suppose it this note from this Plex support article that comes into play:
      • Note: Some operating systems (including Windows) do not support media content in the root of the drive. You should ensure your content is inside at least one directory level off of the root.

I have now disabled both the Berkeley Packet Filter and Raw Sockets, everything still works fine.

To summarize, what I had to do to in the Plex jail properties was to:
  • Check VNET
  • Under IPv4 Interface: Choose vnet0
  • Under IPv4 Address: Write 192.168.0.52
  • Under IPv4 Netmask: Choose 24
  • Under IPv4 Default Router: Write 192.168.0.1
And that's it!
 

clutzz

Cadet
Joined
May 9, 2019
Messages
1
I was having similar problems which took me a while to resolve. This thread has helped me so thought I'd share my comments.

I have FreeNAS 11.2 running on ESXi 6.5. Plex was not downloading metadata nor was I able to play videos files from within Plex. I used commands from Post #12 (replacing the ip with my ip)
Code:
iocage stop plex
iocage set ip4_addr="vnet0|192.168.86.10/24" vnet="on" boot="on" allow_raw_sockets="1" defaultrouter="192.168.86.1" plex


These seemed to work. But I then tried pinging and no luck - could not ping my ap or the internet from the jail. Could only ping my FreeNAS host. I then came across this post which suggested enabling Promiscuous Mode on ESXi.
https://www.ixsystems.com/community/threads/jail-cant-ping-gateway.11408/

This worked. I could now ping from and to the jail, hostname resolution was working, videos were playing and metadata was downloading.

Thanks itskando and others that have contributed to this post (as well as the post that I've linked to above).
 

f00b4r00

Dabbler
Joined
Jan 5, 2020
Messages
41
Sorry for unearthing this but is this an established fact that Plex can no longer work without VNET?

I'm stuck between a rock and a hard place: if I enable VNET on my plex jail, network gets screwed up for other reasons, and if I disable it Plex doesn't want to transcode anything.

I just don't see why Plex would absolutely need VNET in order to operate?

Thanks
 

f00b4r00

Dabbler
Joined
Jan 5, 2020
Messages
41
Nevermind that, I eventually figured it out: when VNET is disabled, and even if assign_localhost is enabled, the Plex Transcoder will not work because, from what I can guess:
1) The transcoder probably tries to establish a connection to 127.0.0.1 (instead of "localhost"), which is looped back to the main jail IP (AIUI reading on the operation of FreeBSD jails, which I understand very little about): I noticed that all connections where happening within the jail over the LAN IP and that the loopback address was completely unused; and
2) The transcoder doesn't seem to authenticate with the PMS, which by default probably only allows unauth connections on 127.0.0.1

If I get all that right, the net result is that because the PMS sees an incoming unauthenticated connection over the LAN IP instead of the loopback device it denies it, thus the transcoder cannot access the media and so the transcoding fails and the player ends up with nothing to play (meanwhile, CPU spikes on the server while all this happens and cryptic messages are left in the logs).

The solution is very simple, and it might serve others so here it is: simply allow the LAN network in the unauthenticated Networks PMS preferences (either in the preference file: "allowedNetworks", or via the web configuration, section "Network"), and voilà: Plex installed in a jail without VNET, and transcode works.
 

f00b4r00

Dabbler
Joined
Jan 5, 2020
Messages
41
For what it's worth, a similar issue was affecting Hama/ASS, which I reported here and which is now fixed. Hama/ASS is thus more friendly toward that kind of setup :)
I wish Plex actually had a proper bug tracker so I could report there too, but it doesn't.
 
Joined
Mar 19, 2021
Messages
1
Nevermind that, I eventually figured it out: when VNET is disabled, and even if assign_localhost is enabled, the Plex Transcoder will not work because, from what I can guess:
1) The transcoder probably tries to establish a connection to 127.0.0.1 (instead of "localhost"), which is looped back to the main jail IP (AIUI reading on the operation of FreeBSD jails, which I understand very little about): I noticed that all connections where happening within the jail over the LAN IP and that the loopback address was completely unused; and
2) The transcoder doesn't seem to authenticate with the PMS, which by default probably only allows unauth connections on 127.0.0.1

If I get all that right, the net result is that because the PMS sees an incoming unauthenticated connection over the LAN IP instead of the loopback device it denies it, thus the transcoder cannot access the media and so the transcoding fails and the player ends up with nothing to play (meanwhile, CPU spikes on the server while all this happens and cryptic messages are left in the logs).

The solution is very simple, and it might serve others so here it is: simply allow the LAN network in the unauthenticated Networks PMS preferences (either in the preference file: "allowedNetworks", or via the web configuration, section "Network"), and voilà: Plex installed in a jail without VNET, and transcode works.

Thank you sir. For the explanation and the fix. Trying to fix this has been an mf'er.
 
Joined
Feb 20, 2022
Messages
6
Hi folks!
I hit the same issue with version 12.0 Stable (TrueNas) and Plex Media Server plugin 1.25.3.5409.
I had the error with transcoding but with my HDHomeRun Tuner when I was recording.

@itskando : Your search and solution save me a lot of time! Thanks!
 
Top