<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(166, 166, 166) solid;font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif;font-size:10pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(205, 230, 247);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 0px 6px 0px 6px;vertical-align:middle!important;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(205, 230, 247) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}.wf {speak:none; font-weight:normal; font-variant:normal; text-transform:none; -webkit-font-smoothing:antialiased; vertical-align:middle; display:inline-block;}.wf-family-owa {font-family:'o365Icons'}@font-face {  font-family:'o365IconsIE8';  src:url('prem/15.0.995.34/resources/styles/office365icons.ie8.eot?#iefix') format('embedded-opentype'),         url('prem/15.0.995.34/resources/styles/office365icons.ie8.woff') format('woff'),         url('prem/15.0.995.34/resources/styles/office365icons.ie8.ttf') format('truetype');  font-weight:normal;  font-style:normal;}@font-face {  font-family:'o365IconsMouse';  src:url('prem/15.0.995.34/resources/styles/office365icons.mouse.eot?#iefix') format('embedded-opentype'),         url('prem/15.0.995.34/resources/styles/office365icons.mouse.woff') format('woff'),         url('prem/15.0.995.34/resources/styles/office365icons.mouse.ttf') format('truetype');  font-weight:normal;  font-style:normal;}.wf-family-owa {font-family:'o365IconsMouse'}.ie8 .wf-family-owa {font-family:'o365IconsIE8'}.ie8 .wf-owa-play-large:before {content:'\e254';}.notIE8 .wf-owa-play-large:before {content:'\e054';}.ie8 .wf-owa-play-large {color:#FFFFFF/*$WFWhiteColor*/;}.notIE8 .wf-owa-play-large {border-color:#FFFFFF/*$WFWhiteColor*/; width:1.4em; height:1.4em; border-width:.1em; border-style:solid; border-radius:.8em; text-align:center; box-sizing:border-box; -moz-box-sizing:border-box; padding:0.1em; color:#FFFFFF/*$WFWhiteColor*/;}.ie8 .wf-size-play-large {width:40px; height:40px; font-size:30px}.notIE8 .wf-size-play-large {width:40px; height:40px; font-size:30px}.notIE8 .wf-owa-triangle-down-small:before {content:'\e052';}.ie8 .wf-owa-triangle-down-small:before { content:'\e052';}.ie8 .wf-owa-triangle-down-small {color:#666666/*$WFGreyColor*/;}.wf-size-x20 {font-size: 20px!important;}
<!--
p
        {margin-top:0;
        margin-bottom:0}
.ms-cui-menu
        {background-color:#ffffff;
        border:1px rgb(166,166,166) solid;
        font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif;
        font-size:10pt;
        color:rgb(51,51,51)}
.ms-cui-menusection-title
        {}
.ms-cui-ctl
        {vertical-align:text-top;
        text-decoration:none;
        color:rgb(51,51,51)}
.ms-cui-ctl-on
        {background-color:rgb(205,230,247)}
.ms-cui-img-cont-float
        {display:inline-block;
        margin-top:2px}
.ms-cui-smenu-inner
        {padding-top:0px}
.ms-owa-paste-option-icon
        {margin:0px 6px 0px 6px;
        vertical-align:middle!important;
        padding-bottom:2px;
        display:inline-block}
.ms-rtePasteFlyout-option
        {padding:8px 4px 8px 4px;
        outline:none}
.ms-cui-menusection
        {float:left;
        width:85px;
        height:24px;
        overflow:hidden}
.wf
        {speak:none;
        font-weight:normal;
        font-variant:normal;
        text-transform:none;
        vertical-align:middle;
        display:inline-block}
.wf-family-owa
        {font-family:'o365Icons'}
@font-face
        {font-family:'o365IconsIE8';
        font-weight:normal;
        font-style:normal}
@font-face
        {font-family:'o365IconsMouse';
        font-weight:normal;
        font-style:normal}
.wf-family-owa
        {font-family:'o365IconsMouse'}
.ie8 .wf-family-owa
        {font-family:'o365IconsIE8'}
.notIE8 .wf-owa-play-large
        {border-color:#FFFFFF;
        width:1.4em;
        height:1.4em;
        border-width:.1em;
        border-style:solid;
        text-align:center;
        padding:0.1em;
        color:#FFFFFF}
.ie8 .wf-size-play-large
        {width:40px;
        height:40px;
        font-size:30px}
.notIE8 .wf-size-play-large
        {width:40px;
        height:40px;
        font-size:30px}
.wf-size-x20
        {font-size:20px!important}
.ms-cui-menu
        {background-color:#ffffff;
        border:1px rgb(166,166,166) solid;
        font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif;
        font-size:10pt;
        color:rgb(51,51,51)}
.ms-cui-ctl
        {vertical-align:text-top;
        text-decoration:none;
        color:rgb(51,51,51)}
.ms-cui-ctl-on
        {background-color:rgb(205,230,247)}
.ms-cui-img-cont-float
        {display:inline-block;
        margin-top:2px}
.ms-cui-smenu-inner
        {padding-top:0px}
.ms-owa-paste-option-icon
        {margin:0px 6px 0px 6px;
        vertical-align:middle!important;
        padding-bottom:2px;
        display:inline-block}
.ms-rtePasteFlyout-option
        {padding:8px 4px 8px 4px;
        outline:none}
.ms-cui-menusection
        {float:left;
        width:85px;
        height:24px;
        overflow:hidden}
.wf
        {speak:none;
        font-weight:normal;
        font-variant:normal;
        text-transform:none;
        vertical-align:middle;
        display:inline-block}
.wf-family-owa
        {font-family:'o365Icons'}
@font-face
        {font-family:'o365IconsIE8';
        font-weight:normal;
        font-style:normal}
@font-face
        {font-family:'o365IconsMouse';
        font-weight:normal;
        font-style:normal}
.wf-family-owa
        {font-family:'o365IconsMouse'}
.ie8 .wf-family-owa
        {font-family:'o365IconsIE8'}
.notIE8 .wf-owa-play-large
        {border-color:#FFFFFF;
        width:1.4em;
        height:1.4em;
        border-width:.1em;
        border-style:solid;
        text-align:center;
        padding:0.1em;
        color:#FFFFFF}
.ie8 .wf-size-play-large
        {width:40px;
        height:40px;
        font-size:30px}
.notIE8 .wf-size-play-large
        {width:40px;
        height:40px;
        font-size:30px}
.wf-size-x20
        {font-size:20px!important}
.ms-cui-menu
        {background-color:#ffffff;
        border:1px rgb(166,166,166) solid;
        font-family:"Segoe UI","Segoe WP","Segoe UI WPC",Tahoma,Arial,sans-serif;
        font-size:10pt;
        color:rgb(51,51,51)}
.ms-cui-ctl
        {vertical-align:text-top;
        text-decoration:none;
        color:rgb(51,51,51)}
.ms-cui-ctl-on
        {background-color:rgb(205,230,247)}
.ms-cui-img-cont-float
        {display:inline-block;
        margin-top:2px}
.ms-cui-smenu-inner
        {padding-top:0px}
.ms-owa-paste-option-icon
        {margin:0px 6px 0px 6px;
        vertical-align:middle!important;
        padding-bottom:2px;
        display:inline-block}
.ms-rtePasteFlyout-option
        {padding:8px 4px 8px 4px;
        outline:none}
.ms-cui-menusection
        {float:left;
        width:85px;
        height:24px;
        overflow:hidden}
.wf
        {speak:none;
        font-weight:normal;
        font-variant:normal;
        text-transform:none;
        vertical-align:middle;
        display:inline-block}
.wf-family-owa
        {font-family:'o365Icons'}
@font-face
        {font-family:'o365IconsIE8';
        font-weight:normal;
        font-style:normal}
@font-face
        {font-family:'o365IconsMouse';
        font-weight:normal;
        font-style:normal}
.wf-family-owa
        {font-family:'o365IconsMouse'}
.ie8 .wf-family-owa
        {font-family:'o365IconsIE8'}
.notIE8 .wf-owa-play-large
        {border-color:#FFFFFF;
        width:1.4em;
        height:1.4em;
        border-width:.1em;
        border-style:solid;
        text-align:center;
        padding:0.1em;
        color:#FFFFFF}
.ie8 .wf-size-play-large
        {width:40px;
        height:40px;
        font-size:30px}
.notIE8 .wf-size-play-large
        {width:40px;
        height:40px;
        font-size:30px}
.wf-size-x20
        {font-size:20px!important}
-->
--></style>
</head>
<body dir="ltr" style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri; font-size:12pt"><span lang="en-AU">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> Jeremy Laidman <jlaidman@rebel-it.com.au><br>
<b>Sent:</b> Friday, 8 April 2016 10:11 AM<br>
<b>To:</b> Phil Crooker; xymon@xymon.com<br>
<b>Subject:</b> Re: [Xymon] TCPtest open connection issue</font>
<div> </div>
</div>
<div style="margin:14pt 0 10pt 0"><font face="Tahoma,sans-serif" size="2"><span style="font-size:10pt"><b></b></span></font></div>
</span></div>
</div>
<div style="color:rgb(33,33,33)">
<div>
<div dir="ltr">Hi Phil
<div><br>
<div class="gmail_quote">
<div dir="ltr">On Thu, Apr 7, 2016 at 3:27 PM Phil Crooker <<a href="mailto:Phil.Crooker@orix.com.au">Phil.Crooker@orix.com.au</a>> wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div dir="ltr" style="font-size:12pt; color:#000000; background-color:#ffffff; font-family:Calibri,Arial,Helvetica,sans-serif">
<p>I'm having a problem with a spurious error reported by xymonnet on upgrading to 4.3.27:</p>
<p><span style="font-size:12pt">Error output:</span><br>
</p>
<p>TCPtest error 1 seen on open connection for žo.cvs<br>
TCPtest error 1 seen on open connection for ° |.squid<br>
TCPtest error 1 seen on open connection for  v.squid<br>
TCPtest error 1 seen on open connection for s.squid<br>
<br>
</p>
<p>If I substitute an earlier version of xymonnet (4.3.21), the error disappears. I put the 4.3.27 version back in, restart, and the errors return. There is nothing wrong with the hostname and these tests are not producing any 'real' errors. I am testing for a
 squid service on 5 hosts and cvs on one.  <br>
</p>
</div>
</blockquote>
<div><br>
</div>
<div>This is in some new code introduced in v4.3.25, to give more detailed errors for some connected-but-fail error conditions when doing TCP tests.  Previously, it was a binary result: either the EXPECT string matched, or the test failed in some way, without
 any indication as to why.  (You didn't say if you've defined [cvs] and [squid] sections in protocols.cfg, but I'm assuming you have.)</div>
<div><br>
</div>
<div>The error is probably benign - error 1 means timeout (although it's not clear to me how a timeout condition can exist on a connected socket, but maybe it's an expect error condition).  More importantly, the message appears to be displaying a memory location
 that has not been initialised, which suggests a stray or incorrectly-cast pointer is being used for the hostname.</div>
<div><br>
</div>
<div>I think the offending bit of code (in xymonnet.c) is this:</div>
<div><br>
</div>
<div>    errprintf("TCPtest error %d seen on open connection for %s.%s\n", tcptest->errcode, test->host, test->service->testname);<br>
</div>
<div><br>
</div>
<div>and should be something like this (untested):</div>
<div><br>
</div>
<div>
<div>    errprintf("TCPtest error %d seen on open connection for %s.%s\n", tcptest->errcode, test->host->hostname, test->service->testname);<br>
</div>
</div>
<div><br>
</div>
<div>If you feel like testing this out, you can do so without replacing your entire Xymon installation.  Simply adjust xymonnet.c and recompile, copy the newly made xymonnet into /tmp/xymonnet, and adjust the CMD line in tasks.cfg to use /tmp/xymonnet instead
 of xymonnet.</div>
<div><br>
</div>
<div>This won't stop the error message.  But instead you'll see the target hostname in place of hieroglyphics.  To stop the message, you need to find out what's causing the fault.  If this is happening on every test, you might find something interesting in
 a packet dump.  Alternatively, check the logs of the service at the other end to see if it tells you what the problem is.</div>
<div><br>
</div>
<div>Cheers<br>
</div>
<div>Jeremy</div>
<div>----------------------------------<br>
<br>
Hi Jeremy,<br>
<br>
Yep, the test->host->hostname fixed the hostname problem (I had tried host->hostname before but didn't realise it was in test):
<p><br>
</p>
<p>Error output:<br>
TCPtest error 1 seen on open connection for host1.orix.com.au.cvs<br>
TCPtest error 1 seen on open connection for host2.orix.com.au.squid<br>
TCPtest error 1 seen on open connection for host3.orix.com.au.squid<br>
TCPtest error 1 seen on open connection for host4.orix.com.au.squid<br>
</p>
<p><br>
</p>
<p>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:</p>
<p><br>
</p>
<p> [squid]<br>
   port 3128<br>
<br>
</p>
<p>thanks Phil<br>
</p>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>