monit 'if failed port' not working

Bug #1804500 reported by Matei C.
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
monit (Ubuntu)
New
Undecided
Unassigned

Bug Description

Hello,

I am running Armbian Xenial 5.60 on a Rock64 single board computer, which is based on Ubuntu 16.04.

I have noticed that monit (xenial,now 1:5.16-2 arm64) does not detect when a port is closed on this particular setup.

For example, I have the below entry in my "monitrc" config file;

  check host MYHOST with address 192.168.1.12
    if failed port 4444 then alert

And although port 4444 is actually closed , monit does not view it closed... here's an extract of the debug log when starting monit as "monit -Iv"

  Socket test failed for [192.168.1.12]:4444 -- Connection refused
   'TEST' succeeded testing protocol [DEFAULT] at [192.168.1.12]:4444 [TCP/IP] [response time 0.701 ms]
   'TEST' connection succeeded to [192.168.1.12]:4444 [TCP/IP]

If I use a non existent IP to test, it seems to work and fail at the ping test, yet it cannot tell if a port is closed and always marks it as open.

* OS release:

  Description: Ubuntu 16.04.5 LTS
  Release: 16.04

* monit version

$ sudo apt show monit
Package: monit
Version: 1:5.16-2ubuntu0.2
Priority: extra
Section: universe/admin
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Sergey B Kirpichev <email address hidden>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 777 kB
Depends: libc6 (>= 2.17), libpam0g (>= 0.99.7.1), libssl1.0.0 (>= 1.0.2~beta3), lsb-base (>= 3.2-13)

Please let me know if more info is needed.

P.S.

I have another monit (5.20.0) running on a Raspian 9.6 which detects failed ports with no issues, so I believe this should work in monit 5.16 as well.

Thanks!

Matei C. (pisky)
description: updated
description: updated
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.