Connection testing failed all the time

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Connection testing failed all the time

Lutz Mader
Hi all folks,
I try to monitor some ports, but the monit connection testing failed all
the time.

I try something like this.
if failed port 54320 the alert
if failed port 54321 the alert

The ports are available (from the application log).
ODBC local server macbookpro.local:54320
JDBC local server macbookpro.local:54321

And I can connect to port 54321 with a jdbc application (using
"teiid-9.0.1-jdbc.jar") and to port 54320 with an odbc application.
I checked the available protocol list, but a specific protocol for jdbc
or odbc ports is not available.

The connection testing to a Postgres DB running on the same system works
well. I use this.
if failed port 5432 protocol pgsql the alert

Any suggestion how to do a more detail testing to find out what is going
wrong.

With regards,
Lutz

--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

Re: Connection testing failed all the time

martinp@tildeslash.com
Hi,

if you don't set the address in the port test, monit will try to connect to "localhost". It is possible that these ports are bound only on specific address and thus monit cannot connect via 127.0.0.1:54320.

You can use for example "lsof -nPi tcp | grep 5432 | grep LISTEN" to verify the address. You can then add it to the test using the "host" option, for example:

        if failed host 10.2.3.4 port 54320 the alert

Best regards,
Martin


> On 15 Feb 2017, at 22:34, Lutz Mader <[hidden email]> wrote:
>
> Hi all folks,
> I try to monitor some ports, but the monit connection testing failed all
> the time.
>
> I try something like this.
> if failed port 54320 the alert
> if failed port 54321 the alert
>
> The ports are available (from the application log).
> ODBC local server macbookpro.local:54320
> JDBC local server macbookpro.local:54321
>
> And I can connect to port 54321 with a jdbc application (using
> "teiid-9.0.1-jdbc.jar") and to port 54320 with an odbc application.
> I checked the available protocol list, but a specific protocol for jdbc
> or odbc ports is not available.
>
> The connection testing to a Postgres DB running on the same system works
> well. I use this.
> if failed port 5432 protocol pgsql the alert
>
> Any suggestion how to do a more detail testing to find out what is going
> wrong.
>
> With regards,
> Lutz
>
> --
> To unsubscribe:
> https://lists.nongnu.org/mailman/listinfo/monit-general


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general
Reply | Threaded
Open this post in threaded view
|

RE: Re: Connection testing failed all the time

Lutz Mader
In reply to this post by Lutz Mader
Hi Martin,
sorry, yes, you are right.

> if failed host macbookpro.local port 54320 the alert

The application was bind to an address and not to localhost.
port response time           0.624 ms to macbookpro.local:54321 type TCP/IP  protocol DEFAULT
port response time           0.423 ms to macbookpro.local:54320 type TCP/IP  protocol DEFAULT

Everything works well.

Thanks for your help,
Lutz




---
Die Bundesliga hat begonnen! Alle Tore, alle Ergebnisse, alle News: Pocket Liga jetzt im https://app.adjust.com/dpynzd oder https://app.adjust.com/dpynzd herunterladen - kostenlos!


--
To unsubscribe:
https://lists.nongnu.org/mailman/listinfo/monit-general