Edit: Issue solved, it was a permissions issue with the Plex Media Server folder copied over from my Win10 box. Renaming and starting the service built its own Plex Media Server folder. Undid this and chown and chmod to match the generated version and it did pull my library data over as expected.
Have a weird issue going on with this script. On TrueNAS 12.0 U4, and this is my first FreeNAS/TrueNAS install so I'm still pretty new to this all. I did get my SABnzbd, Sonarr, etc, and all that set up and running (config may not be right, but one step at a time haha), but Plex is being problematic.
It looks like the script completes successfully, and maybe I'm just really tired and am missing something but I don't see any errors in the script output:
Code:
root@truenas[~/freenas-iocage-plex]# ./plex-jail.sh
Netmask not set, defaulting to /24 (255.255.255.0)
Plex metadata path not set, defaulting to /mnt/Coruscant/plex_data
Plex media path not set, please mount media directory manually when done
Not configuring hardware transcode
Using stable-release plexmediaserver code
Creating jail pms. This may take a minute, please be patient.
pms successfully created!
No default gateway found for ipv6.
* Starting pms
+ Started OK
+ Using devfs_ruleset: 1007 (iocage generated default)
+ Configuring VNET OK
+ Using IP options: vnet
+ Starting services OK
+ Executing poststart OK
Successfully added mount to pms's fstab
Successfully added mount to pms's fstab
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[pms] Installing pkg-1.16.3...
[pms] Extracting pkg-1.16.3: 100%
Updating FreeBSD repository catalogue...
[pms] Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
[pms] Fetching packagesite.txz: 100% 6 MiB 6.5MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 30704 packages processed.
All repositories are up to date.
Updating database digests format: 100%
The following 1 package(s) will be affected (of 0 checked):
New packages to be INSTALLED:
plexmediaserver: 1.22.3.4392
Number of packages to be installed: 1
The process will require 235 MiB more space.
79 MiB to be downloaded.
[pms] [1/1] Fetching plexmediaserver-1.22.3.4392.txz: 100% 79 MiB 10.4MB/s 00:08
Checking integrity... done (0 conflicting)
[pms] [1/1] Installing plexmediaserver-1.22.3.4392...
===> Creating groups.
Creating group 'plex' with gid '972'.
===> Creating users
Creating user 'plex' with uid '972'.
[pms] [1/1] Extracting plexmediaserver-1.22.3.4392: 100%
=====
Message from plexmediaserver-1.22.3.4392:
--
multimedia/plexmediaserver includes an RC script:
/usr/local/etc/rc.d/plexmediaserver
TO START PLEXMEDIASERVER ON BOOT:
sysrc plexmediaserver_enable=YES
START MANUALLY:
service plexmediaserver start
Once started, visit the following to configure:
http://localhost:32400/web
@@@ INTEL GPU OFFLOAD NOTES @@@
If you have a supported Intel GPU, you can leverage hardware
accelerated encoding/decoding in Plex Media Server on FreeBSD 12.0+.
The requirements are as follows:
* Install multimedia/drm-kmod: e.g., pkg install drm-fbsd12.0-kmod
* Enable loading of kernel module on boot: sysrc kld_list+="i915kms"
** If Plex will run in a jail, you must load the module outside the jail!
* Load the kernel module now (although reboot is advised): kldload i915kms
* Add plex user to the video group: pw groupmod -n video -m plex
* For jails, make a devfs ruleset to expose /dev/dri/* devices.
e.g., /dev/devfs.rules on the host:
[plex_drm=10]
add include $devfsrules_hide_all
add include $devfsrules_unhide_basic
add include $devfsrules_unhide_login
add include $devfsrules_jail
add path 'dri*' unhide
add path 'dri/*' unhide
add path 'drm*' unhide
add path 'drm/*' unhide
* Enable the devfs ruleset for your jail. e.g., devfs_ruleset=10 in your
/etc/jail.conf or for iocage, iocage set devfs_ruleset="10"
Please refer to documentation for all other FreeBSD jail management
utilities.
* Make sure hardware transcoding is enabled in the server settings
@@@ INTEL GPU OFFLOAD NOTES @@@
plexmediaserver_enable: -> YES
plexmediaserver_support_path: -> /config
Successfully removed mount from pms's fstab
* Stopping pms
+ Executing prestop OK
+ Stopping services OK
+ Tearing down VNET OK
+ Removing devfs_ruleset: 1007 OK
+ Removing jail process OK
+ Executing poststop OK
Installation Complete!
Mount your media folder into the jail, then start the jail.
Log in and configure your server by browsing to:
http://192.168.0.200:32400/web
There's nothing at the end of that web URL, but the rest of my apps do load fine. All the networking config looks identical.
I tried manually starting the service, but no luck:
Code:
root@pms:~ # service plexmediaserver start
Starting plexmediaserver.
root@pms:~ # service plexmediaserver status
plexmediaserver is not running.
root@pms:~ # service plexmediaserver onestart
Starting plexmediaserver.
root@pms:~ # service plexmediaserver status
plexmediaserver is not running.
I have my main data and jails on my main pool /mnt/Coruscant. I have my media folder and the initial location of my plex_data folder on my secondary pool /mnt/Batuu. When I first ran the script, I had the pool_path set to /mnt/Batuu, but then realized that there didn't seem to be any files installed within the jail for Plex. Super weird.
I rsync'd my plex_data/Plex Media Server folder (which, I should note, I copied from my Win10 install of PMS) over to a new plex_data dataset on /mnt/Coruscant, updated the plex-config file to reflect that, temporarily renamed the jail to pms-old and re-ran the script (the copy from above). It does seem that there's now files inside the pms jail for Plex, but the service just won't start.
I can't find any logs within the jail for the service, and there's no entries within the plex_data/Plex Media Server/logs folder either.
I followed Yorick's video and I don't know what I may have done wrong, but any ideas would be very much appreciated. Thanks!