FreeNAS/FreeBSD 1.23.0.4438 plugins failing

Server Version#: 1.23.0.4438
Player Version#: Web 4.56.4

4438 causes “Server settings are unavailable” within the web client, and “Error received reading configuration for com.plexapp.system” in logs. PMS logs attached.

Plex Media Server.5.log (119.4 KB)

Update: Downgrading to 1.22.3.4392 makes things work again.

There’s some new build-chain stuff in PMS 1.23; I wonder if it requires a newer version of FreeBSD now.

(I found the upgrade to TrueNAS 12 to be painless, and it’s easy enough to revert to a previous boot environment if you have any problems.)

1 Like

Ok, I’m still on “FreeNAS 11.3-U5” so maybe I need to make that leap to TrueNAS?

I can’t swear that’s what’s happening, and the Plex download page still says that FreeBSD 11.2 is supported. So it could be some other problem.

I do know that FreeBSD 11.3 was deprecated last year, and I know PMS 1.23 was built using much newer compilers & tooling than PMS 1.22 was. And I know Plex is working on my TrueNAS 12.0u3 system + jail.

So maybe a newer version of FreeBSD is now required, and maybe that download link text just needs to be updated when PMS 1.23 comes out of beta.

I’d encourage you to update, because I find TrueNAS 12 and PMS 1.23 to both be meaningfully faster, even on the very old system I am using.

Too late! You promised! It’s in writing! I took a screenshot!

(I’m updating to TrueNAS 12 as we speak.)

1 Like

If it breaks, you get to keep both pieces. Screenshot has no cash value. Ideas known to the state of cancer to cause California.

Just don’t upgrade your ZFS pool features immediately so you can roll back if needed. :slight_smile:

Well, now that the jail is on 12.1-RELEASE it still won’t run 1.23.0.4438 or 1.23.0.4459 properly. :confused: Something else must be going on. It appears to break the bundled Python once 4438 or newer is installed. (PMS_updater.sh tries to use the Plex python environment and complains about missing modules like site .)

You used the word “plugin” and I made an assumption. Are you using the iXsystems Plex Plugin, or a default jail?

How are you upgrading PMS to those versions? They haven’t trickled through the FreeBSD ports system yet, so I assume you’re doing it manually or using an “update” script?

The iXsystems Plex Plugin doesn’t do much. It creates a jail, it installs the FreeBSD plexmediaserver (or plexmediaserver-plexpass) package, and it provides an rc.d script. There’s not very much to break.


Edit: OK, I see - you said PMS_updater.sh. This thing?

It does this, which is definitely not appropriate for current versions of PMS:

ln -s $PMSPARENTPATH/$PMSLIVEFOLDER/lib/libpython2.7.so.1 $PMSPARENTPATH/$PMSLIVEFOLDER/libpython2.7.so 2>&1 | LogMsg

But … I just spun up another instance of the plugin, and updated it using that script. It makes that (unnecessary) link, but PMS is running OK.

I’m using the iX plugin. And I was using that script on a daily cronjob, since the plexmediaserver-plexpass pkg lags behind quite a bit. Currently, the way to fix it is by force-reinstalling the BSD package.

If I try to untar the FreeBSD update into the place where pkg installs it, I get the same issue. Starting things up in debug mode, or with the include start.sh and environment variables pointing to the correct application support dir, I get this error:

ImportError: Shared object "libexslt.so.0.8.20" not found, required by "etree.so"
Traceback (most recent call last):
  File "/usr/local/share/plexmediaserver-plexpass/Resources/Plug-ins-20536d6fc/Framework.bundle/Contents/Resources/Versions/2/Python/bootstrap.py", line 91, in <module>
    import Framework
  File "/usr/local/share/plexmediaserver-plexpass/Resources/Plug-ins-20536d6fc/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/__init__.py", line 26, in <module>
    import components
  File "/usr/local/share/plexmediaserver-plexpass/Resources/Plug-ins-20536d6fc/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/__init__.py", line 9, in <module>
    from data           import Data
  File "/usr/local/share/plexmediaserver-plexpass/Resources/Plug-ins-20536d6fc/Framework.bundle/Contents/Resources/Versions/2/Python/Framework/components/data.py", line 8, in <module>
    from lxml import etree, html, objectify

I suspect the rc.d service file is now incompatible? Perhaps the way it’s setting up Python environment? Or perhaps the iX plugin is missing some newly dependent packages?

:-/

PMS is built to have few external dependencies. Do you have /usr/local/share/plexmediaserver-plexpass/lib/libexslt.so.0.8.20?

OK. Fixed it. The rc.d script needs

export LD_LIBRARY_PATH="${SCRIPTPATH}/lib"

added to the plex_precmd section.
The bundled start.sh needs something similar.

1 Like

Ahhhh!

The plugin-provided rc.d has been setting LD_LIBRARY_PATH for a couple of years.

I’m guessing that you never updated the plugin using the FreeNAS/TrueNAS system, so you had a very old version of the rc.d?

If it’s working, maybe you want to leave well-enough alone. Or if you want the current rc.d for comparison -

https://github.com/freenas/iocage-plugin-plexmediaserver-plexpass/tree/master/overlay/usr/local/etc/rc.d

That’s strange because I definitely purged the pkg and reinstalled it to roll back to the plugin-provided everything, and it didn’t reset the rc.d. I also only started using the PMS_Updater.sh about 2 months ago and had previously been updating the plugin to update PMS.

You’re scrambling multiple software packages & update systems together.

The Plex PMS distribution doesn’t provide an rc.d at all; that’s up to the OS/package/plugin maintainers.

The FreeBSD plexmediaserver pkg provides an rc.d script, which works with the version of PMS that it provides. It doesn’t set LD_LIBRARY_PATH. That pkg will need to be updated when it provides PMS 1.23+.

The iX plugin uses the FreeBSD pkg, and then provides a replacement/overlay rc.d script. The rc.d provided by the iX plugin DOES set LD_LIBRARY_PATH, and (seems to me) to work fine with PMS 1.23+.

The PMS_Updater script assumes the FreeBSD pkg & iX plugin were both previously installed, but then it leaves the pkg system all horked up. Once you’ve used the PMS_Updater you aren’t really using “the plugin” or “the package” any more; you’re off in no man’s land.

If you uninstalled & reinstalled the plexmediaserver pkg, you reverted back to the rc.d from the FreeBSD pkg.

Ah got it. So by updating/etc the BSD pkg, I was actually shooting myself in the foot. And that’s probably what got me into this state a while ago, trying to rush the iX/BSD update process.

Hahahah, well. I’m certainly familiar with being impatient and wanting the latest-and-greatest thing.

Freebsd 11.4-p9 jail in freeNAS here. I did exactly that: added the line to start.sh. IMHO, if it is required, it should be added to the package, considering SCRIPTPATH is the directory where start.sh resides, which means the package is not using system libraries for libexslt.so.0.8.20 etc.

You added that to start.sh or to the rc(8) .../rc.d/plexmediaserver script?

I thought FreeNAS topped out at FreeBSD 11.3-XX ?

It does. But FreeBSD 11.4 uses the same kernel iirc, so you can have 11.4 jails on 11.3. I had one as well until I upgraded to TrueNAS and redid everything.

1 Like