Then back in the Monit web interface you will see a screen like this, wait a minute and it should pop back up as runningįor those of you using reverse proxies, it is easy to add Monit to nginx or Apache. You will now see a plexmediaserver processīack in SSH kill the Plex process like this (thanks to Stackoverflow) assuming your Plex server runs as the plex user. Then reload Monit to activate the configuration sudo service monit reload Should see the message below, you may also see nothing which means the syntax is ok Control file syntax OK You can also check the web interface and remove any ports that are causing trouble.Ī simplified Plex Monit configuration would be something like this check process plexmediaserver with pidfile "/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/plexmediaserver.pid"Ĭheck the Monit configuration has valid syntax sudo monit -t If failed url with timeout 60 seconds for 5 cycles then restart If failed port 1909 with timeout 60 seconds for 5 cycles then restart If failed port 32469 with timeout 60 seconds for 5 cycles then restart If failed port 32401 with timeout 60 seconds for 5 cycles then restart If you find Plex is restarting when you don't want it to then increase the timeout in the failed port lines if failed host 127.0.0.1 port 32400 with timeout 60 seconds for 5 cycles then restart Stop program = "/etc/init.d/plexmediaserver stop" start program = "/etc/init.d/plexmediaserver start" with timeout 60 seconds If you have issues with the monit configuration try changing these lines to specifically use the init.d script if you are on Debian or Ubuntu. If failed url with timeout 30 seconds for 5 cycles then restart If failed port 1909 with timeout 30 seconds for 5 cycles then restart If failed port 32469 with timeout 30 seconds for 5 cycles then restart If failed port 32401 with timeout 30 seconds for 5 cycles then restart If failed host 127.0.0.1 port 32400 with timeout 30 seconds for 5 cycles then restart Stop program = "/usr/sbin/service plexmediaserver stop" Start program = "/usr/sbin/service plexmediaserver start" with timeout 60 seconds Tests if the default Plex management web interface is availableĬheck process plexmediaserver with pidfile "/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Server/plexmediaserver.pid".Tests if 32400, 32401, 32469 and 1909 port is open on the loopback address 5 times and if Plex isn't running, Monit restarts the Plex service automatically. Monitors the existence of the plexmediaserver.pid file, if it is no longer present plex will be restarted.Here is what the Plex monit configuration does Paste the code below, note that most of these are optional but at a minimum you will want the first 4 lines. Then go back to the SSH terminal.Ĭreate the Plex media server on ARM monit configuration sudo nano /etc/monit/conf.d/plex Now open a browser and go to your local ip: and enter your credentials. Plex Media Server runs on more than just 32400 so we will use Monit to monitor these ports tcp 0 0 0.0.0.0: 32400 0.0.0.0:* LISTEN 15053/Plex Media Se Make sure Plex is running on your device and execute this netstat command to get all listening ports on your system and filter the Plex ones. Monitor and Autorestart Plex Media Server Service Failureįigure out which ports to monitor using netstat first.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |