iocage plex metadata and transcoding issue

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
Hello,

I have been attempting to set up plex in a new iocage jail over the last couple days. I can get everything up and running, and plex media server scans my files just fine. Plex never loads any metadata or posters for the media, however. I also can't play anything back that needs to be transcoded. I can play things directly though.

Plex works fine in the old warden jails. I configured the two jails (1 warden, 1 iocage) identically, but the warden jail is properly scanning the metadata and allowing playback, while the iocage jail does not. I don't believe this issue has anything to do with the plex software directly.

Any clues on how to try and fix this up?
 

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
The way you described your problems would suggest it is a networking issue within the iocage jail. A number of people on here are having challenges because the networking has to be manually setup through the CLI as I understand. I would start there by making sure your subnet mask is set, DNS, IP is correct and static, etc. Have you tried pinging 8.8.8.8 from within the jail? What is the result?

Strange behavior with the transcoding though, that doesn't seem to be networking related. Have you tested on multiple clients? Same problem on all?
 

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
I can ping 8.8.8.8 just fine after setting allow_raw_sockets=1. What are the important properties? Before changing anything you recommended, here are a few that I have:

Code:
defaultrouter:none
defaultrouter6:none
dhcp:off
interfaces:vnet0:bridge0
ip4:new
ip4_addr:igb0|10.214.59.30/24
ip4_saddrsel:1
ip6:new
ip6_addr:none
ip6_saddrsel:1
vnet:off
vnet0_mac:none
vnet1_mac:none
vnet2_mac:none
vnet3_mac:none


I will try adding a defaultrouter and adding igb0 to the interfaces list.
Edit: it looks like defaultrouter is only needed for vnet according to the docs, and adding igb0 didn't change anything.

For the transcoding, I have tried it on the web and on the apple tv, neither works.
 
Last edited:

nojohnny101

Wizard
Joined
Dec 3, 2015
Messages
1,478
I'm not really sure as I've just been lightly experimenting myself.

I used the following command to create mine although I did not get as far as you in scanning the library and such (busy these days and don't have time to play around with it).
Code:
iocage create -n jailname ip4_addr=“bridge|ip.add.ress/24” -r 11.1-RELEASE


For the transcoding issue, I would dig into plex's logs and see what they say. That is where I would start.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974
Hardware specs?

Metadata not loading is generally a network issue. Make sure you have a default gateway configured.
 

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
Hardware specs?

Metadata not loading is generally a network issue. Make sure you have a default gateway configured.

I updated my signature. Are you talking a default gateway within the jail or on the system?
 

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
I'm not really sure as I've just been lightly experimenting myself.

I used the following command to create mine although I did not get as far as you in scanning the library and such (busy these days and don't have time to play around with it).
Code:
iocage create -n jailname ip4_addr=“bridge|ip.add.ress/24” -r 11.1-RELEASE


For the transcoding issue, I would dig into plex's logs and see what they say. That is where I would start.

okay, I created the jail using igb0 instead of bridge0, but switching it didn't make a difference so I switched it back. I just added defaultrouter=[routerIP] to see if it will help, but so far it doesn't look like it.

I will dig through the logs and see what I can find.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,974
I updated my signature. Are you talking a default gateway within the jail or on the system?
System. I'm curious to know what the contents of /etc/resolv.conf are as well.
 

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
Okay, I have made a little progress. When you configure an iocage jail with the same interface that freeNAS is using (in my case igb0), I think it causes some issues with MAC addressing on the local network, maybe? I set
Code:
vnet=on
ip4_addr="vnet0|10.214.59.30/24"

and now transcoding is working again, I can watch my media. So far, I can't tell if metadata fetching is working. It seems like processing is taking longer this time, but I still don't see anything renamed or any artwork yet.

Here are the contents of /etc/resolv.conf:
Code:
# Generated by resolvconf
search local
nameserver 10.214.59.247
nameserver 208.67.222.222
nameserver 208.67.220.220


It also seems once vnet is turned on, it doesn't want to be turned back off. I don't know if that is a bug or if I just don't know what I am doing. I also didn't configure anything for vnet at the system-level, but I don't know if there is anything that needs to be configured either.

Edit: I just saw the first few items get renamed and have artwork show up, so it seems this fixed everything. I will keep my fingers crossed that it will all be matched and looking good by morning.
 
Joined
Jan 7, 2015
Messages
1,150
Have you made any further progress on this? Im having the exact same problem. I did catch some chatter on the subject in the Plex boards too. Seems it isnt just me (us).

Im pretty bust these days and havent had the time to sort any of this out. Ill post here if I figure anything else out. Lastly, I do have a different jail up and running set the same way, and all services work as they should. CP, SAB, Drone and the like all working great as is my Apache frontend. I fired the jail up im going to run a few things and see what the logs say.
 
Joined
Jan 7, 2015
Messages
1,150
Edit: I just saw the first few items get renamed and have artwork show up, so it seems this fixed everything. I will keep my fingers crossed that it will all be matched and looking good by morning.
Just saw this.. Thanks!
 

Dillan

Dabbler
Joined
Mar 15, 2016
Messages
21
Yep, there are a few jails (including plex) that need their own MAC address and there for definitely need vnet turned on. Just make sure you set defaultrouter, the vnet interface, and vnet=on.
 
Joined
Jan 7, 2015
Messages
1,150
Yep. That did it. What I did exactly for anyone else that comes along is.
Code:
## On host ##
iocage stop JAIL
iocage set ip4_addr=“vnet0|192.168.100.222/24" vnet="on" boot="on" allow_raw_sockets="1" defaultrouter="192.168.100.1" JAIL
iocage start JAIL
###Then enter the jail and do a quick ping to see if you are getting out##
jls
jexec 7 csh
ping yahoo.com

##Update things##

portsnap fetch update
portmaster -aBd

OR

pkg update && pkg upgrade

##There was a new PMS in the repo##

service plexmediaserver{_plexpass} restart

##Now try playing files and or fetching metadata##



Just change your appropriate IP scheme and jail names where applicable. Cheers and thanks for the pointers!
 

Volte

Dabbler
Joined
Feb 11, 2016
Messages
19
Woohoo!! I was falling down a rabbit hole of IPv6 stuff before finding this. Spent a solid 3 days trying to sort it out. Booted back into my mac today and closed out about 24 tabs related to that expedition.

Then decided I couldn't give up and started my search anew. Found this in the first try.

P.S. @John Digital , you got a smart-quote in your command, so copy+pasters are gonna have a bad run :D

Here's the command I used. I didn't (need to) update anything ( pkg update etc)

Code:
sudo iocage stop plex
sudo iocage set ip4_addr="vnet0|192.168.1.2/24" vnet="on" boot="on" allow_raw_sockets="1" defaultrouter="192.168.1.1" plex
sudo iocage start plex


P.S. if you're trying to get into your iocage jails, try sudo iocage console JAIL :D
 

zayroc

Dabbler
Joined
Sep 11, 2017
Messages
10
12+ hours, a post on freenas reddit, here and plex forums...and no luck. I thought it was a permissions issue, finally found this post that said to turn vnet on for plex reasons even though everything else said not to. What have I got to lose??? It worked! metadata and transcoding! Brilliant!
 

ace1780

Cadet
Joined
Oct 21, 2018
Messages
5
Hey guys. I am new to Freenas. I was having the same exact issue where Plex Media Server was unable to load any metadata or transcode to certain devices.

I was just about to ask for the cli instructions for rookies, as i am not at all familiar with Linux command line, so i could not get the commands posted kindly by "John Digital" to parse without error. Interpreting what i could from his command line, and with some log information posted by another user in Bug Report #52548, i was able to piece together what needed to have to resolve this problem on my own using the WebGUI. I thought i should post it here because i am sure i am not the only .nix newbie user of freenas that may not be comfortable with the command line.

So, here i go:
-After installing the Plex Media Server plugin, i stopped it from within the Jails panel of the Freenas WebGUI. Once the Jail has stopped, select "Edit" from the control options to the right (you may have to scroll the page to your right).

Now in "Basic Properties":
-Enable "VNET"
-Enable "Berkeley Packet Filter"
-From the "IPv4 interface" drop-down, select "vnet0"
-For "IPv4 Address", type in the ip address on your local network that you would like to assign to your Plex Server.
-For "IPv4 Netmask" (I won't post a table of subnets here, but if your LAN subnet is 255.255.255.0 like the majority of home networks, select "/24" from the drop-down selector)
-For "Default IPv4 Route" This should be the ip address of your home router or dhcp server. Leaving this value set to use the Default Route assigned to FreeNas didn't work for me.

Now we'll click next and go down to "Jail Properties"
-About 85 to 90 percent of the way scrolling down the page, you'll see "allow.raw_sockets". This is unchecked by default. We need to check this box to enable the "allow.raw_sockets" parameter.

Now we'll click next and go down to "Network Properties"
-The very first value "interfaces". We just want to make sure that this is set correctly. The parameter here should be "vnet0:bridge0"

Click Save all the way down at the bottom of the Jail Edit page.

Now just for the sake of cleanliness, i rebooted my Freenas system after making these changes before even attempting to start the Plex Jail again. My Plex Server is now transcoding wonderfully, and is able to communicate with the outside world to download metadata, movie covers, album art, etc.
 

thePWNin8r

Cadet
Joined
Feb 5, 2018
Messages
6
Hey Guys - I've been having this same issue... but when I do the vnet and raw sockets thing - I can't get back into the Plex GUI. It just times out at the IP Address (192.168.1.19:32400/web). It works great if I don't have vnet/raw sockets enabled... but as soon as I do *POOF*. Any ideas? I'm at a loss here... Thanks
 

ace1780

Cadet
Joined
Oct 21, 2018
Messages
5
Hey Guys - I've been having this same issue... but when I do the vnet and raw sockets thing - I can't get back into the Plex GUI. It just times out at the IP Address (192.168.1.19:32400/web). It works great if I don't have vnet/raw sockets enabled... but as soon as I do *POOF*. Any ideas? I'm at a loss here... Thanks
Have you assigned the plex jail a static ip address? Or is it set to use DHCP?
If you set it to static, make sure you're not having a local ip address conflict.
 

thePWNin8r

Cadet
Joined
Feb 5, 2018
Messages
6
Thanks for the prompt response!

It is set as static - and there is no conflict... I can get to the management issue with the same IP address prior to turning on VNET. When I try pinging 8.8.8.8 in the shell I get "No Route to host". My DHCP on the Router won't auto assign anything under 99 and this is 19...
 

ace1780

Cadet
Joined
Oct 21, 2018
Messages
5
Oh yes i remember having this problem all too well. Even if your FreeNas is using DHCP, i had to manually set gateway and dns settings in Network-->Global configuration and then reboot my FreeNas host. I remember i found that being necessary because the VNET virtual adapter uses the global values.

Do you have more than one interface connected/configured on FreeNas?

***EDIT: I have two subnets on my local network. Your gateway and namesever1 should most likely be identical
 

Attachments

  • plexjail-global.png
    plexjail-global.png
    669.8 KB · Views: 973
Top