Keep in mind, PMS requires lang/python27 to be installed to function properly. Otherwise it complains (rightfull) about a missing libpython2.7.so and simply symlinking libpython2.7.so.1 provided by Plex wont work. Plex won't scan any media then.
Something is odd. Everything seems to want to use the built-in libpthon.. but..
# lsof -p 82854 | grep libpython
Plex\x20M 82854 plex txt VREG 5,2858680465 5234195 7126 /home/plex/PlexMediaServer-0.9.7.23.0-8e6b2a8/libpython2.7.so.1
The built-in version works fine if $LD_LIBRARY_PATH is set correctly.
Something is a little weird for sure though. Automated scans were not working so I sniffed around a bit.
The server would run this:
May 01, 2013 00:52:04 [0x8085f2000] DEBUG - Job running: /home/plex/PlexMediaServer-0.9.7.23.0-8e6b2a8/Plex Media Scanner --scan --refresh --section 1
But all that made it the Plex Media Scanner.log file was:
May 01, 2013 00:49:02 [0x807807400] DEBUG - Opening 10 database sessions to library, SQLite 220.127.116.11, threadsafe=1
If I looked at stderr I saw some telltales from the scanner when run from the GUI:
Could not find platform independent libraries
Could not find platform dependent libraries
Consider setting $PYTHONHOME to [:]
ImportError: No module named site
I cheated and wrapped the binary:
plex@silo:~/PlexMediaServer % pwd
plex@silo:~/PlexMediaServer % ls -l Plex\ Media\ Scanner*
-rwxr-xr-x 1 plex plex 165 May 1 00:51 Plex Media Scanner
-rwxr-xr-x 1 plex plex 2958968 Apr 29 18:26 Plex Media Scanner.bin
I renamed the scanner to have a .bin suffix and made a wrapper with:
plex@silo:~/PlexMediaServer % cat Plex\ Media\ Scanner
exec $P/Plex\ Media\ Scanner.bin $*
After that, automated and GUI-triggered scans are working again.
If I had to guess, I'd suspect we (FreeBSD) did something unusual with environment variable handling that is upsetting the job spawning.