Plex jail running but can't get to web UI

jimmypooh

Dabbler
Joined
Sep 17, 2011
Messages
41
I'll have to look into Jellyfin for my next build.

Code:
root@plex-plexpass:/var/db # pkg info plexmediaserver-plexpass
plexmediaserver-plexpass-1.27.2.5929
Name           : plexmediaserver-plexpass
Version        : 1.27.2.5929
Installed on   : Tue Jul 19 14:34:45 2022 CDT
Origin         : multimedia/plexmediaserver-plexpass
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : multimedia
Licenses       :
Maintainer     : b.shertenlieb@yahoo.com
WWW            : https://plex.tv
Comment        : Plex Media Server component
Options        :
        RELAY          : on
Annotations    :
        FreeBSD_version: 1203000
        cpe            : cpe:2.3:a:plex:media_server:1.27.2:::::freebsd12:x64
        no_provide_shlib: yes
        repo_type      : binary
        repository     : iocage-plugins
Flat size      : 226MiB
Description    :
Plex Media Server is used to host the content and plugins that are then
streamed to Plex Media Center and Plex mobile app clients, either on the
same machine, the same local area network, or over the Internet. Content
may be transcoded by the server before it's streamed in order to reduce
bandwidth requirements, or for compatibility with the device being
streamed to.

WWW: https://plex.tv
 

jimmypooh

Dabbler
Joined
Sep 17, 2011
Messages
41
I'm guessing the service is pointed at the wrong spot.

my plexmediaserver_plexpass in the usr/local/ect/rc.d folder looks like this
Code:
#!/bin/sh
# Created by: KalleDK <plexmaintainer@k-moeller.dk>
#
# $FreeBSD$
#
# PROVIDE: plexmediaserver_plexpass
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf to enable the Plex Media Server:
#
# plexmediaserver_plexpass_enable="YES"
#
# plexmediaserver_plexpass_support_path="/usr/local/plexdata" # Plex data: logs, media metadata, settings, etc
#
# plexmediaserver_plexpass_tmp="/var/tmp/plex" # configure tmp directory used for the transcoding process if desired
#
# plexmediaserver_plexpass_maxplugins="6" # Maximum number of background plugin procs. May have to raise in rare cases.
#

. /etc/rc.subr

name=plexmediaserver_plexpass
rcvar=plexmediaserver_plexpass_enable
load_rc_config $name

: ${plexmediaserver_plexpass_enable:=NO}
: ${plexmediaserver_plexpass_support_path="/usr/local/plexdata-plexpass"}
: ${plexmediaserver_plexpass_user="plex"}
: ${plexmediaserver_plexpass_group="plex"}
: ${plexmediaserver_plexpass_maxplugins=6}

command=/usr/sbin/daemon
procname="/usr/local/share/plexmediaserver-plexpass/Plex_Media_Server"
pidfile=/var/run/plex/plex-daemon.pid
plexpidfile=/var/run/plex/plex-server.pid
command_args="-r -P $pidfile -f ${procname}"
start_precmd=plex_precmd
stop_precmd=plex_stop_precmd
stop_cmd=plex_stop

plex_precmd()
{
    #Set identification variables for FreeNAS; with fallback to FreeBSD
    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 SUPPORT_PATH="${plexmediaserver_plexpass_support_path}"
    export HOME="${plexmediaserver_plexpass_support_path}/Plex Media Server"
    export PYTHONHOME="/usr/local/share/plexmediaserver-plexpass/Resources/Python"
    export SCRIPTPATH="/usr/local/share/plexmediaserver-plexpass"
    export LD_LIBRARY_PATH="${SCRIPTPATH}/lib"
    export PLEX_MEDIA_SERVER_HOME="${SCRIPTPATH}"
    export PLEX_MEDIA_SERVER_MAX_PLUGIN_PROCS=${plexmediaserver_plexpass_maxplugins}
    export PLEX_MEDIA_SERVER_APPLICATION_SUPPORT_DIR=${plexmediaserver_plexpass_support_path}
    export PLEX_MEDIA_SERVER_PIDFILE=${plexpidfile}
    export PLEX_MEDIA_SERVER_LOG_DIR="${plexmediaserver_plexpass_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 ${plexpidfile%/*} ]; then
        install -d -o ${plexmediaserver_plexpass_user} ${plexpidfile%/*};
    fi
    
    if [ ! -d "${plexmediaserver_plexpass_support_path}/Plex Media Server" ]; then
        install -d -g ${plexmediaserver_plexpass_group} -o ${plexmediaserver_plexpass_user} "${plexmediaserver_plexpass_support_path}/Plex Media Server";
    fi

    if [ ! -d "${plexmediaserver_plexpass_support_path}/Plex" ]; then
        install -d -g ${plexmediaserver_plexpass_group} -o ${plexmediaserver_plexpass_user} "${plexmediaserver_plexpass_support_path}/Plex";
    fi
    
    if [ ${plexmediaserver_plexpass_tmp} ]; then
        export TMPDIR=${plexmediaserver_plexpass_tmp};
        install -d -g ${plexmediaserver_plexpass_group} -o ${plexmediaserver_plexpass_user} "${plexmediaserver_plexpass_tmp}";
    fi
}

plex_stop_precmd()
{
    killall -9 -u ${plexmediaserver_plexpass_user}
}

plex_stop()
{
    pkill -9 -F ${pidfile} >/dev/null 2>/dev/null
    return 0
}

run_rc_command "$1"


I'm guessing I either started up the wrong service or need to update some paths in here to have the root folder I've been using
 
Joined
Oct 22, 2019
Messages
3,641
Did you install Plex back in an earlier version of TrueNAS (such as FreeNAS 11.x)?
 

jimmypooh

Dabbler
Joined
Sep 17, 2011
Messages
41
Did you install Plex back in an earlier version of TrueNAS (such as FreeNAS 11.x)?
yes. I seem to remember having to mess with something back a couple years ago but I was on 12 at the time to get things to work. I suppose I can fully uninstall and reinstall, but that's going to take some time time. ugh.
 
Joined
Oct 22, 2019
Messages
3,641
What are the contents of /etc/rc.conf in the jail?
 
Joined
Oct 22, 2019
Messages
3,641
You can't simply "cat" or "nano" the file?
 

jimmypooh

Dabbler
Joined
Sep 17, 2011
Messages
41
Code:
root@plex-plexpass:/etc # nano rc.conf
nano: Command not found.
root@plex-plexpass:/etc # cat rc.conf
ifconfig_epair0b="SYNCDHCP"
 

jimmypooh

Dabbler
Joined
Sep 17, 2011
Messages
41
Winnie, Thanks so much for all of your help. I have to crash so I can be up in a few hours for work. I really appreciate your help! I'm going to have to pick this up tomorrow night.
 
Joined
Oct 22, 2019
Messages
3,641
Not sure why your rc.conf is lacking the necessary services and parameters. Is it really just a single line, as seen in your pasted output?

You can try to configure the Plex service to run automatically and use the proper directory for its database and config:
Code:
service plexmediaserver_plexpass onestop

sysrc plexmediaserver_plexpass_enable=YES

sysrc plexmediaserver_plexpass_support_path="/Plex Media Server"

service plexmediaserver_plexpass start


You can also confirm that the proper settings have been set by the above commands:
Code:
cat /etc/rc.conf
 

jimmypooh

Dabbler
Joined
Sep 17, 2011
Messages
41
Well, I gave up. I just rebuilt the Plex database. When I get to building my new server I'll either have to figure out a way to not use the plugins, or perhaps pivot to Unraid or Synology. Thanks for the help!
 

victort

Guru
Joined
Dec 31, 2021
Messages
973
Well, I gave up. I just rebuilt the Plex database. When I get to building my new server I'll either have to figure out a way to not use the plugins, or perhaps pivot to Unraid or Synology. Thanks for the help!
Depending on which services you want to use, you may be able to just run your own jails instead of having to use the plugins.
Check my signature for some already compiled scripts that will automatically install things like Nextcloud, Apache Guacamole, Plex and a few others.
 
Top