I updated to PlexMediaServer-1.15.0.659-9311f93fd and now I can't access server setting

Hum you’re changing the support path but that shouldn’t break things and permissions look ok, however it might be simpler to let it be default, if this is about being able to keep it separate for easy snapshots/backups/migrations you could simple have zfs mountpoint set to the default path inside the jail (or do nullfs but for the standard dir /usr/local/plexdata)

But anyway back to the main problem, I do have 707 on my machine and can’t repro this, can you please DM me you’re PMS logs output of sockstat -l46 and you’re Preferences.xml and maybe also the full rc.d script?

PM sent.

For folks trying to get the rc.d script fixed, try this:

https://svnweb.freebsd.org/ports/head/multimedia/plexmediaserver-plexpass/files/plexmediaserver_plexpass.in?revision=493832&view=co&pathrev=493832

Also the port was only fixed in “revision” 1 of the 707 build —> https://svnweb.freebsd.org/ports?view=revision&revision=493832

So you might be running a broken 707, if the correct version is installed it should be 1.15.1.707_1(not the _1)

So, if I STOP PMS, use the rc.d script that @mikec_pt has linked and use the always handy PMS_Updater.sh script it should work?

Yes, it SHOULD, I can’t promise 100% cause other issues might be at play since a custom script is in use, but looking at what it does (wipes the install dir and overwirtes with a new install); if you then just make sure the rc.d is up to date it should work…

Thanks for finding the exact line. This was a problem with my server and it solved many things. Vi is also not evil, just takes a little getting used to. :slight_smile:

I tried as said but this breaks my settings.

From where can I provide you logs?

Still an issue with 1.15.1.707_1.

I’ve tried everything in this thread with no luck.

After modifying the rc.d, I ran this:

service plexmediaserver start

It indicates that it’s starting the server. But unlike others who can access Plex (just not settings), Plex doesn’t even start. I checked logs but I see nothing, not even an indication that Plex is starting. So I tried to manually start Plex Media Server and saw an error:

/lib/libc.so.7: version FBSD_1.5 required by libpython2.7.so.1 not found

Does Plex require FreeBSD 12 now? I still run FreeNAS 9.10 which is based on FreeBSD 10.3. I supposed I should upgrade soon, but I was hoping to get the update working in the meantime.

For now I rolled back to an earlier snapshot. I’ll keep troubleshooting tonight or tomorrow.

I’m running on FreeBSD 12, upgraded to the latest available port version which is 1.15.1.707.

With that version I can’t restart plex server any longer, it just hangs and Plex Script host processes get stuck to 100% CPU load. There is also a memory leak and all of my memory (128 GB) and swap space is fully consumed.

I now removed it and used the pkg version which is 1.14.1.5488 and all is back to normal again.

Staying in 1.1.14.1.5488 is the best course of action right now.

To do my tests I stop my jail, clone it and do the test :smiley:

So I was back and forth onto 1.15.x versions with issues (even after having fixed the rc.d script). Before editing the script, obviously nothing worked. After editing it, settings didn’t work. I updated via the port a bit ago, same thing where it wouldn’t work. So I reverted. Made a clean 11.2 based jail, same issue where settings wasn’t accessible. I updated again to 707 via ports again today, and once again settings were inaccessible. I stopped the service, verified the script, saw the port now included the updated path, and started plex again… still no access to settings. Out of stubborness/stupidness I restarted the service 4 times, then before rolling back to 5488 again I went ahead and tried to go to settings again… and it worked.

So, yay for me it works now. What it makes me think though, is what all files are being automatically migrated by Plex now for any of the internal changes? This would make me think that not all of them got moved in the first startup and in my mashing of restart I gave it enough passes that it eventually got itself straightened out.

The Fixes that @mikec_pt posted worked for me!

Thanks a ton, mikec_pt!

However, as the PMS are mostly installed as a plugin in an iocage jail on FreeNAS 11.2 and there is no /etc/version inside the jail. They are still identified as FreeBSD in most cases.

Summary

https://www.ixsystems.com/community/resources/fn11-2-iocage-jails-plex-tautulli-sonarr-radarr-lidarr-jackett-transmission-organizr.58/

For everyone having issues, I have been blowing my jail out and rebuilding from scratch to test each time.

If you follow the install guide linked above, you will install a clean new jail, and then update the repo and it will pull 791_1.

I can say that 791_1 is working just fine after a pkg upgrade and manually starting the service. I did have to restart it once but after that all has seemed fine.

EDIT: Died after a few minutes and settings not available. Rolling back now.

1 Like

How do you manually start the Plex Media Server? I’m getting no life from: service plexmediaserver start

Tried editing my rc.d file and can’t get 1.14 or 1.15 to run.

That’s the correct command as far as I know. If it isn’t working then your rc.d may be corrupt.

I’m getting eval: ${%...}: Bad substitution when executing a service plexmediaserver start with the provided rc.d text.

It may be best to post your full rc.d in here so others can comment if it looks right.

Here is my rc.d that I attempted to edit via mikec_pt’s earlier post :

# Created by: KalleDK <plexmaintainer@k-moeller.dk>
#
# $FreeBSD: head/multimedia/plexmediaserver/files/plexmediaserver.in 409168 2016-02-19 11:41:13Z feld $
#
# PROVIDE: plexmediaserver
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable the Plex Media Server:
#
# plexmediaserver_enable="YES"
#
# plexmediaserver_support_path="/usr/pbi/plexmediaserver-amd64/plexdata" # Plex data: logs, media metadata, settings, etc
#
# plexmediaserver_tmp="/var/tmp/plex" # configure tmp directory used for the transcoding process if desired
#
# plexmediaserver_maxplugins="6" # Maximum number of background plugin procs. May have to raise in rare cases.
#

. /etc/rc.subr

name=plexmediaserver
rcvar=plexmediaserver_enable
load_rc_config $name

: ${plexmediaserver_enable:=NO}
: ${plexmediaserver_support_path="/usr/pbi/plexmediaserver-amd64/plexdata"}
: ${plexmediaserver_user="plex"}
: ${plexmediaserver_group="plex"}
: ${plexmediaserver_maxplugins=6}

command=/usr/sbin/daemon
procname="/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Plex_Media_Server"
command_args="-f ${procname}"
pidfile=/var/run/plex/plex.pid
start_precmd=plex_precmd
stop_precmd=plex_stop_precmd
stop_postcmd=plex_stop_postcmd

plex_precmd()
{
       if [ -f "/etc/version" ]; then
               export PLEX_MEDIA_SERVER_INFO_VENDOR="$(cat /etc/version|cut -d- -f1)"
               export PLEX_MEDIA_SERVER_INFO_DEVICE=NAS
               export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)"
               export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(cat /etc/version|cut -d- -f2-)"
       else
               export PLEX_MEDIA_SERVER_INFO_VENDOR=FreeBSD
               export PLEX_MEDIA_SERVER_INFO_DEVICE=PC
               export PLEX_MEDIA_SERVER_INFO_MODEL="$(uname -m)"
               export PLEX_MEDIA_SERVER_INFO_PLATFORM_VERSION="$(uname -r)"
       fi

        export TMPDIR="/tmp"
        export SUPPORT_PATH="${plexmediaserver_support_path}"
        export HOME="${plexmediaserver_support_path}/Plex Media Server"
        export PYTHONHOME="/usr/pbi/plexmediaserver-amd64/share/plexmediaserver/Resources/Python"
        export SCRIPTPATH="/usr/pbi/plexmediaserver-amd64/share/plexmediaserver"
        export LD_LIBRARY_PATH="${SCRIPTPATH}/lib"
        export PLEX_MEDIA_SERVER_HOME="${SCRIPTPATH}"
        export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=${plexmediaserver_maxplugins}
        export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=${plexmediaserver_support_path}
        export PLEX_MEDIA_SERVER_PIDFILE=${pidfile}
        export PLEX_MEDIA_SERVER_LOG_DIR="${plexmediaserver_support_path}/Plex Media Server/Logs"
        export PATH="${SCRIPTPATH}/Resources/Python/bin:${PATH}"
        export LC_ALL="en_US.UTF-8"
        export LANG="en_US.UTF-8"
        ulimit -s 3000

        if [ ! -d ${pidfile%/*} ]; then
                install -d -o ${plexmediaserver_user} ${pidfile%/*};
        fi

        if [ ! -d "${plexmediaserver_support_path}/Plex Media Server" ]; then
                install -d -g ${plexmediaserver_group} -o ${plexmediaserver_user} "${plexmediaserver_support_path}/Plex Media Server";
        fi

        if [ ${plexmediaserver_tmp} ]; then
                export TMPDIR=${plexmediaserver_tmp};
                install -d -g ${plexmediaserver_group} -o ${plexmediaserver_user} "${plexmediaserver_tmp}";
        fi
}

plex_stop_precmd()
{
        if [ -r ${pidfile} ]; then
                export _PLEXPID=$(check_pidfile ${pidfile} ${procname})
        fi
}

plex_stop_postcmd()
{
        _PLEX_CHILDREN=$(pgrep -g ${_PLEXPID})
        echo "Cleaning up leftover child processes."
        kill $sig_stop ${_PLEX_CHILDREN}
        wait_for_pids ${_PLEX_CHILDREN}
}

run_rc_command "$1"