Monit - installation problems
|
Posts: 201
Threads: 30
Joined: Aug 2015
Reputation:
7
[Solved]
Jan 26, 2016, 07:45 PM
(This post was last modified: Jan 26, 2016, 07:50 PM by chenks.)
https seemed to be enabled by default during install... i definitely didn't tell it to use https
ah yes, your guide has ssl set to enable.
ok monit is now working via the redirect.
i've added the two PMS ports 32400 and 32401, i didn't add the other as they just seem to be plugins?
monit has plex listed now, and as running.
so i tested it by stopping the plex server, monit updated to show it not running.
it then tried to restart it but it failed with an error.
i had to manually restart plex myself.
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jan 26, 2016, 09:09 PM
What was the monit error? The logs for monit should be in /var/log/monit.log.
Ahh you are running plugins, that could be the issue. Which plugins are you running? Have you tried disabling them to see if the issue disappears?
You can also try changing /usr/sbin/service to /etc/init.d/plexmediaserver start in the monit configuration file
Posts: 201
Threads: 30
Joined: Aug 2015
Reputation:
7
[Solved]
Jan 26, 2016, 09:21 PM
(This post was last modified: Jan 26, 2016, 09:23 PM by chenks.)
am i running plugins?
if i am they must be stock, i haven't enabled any.
in the error log is this
Code:
[GMT Jan 26 18:32:25] error : 'plexmediaserver' process is not running
[GMT Jan 26 18:32:26] info : 'plexmediaserver' trying to restart
[GMT Jan 26 18:32:26] info : 'plexmediaserver' start: /usr/sbin/service
[GMT Jan 26 18:33:27] error : 'plexmediaserver' failed to start (exit status 0) -- no output
[GMT Jan 26 18:34:29] info : 'plexmediaserver' process is running with pid 12237
[GMT Jan 26 18:34:31] info : 'plexmediaserver' process is running after previous exec error (slow starting or $
this is what i have in the /etc/monit/confi.d/plex
Code:
check process plexmediaserver with pidfile "/var/lib/plexmediaserver/Library/Application\ Support/Plex\ Media\ Ser$
start program = "/usr/sbin/service plexmediaserver start" with timeout 60 seconds
stop program = "/usr/sbin/service plexmediaserver stop"
if failed host 127.0.0.1 port 32400 for 5 cycles then restart
if failed port 32401 for 5 cycles then restart
if failed url http://127.0.0.1:32400/web/index.html for 5 cycles then restart
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jan 26, 2016, 09:30 PM
How long did you wait for monit to restart the service?
Two things to try, increase the timeout from 60 to 120 seconds
Change /usr/sbin/service plexmediaserver start to /etc/init.d/plexmediaserver start
Then kill plex like in the guide and wait 2 minutes
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jan 26, 2016, 09:36 PM
Also please let me know if you reverse proxy to https or http for monit now or not. I'd like to know if it works for both even if nginx isn't running https, could you test it?
Posts: 201
Threads: 30
Joined: Aug 2015
Reputation:
7
[Solved]
Jan 26, 2016, 09:37 PM
(This post was last modified: Jan 26, 2016, 09:43 PM by chenks.)
i waited for monit to update it's status on the webui, which said it failed to restart it.
i'll try again just now before changing anything and post the results.
so what about those plex plugins?
edit - so manually killed the service and this time monit did manage to restart it.
however the monit webui took an age to reflect the fact the service had stopped.
it had already started the restart process by the time the webui said "does not exist"
(Jan 26, 2016, 09:36 PM)Mike Wrote: Also please let me know if you reverse proxy to https or http for monit now or not. I'd like to know if it works for both even if nginx isn't running https, could you test it?
i changed ssl to disable in the monit config and nginx now works fine.
your guide has ssl enabled.
haven't retested it with ssl enabled though.
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Jan 28, 2016, 06:27 AM
Let me know when you do so I can update the guides, thanks
Posts: 23
Threads: 4
Joined: Feb 2016
Reputation:
4
[Solved]
Feb 15, 2016, 09:30 AM
Hi Mike,
I have an issue with Monit. I have set it up as in your guide for monitoring several services (Couchpotato, SickRage, Transmission, and so on). The issue is that every day, it send over 200 emails for Transmission with this text:
Connection failed Service Transmission
Date: Sat, 13 Feb 2016 19:03:05
Action: restart
Host: raspberrypi
Description: failed, cannot open a connection to INET[127.0.0.1:51413] via TCP
Connection succeeded Service Transmission
Date: Sat, 13 Feb 2016 18:56:56
Action: alert
Host: raspberrypi
Description: connection succeeded to INET[127.0.0.1:51413] via TCP
This is the only service that gives so many alerts, the others work as intended - when PID changes or when the service is stopped - started - but only 1-2 messages.
Do you have any idea why is it triggering so many messages?
Posts: 1,646
Threads: 2
Joined: Aug 2015
Reputation:
42
[Solved]
Feb 15, 2016, 09:52 AM
Monit can be impatient, try adding with timeout 30 seconds or removing the bottom line
Code:
if failed host 127.0.0.1 port 51413 with timeout 30 seconds then restart
Even more relaxed version
Code:
if failed host 127.0.0.1 port 51413 with timeout 30 seconds for 3 cycles then restart
Posts: 23
Threads: 4
Joined: Feb 2016
Reputation:
4
[Solved]
Feb 15, 2016, 10:42 AM
Thank you Mike, I have done the modification to the config file for transmission. After reload only the notification that monit has loaded came up. I will monitor it and report if it misbehaves again.
Thank you.
|
|
Recent Posts
|
About Swap
jonescelinaa Apr 10, 2024, 06:58 AM
|
Tracker Status: Error Connection Time Out
jonesPhedra Apr 04, 2024, 08:17 AM
|
Split Tunnel Docker Containers
jonesPhedra Mar 27, 2024, 03:10 AM
|
Plex server not powerful enough, but only with s...
jonesPhedra Mar 27, 2024, 03:02 AM
|
game Geometry Dash Scratch
jonescelinaa Jan 31, 2024, 04:21 AM
|
Latest unread posts | Unanswered posts |
|