Plex on Freenas help

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
Hi All
Thank you for helping out with my post earlier about getting my DNS problem worked out. I'm still trying to get this Plex Media Server set up. I got the DNS issue resolved, but now I can't get Plex installed on freenas. I was able to create a jail called plexmedia and i've started it. That's as far as I've gotten. If I try to install Plex manuallly using shell from the jail, I get..............

The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
pkg: Error fetching http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly/Latest/pkg.txz: No address record
A pre-built version of pkg could not be found for your system.
Consider changing PACKAGESITE or installing it from ports: 'ports-mgmt/pkg'.

I also tried to install Plex thru Freenas using Plugins tab, I start the process and it will hang at 50% for sometime then an Error will come up......

Error: newplexmedia had a failure Exception: RuntimeError Message: + Acquiring DHCP address: FAILED, address received: 0.0.0.0/8 Stopped newplexmedia due to DHCP failure Partial plugin destroyed
CLOSE

I believe this may be a VLAN issue? I have my Freenas set up with a static IP and I have my new created plexmedia jail also setup with a static IP.
The freenas I have as 192.168.1.65
The plex jail I have as 192.168.1.7

Thank you for any assistance.
 
Joined
Jan 7, 2015
Messages
1,155
I have tailored this commands for you based on what you have stated. I have verified this all works, however youll need to do all this from cli. It also does not mount any storage for you, youll have to do that based on your system. SSH into FreeNAS host using a terminal client (Putty).
iocage list Find current failed plex jailname
iocage stop JAILNAMEFROMABOVE
iocage destroy JAILNAMEFROMABOVE
iocage create -n plexmedia -r 11.3-RELEASE ip4_addr="vnet0|192.168.1.7/24" defaultrouter="192.168.1.1" boot="on" host_hostname="PLEX" vnet="on" allow_raw_sockets="1"
iocage console plexmedia
ping yahoo.com Make sure jail gets out to internet. If it doesnt stop here. The rest wont work.
pkg update && pkg upgrade Get things up to date. Installs pkg.
portsnap fetch extract Pull down newest ports tree. Takes a few minutes the first time.
cd /usr/ports/multimedia/plexmediaserver && make install clean Installs Plex. Use /usr/ports/multimedia/plexmediaserver-plexpass if you have a subscription.
sysrc plexmediaserver_enable=YES Enables Plex at jail startup. Use plexmediaserver-plexpass_enable=YES if you have a subscription.
service plexmediaserver start Again,
Use plexmediaserver-plexpass if you have a subscription.

If all went well you will see your new plex install at http://192.168.1.7:32400.
exit Exit jail terminal if you indeed see plex at 192.168.1.7:32400, its installed and running.

At this point you will need to add your storage mounts for plex to see your media. Be advised this is only an example youll need to tailor this command and repeat it for however many storages you wish to mount.

iocage fstab -a plexmedia "/mnt/tank/media /media nullfs rw 0 0" Repeat for each storage you need mounted.

Now you can proceed doing the plex setup from your browser. This should at very least (long day) get you very close.


Now its 5:00 somewhere. Good luck my dude, let me know if you need any further help..
 
Last edited:

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
Thanks John Digital for going thru the time to do this. Crack open a cold one my man. Using Putty, everything worked great until I did
iocage exec plexmedia

Then it said rather abruptly, Failed!
Now i need a beer......
Capture2.PNG
 

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
Do I need to go into my router and mess with the VLAN / Bridge functions? I hope not, cause last time i tried it, i almost bricked myself out of the router entirely.
 
Joined
Jan 7, 2015
Messages
1,155
Its trying to use zsh shell. IDK why. Ok, instead of iocage exec do this (its the same thing).

jls This will list the jails in a more "old fashioned manner". I still prefer doing it this way. Take note plexmedia's jail ID #
jexec # csh Substitute # for the actual integer you found using jls, enter jail using the csh shell.

Now continue where you left off. "ping yahoo.com"
 
Joined
Jan 7, 2015
Messages
1,155
Also me thinks iocage console plexmedia will also get you there.
 
Joined
Jan 7, 2015
Messages
1,155
You had me thinking I was nuts, I do use iocage exec plexmedia to enter, it works for me fine. Generally this is used to run commands in a jail without entering the jail. I think iocage console is more proper way. All ways *should work though, so idk.
 

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
Ok, I was able to move up a step and create a jail, but I can not ping anything from it. I snipped my results.
Capture2.PNG


I also tried the other method and it didn't work either.......

Capture3.PNG
We

Well, luckily I'm off tomorrow, and the next day, and the next day, and the day after that, etc.... Plenty of time to figure this out. Thanks again for all your help.
 
Joined
Jan 7, 2015
Messages
1,155
So this jail also has internet problems. So there is an underlying network issue. Its why pkg couldnt be retrieved from your OP
 
Joined
Jan 7, 2015
Messages
1,155
I didnt see your second post. The jail is created and you are entering it.. But the jail isnt getting internet over vnet0 it appears.
 
Joined
Jan 7, 2015
Messages
1,155
It would be helpful to see what output you have for ifconfig in both jail and FN host. And also helpful to know if you can ping google.com from the host. If the host isnt getting out the jail wont either.
Do I need to go into my router and mess with the VLAN / Bridge functions? I hope not, cause last time i tried it, i almost bricked myself out of the router entirely.
This is suspect. Can you elaborate?
 

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
Meaning, when I first started to try and install Plex thru Freenas using the plugins tab, I would get the errors that I originally posted. When I googled these error reports, I would get directed and read about other peeps having the same issue and it was a VLAN issue. I then googled VLAN and Freenas and the posts i read about involved setting up VLAN/ bridge in the router and setting up VLAN ports............So, I went into my Netgear Nighthawk router and ticked the box(Enable VLAN/Bridge setup) on the #port of the router that my Freenas server was connected to. It then would not let me access freenas at all. I Unticked the box(Enable VLAN/Bridge setup) and it's back to how it was before. This is all way over my pay grade. I'm thankful there's people like yourself with a good understanding of of this...

rootfig.PNG

plexfig.PNG
 

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
Are you Mr. Robot?
 
Joined
Jan 7, 2015
Messages
1,155
Shoot, I wish. Christian Slater is the man. Im just a guy who is at a computer alot. Can you ping google.com from the host or 8.8.8.8 out from the host?
 
Joined
Jan 7, 2015
Messages
1,155
All your ifconfig seems legit to me. Do iocage set allow_raw_sockets="1" plexmedia from freenas host. I did overlook that. I have also amended the instructions to include this. I also rediscovered Danb35 has an automated script to do a "manual" plex install in a jail all automated. I never used it but im sure its great.

The last thing to check before I disappear is whats in your FreeNAS GUI>>system>>Tunables? Anything of note? Seems i have some tunables in my system dealing with vnet. I faintly remember putting them there. I have one titled cloned_interfaces bridge0 that is suspect. Another called ifconfig_bridge0 that is adding my NIC em0 to the bridge (yours would be igb0). This post corresponds to this when searching the terms.
 

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
Danb35's method was the first that i tried when attempting to install Plex, but to no avail.

If I ping google or 8.8.8.8 from the host, it will just keep sending out pings and not stop sending.
I did (iocage set allow_raw_sockets="1" plexmedia). I also added the two tunables and tried it. I def looks like Freenas will not connect to the internet, only my network. I am able to check for updates from the Freenas dashboard tho.

I'm going to try and switch my main server ethernet port from Igb0 to the igb1 port and try all of this again. I'm going to look more into tunables as well. Tinker till it works. I will keep on keeping on.........
 
Joined
Jan 7, 2015
Messages
1,155
You received no "reply" when pinging from the host? It will send pings out and either reply with a time in ms, time out, or give something along the nature of destination unreachable. It will continue in Unix to send until you do CTRL-C to stop it.

Can you fill me in on your DNS issues that you said were resolved? This is definitely sounding routing and or DNS related. Another item to check in Network in the FN GUI is what nameservers FreeNAS is using as these are passed to jails to also use. You may use any you like but for ever and ever I've always just used 4.2.2.1 and 8.8.8.8 in either combination as primary/secondary bypassing my isp DNS addressing. Maybe your using the gateway as a DNS server or something simple and your router isn't playing along, idk.
 

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
DNS issues.......After the initial build, I was able to set up Pool/dataset and get a SMB to share, but I couldn't set up a jail, nor could I get Freenas to update. Someone recomended it was a DNS issue in my Global configuration. Well, sure enough when I entered my default gateway IP and DNS server, I was able to create a jail, and I could do a Freenas update check. I assumed all was well but that's as far as I got, setting up a jail. I still can't get Plex to install either thru shell or thru Plugins tab in GUI. Here's the post........


When I did Ipconfig/all in windows I got a DNS server address. Here's the global config i have.
DNS.PNG
 

djbrightside

Dabbler
Joined
Oct 29, 2015
Messages
13
I had a spare Intel Gigabit PCI-E network card and I put it in the Freenas Server box. I then did a fresh install of FreeNAS 11.3. I used the new PCI-E network card rather then the onboard. Everything worked out great. I was able to get a jail up and running. I ran danb35's script and it worked just as it should. Then I ran into my next problem which was adding a library to Plex. I added mount points to my jail, but when i would try to add a library in Plex, it would grey out the folders in which my media was in, and not allow me to add it. Turns out it was a Windows permissions issue......This video saved me.
.

Everything is hunky dory now. :) Using the seperate PCI-E network card fixed the problem for me. I pray I don't have to use a fu#king command line again anytime soon. Haha
 
Last edited:
Top