Xymon Mailing List Archive search

TCPtest open connection issue

list Jeremy Laidman
Fri, 08 Apr 2016 07:10:49 +0000
Message-Id: <CAAnki7AQrVXsCimx8DJ-zAvWn+1df6GfJ110aJdDerrysK=user-5a0e34f48eed@xymon.invalid>

On Fri, Apr 8, 2016 at 3:27 PM Phil Crooker <user-e8e31cd73303@xymon.invalid>
wrote:

I found if I remove the "options banner" from the protocols.cfg entry,
the TCPtest error goes away. The entries now just have the port number:

 [squid]

   port 3128
Phil, so you were asking for a banner, but not sending anything?  This may
be your problem.  Both HTTP proxy and CVS protocols return nothing until
you send something.  Eventually it will time out and close the connection,
which may be why you received an error code "1" even though the socket
connected OK.  Perhaps try something like so (untested):

[squid]
   send "HEAD / HTTP/1.0\r\n\r\n"
   expect "HTTP/1.1"
   options banner
   port 3128

[cvs]
   send "BEGIN VERIFICATION REQUEST\n\nxymon\n\nEND VERIFICATION REQUEST\n"
   expect "I .... YOU"
   options banner
   port 2401

These "send" strings not only cause a normal squid/cvs server to close a
connection promptly, they also cause the server to send something that can
be displayed in the banner.

Cheers
Jeremy