What is process name for PlexPass Plugin

TheRiceMan

Dabbler
Joined
Sep 15, 2020
Messages
20
Periodically my PlexPass stops running. I want to use CRON to restart my PlexPass plugin periodically. I was successful in doing this with Jails on the old system.
For PlexPass plugin, what process name is appropriate to cause the process to be called to complete a onerestart.

Code:
root@freenas:~ # service plexpass onerestart
plexpass does not exist in /etc/rc.d or the local startup
directories (/etc/ix.rc.d /usr/local/etc/rc.d), or is not executable
root@freenas:~ #
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
It looks to me you are trying to restart plex in FreeNAS itself and not inside the plugin.
 

TheRiceMan

Dabbler
Joined
Sep 15, 2020
Messages
20
correct. From CRON so I am not in the plugin.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
Use the cron inside the plugin. If there is no cron in the plugin, read the output of iocage --help, the exec option is probably your friend.
 

TheRiceMan

Dabbler
Joined
Sep 15, 2020
Messages
20
ok - the real question is regarding the name of the plugin service. I do not think the service name "PlexPass" is accurate. I'm wondering how I can determine the proper name for the service.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
You should check the /etc/rc.conf file of the plugin. The to be started services should be there.
You can also get a list of all available services with the service -l command.
 

TheRiceMan

Dabbler
Joined
Sep 15, 2020
Messages
20
ok - i figured it out.
First step is to find the name of the plugin using iocage list
Code:
root@freenas:~ # iocage list
+-----+----------+-------+--------------+--------------+
| JID |   NAME   | STATE |   RELEASE    |     IP4      |
+=====+==========+=======+==============+==============+
| 2   | PlexPass | up    | 11.3-RELEASE | 192.168.0.26 |
+-----+----------+-------+--------------+--------------+

Then cause it to restart using iocage restart PlexPass
Code:
root@freenas:~ # iocage restart PlexPass
* Stopping PlexPass
  + Executing prestop OK
  + Stopping services OK
  + Tearing down VNET OK
  + Removing devfs_ruleset: 5 OK
  + Removing jail process OK
  + Executing poststop OK
No default gateway found for ipv6.
* Starting PlexPass
  + Started OK
  + Using devfs_ruleset: 5
  + Configuring VNET OK
  + Using IP options: vnet
  + Starting services OK


Now I can create a CRON for this.
 

Fredda

Guru
Joined
Jul 9, 2019
Messages
608
OK, now I get what you wanted to achieve in the first time. Keep in mind that this restarts the complete plugin and not only the plexpass service running inside the pluginjail.
 

TheRiceMan

Dabbler
Joined
Sep 15, 2020
Messages
20
ideally, i would prefer to onerestart the service from within the iocage, but i didnt know the service name. i assumed that plexpass has a common defined service name and was hoping someone may know it. For now this gets me going. I might come back later to tweak this more. the iocage is only running the pexpass plugin so perhaps nothing more to gain as compared to restarting the iocage.
 

Mlovelace

Guru
Joined
Aug 19, 2014
Messages
1,111
ideally, i would prefer to onerestart the service from within the iocage, but i didnt know the service name. i assumed that plexpass has a common defined service name and was hoping someone may know it. For now this gets me going. I might come back later to tweak this more. the iocage is only running the pexpass plugin so perhaps nothing more to gain as compared to restarting the iocage.
should be
Code:
iocage exec plexpass service plexmediaserver_plexpass restart


If you want to check the service name run
Code:
iocage exec plexpass cat /etc/rc.conf
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
ideally, i would prefer to onerestart the service from within the iocage, but i didnt know the service name. i assumed that plexpass has a common defined service name and was hoping someone may know it. For now this gets me going. I might come back later to tweak this more. the iocage is only running the pexpass plugin so perhaps nothing more to gain as compared to restarting the iocage.
Periodically my PlexPass stops running. I want to use CRON to restart my PlexPass plugin periodically. I was successful in doing this with Jails on the old system.
For PlexPass plugin, what process name is appropriate to cause the process to be called to complete a onerestart.

Code:
root@freenas:~ # service plexpass onerestart
plexpass does not exist in /etc/rc.d or the local startup
directories (/etc/ix.rc.d /usr/local/etc/rc.d), or is not executable
root@freenas:~ #
You should fix the problem instead of putting a band-aid on it. Plex doesn't just die and bed restarting.
 

TheRiceMan

Dabbler
Joined
Sep 15, 2020
Messages
20
@SweetAndLow
Totally agree with you. First things first though. I needed to get this up and running for the family. So solution provided above does that. :smile:
Next question is where to look for the problem and how to resolve the underlying issue.
A little coaching would be good here. Should I create a new post?
Is there a "log" that I can check that could give me an indication? Where would I find that and access it?
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
hardware specs? Are you using the plugin or just a jail? What plex version are you running? the logs are located in /usr/local/plexdata[-plexpass]/Plex\ Media\ Server/Logs/ -- depending on if you are running plexpass or not the directory name will be different.

Essentially plex should run 24/7 forever. It should never crash, a crash is mostly likely due to hardware limitations such as memory or a config mess up.
 

TheRiceMan

Dabbler
Joined
Sep 15, 2020
Messages
20
Hardware specs, I'm using a HP Z820 (1) E5-2687W 32GB ECC RAM.
PlexPass is the PLUGIN. The IOCage is on my primary pool "RiceCloud".
I'll need to check my system for the logs. I'll check and post here once I get a chance.
 

TheRiceMan

Dabbler
Joined
Sep 15, 2020
Messages
20
checked the logs and didn't see anything of consequence in there. perhaps I'm being overly concerned.
 

SweetAndLow

Sweet'NASty
Joined
Nov 6, 2013
Messages
6,421
checked the logs and didn't see anything of consequence in there. perhaps I'm being overly concerned.
next time it crashes you should check to see if the processes is actually down.
 
Top