Monit - Error receiving data -- Connection reset by peer ??
Posted: Saturday 30 September 2017 15:37
Installed Monit as per instructions in the wiki. But somehow I can not get it to work properly.
Running on a Pi 3 connected to a wired network. Installation is done using default settings.
This is my log:
These are my settings in the /etc/monit/monitrc (snipped to show only the information regarding Domoticz)
The web interface shows me "connection failed" for Domoticz.
Any help appreciated!
Greetz,
Sjonnie
Edit: These are the contents of the email I get from monit (so notification works
)
Running on a Pi 3 connected to a wired network. Installation is done using default settings.
This is my log:
Code: Select all
[CEST Sep 30 15:14:02] info : Starting Monit 5.20.0 daemon with http interface at [*]:2812
[CEST Sep 30 15:14:02] info : Monit start delay set to 300s
[CEST Sep 30 15:19:02] info : 'RPi3' Monit 5.20.0 started
[CEST Sep 30 15:19:04] error : 'domoticz' failed protocol test [HTTP] at [127.0.0.1]:8080/json.htm?type=command¶m=getversion [TCP/IP] -- Connection refused
[CEST Sep 30 15:19:46] error : Denied connection from non-authorized client [127.0.0.1]
[CEST Sep 30 15:19:46] error : Error receiving data -- Connection reset by peer
Code: Select all
set daemon 300 # check services at 2-minute intervals
with start delay 300 # optional: delay the first check by 4-minutes (by
# # default Monit check immediately after Monit start)
(snip)
set mailserver smtp.gmail.com port 587
username "[email protected]" password "PASSWORD" (of course changed it to the correct values)
using tlsv1
without timeout 30 seconds
set alert [email protected] (of course changed it to the correct values)
(snip)
set httpd port 2812 and
use address 0.0.0.0 # only accept connection from localhost
allow 0.0.0.0/0.0.0.0 # allow localhost to connect to the server and
allow admin: monit # require user 'admin' with password 'monit'
(snip)
check process domoticz with pidfile /var/run/domoticz.pid
start program = "/etc/init.d/domoticz.sh start"
stop program = "/etc/init.d/domoticz.sh stop"
if failed
url http://127.0.0.1:8080/json.htm?type=command¶m=getversion
and content = '"status" : "OK"'
for 2 cycles
then restart
if 5 restarts within 5 cycles then exec "/sbin/reboot"
Any help appreciated!

Greetz,
Sjonnie
Edit: These are the contents of the email I get from monit (so notification works

Code: Select all
Connection failed Service domoticz
Date: Sat, 30 Sep 2017 15:29:06
Action: restart
Host: RPi3
Description: failed protocol test [HTTP] at [127.0.0.1]:8080/json.htm?type=command¶m=getversion [TCP/IP] -- Connection refused
Your faithful employee,
Monit