<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style>
</head>
<body class='hmmessage'>
<div><br></div><div>Hi all,</div><div><br></div><div>Any ideas? Thanks<span class="Apple-style-span" style="font-size: 13.2px; ">&nbsp;in advanced.</span></div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-size: 13.2px; ">---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></div><div><span class="Apple-style-span" style="font-size: 13.2px; "></span><meta http-equiv="content-type" content="text/html; charset=utf-8"><span class="Apple-style-span" style="font-size: 13.2px; ">---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</span></div><div><span class="Apple-style-span" style="font-size: 13.2px; "></span><br>

<meta http-equiv="Content-Type" content="text/html; charset=unicode">
<meta name="Generator" content="Microsoft SafeHTML">
<style>
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}

</style>


Hi all,<div style="background-image:initial;background-attachment:initial;background-color:rgb(255, 255, 191);border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-style:initial;border-color:initial;color:rgb(0, 0, 0);margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px;font-family:arial, sans-serif;font-size:13px;font-style:normal;font-variant:normal;font-weight:normal;height:auto;line-height:normal;text-align:left;width:auto;direction:ltr;z-index:99995;background-position:initial initial;background-repeat:initial initial"></div><div><br></div><div>I installed rrdtool in a Centos 5.5 server , the rrdtool is accessed by a Java program through a socket:</div><div><br></div><div><br></div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;SocketAddress sa = new InetSocketAddress(config.getRrdServiceHost(), config.getRrdServicePort());</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;Socket socket = new Socket();</div></div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;PrintWriter out = new PrintWriter(new OutputStreamWriter(socket.getOutputStream()));</div></div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;String command = StringUtils.join(new String[]{</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"create", rrdFileRel,</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"--start", Long.toString(timestamp - config.getStartTimeOffset()),</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"--step", "300",</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"DS:ds0:" + type + ":900:U:U",</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;"RRA:AVERAGE:0.5:1:8640", // 1 month of real values (30d/300s=8640)</div></div><div><br></div><div><br></div><div>And the reply is read like this:</div><div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;out.println(command);</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;out.flush();</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;response = in.readLine();</div><div><br></div><div><br></div><div>The snippet above works most of the time, but for some reason after some dozens of graphics are generated the RRDTOOL closes unexpectedly the sockets it get invoked through, I alredy took a TCP-dump and it can observed hot the RRDTOOL is invoked successfully many times but&nbsp;unexpectedly&nbsp;closes the connection:</div><div><br></div><div><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">create file:mycounter13180/stats.mycom.rrd --start 1286986228 --step 300 DS:ds0:ABSOLUTE:900:U:U ...</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">Reply:</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">OK u:0.00 s:0.01 r:0.01</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">But the last invocation fails:</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">create file:anothercounter13180/stats.mycom.rrd --start 1286986228 --step 300 DS:ds0:ABSOLUTE:900:U:U ...<br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">Reply:</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">none</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">Thus, the socket suddenly gets closed.</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">ERROR 2010-10-13 12:10:39,126 [ ] [stat-runner-1] com.colibria.imps.statistics.service.StatisticsService.run - Failed to read stat from imps nodes</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">java.net.SocketException: Connection reset</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.net.SocketInputStream.read(Unknown Source)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.nio.cs.StreamDecoder.readBytes(Unknown Source)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.nio.cs.StreamDecoder.implRead(Unknown Source)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at sun.nio.cs.StreamDecoder.read(Unknown Source)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.io.InputStreamReader.read(Unknown Source)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.io.BufferedReader.fill(Unknown Source)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.io.BufferedReader.readLine(Unknown Source)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at java.io.BufferedReader.readLine(Unknown Source)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse"><br></span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;at com.colibria.imps.statistics.service.StatisticsService.createRrdFile(StatisticsService.java:357)</span><span class="ecxApple-style-span" style="font-family:Arial, sans-serif;font-size:12px;border-collapse:collapse">&nbsp;</span></div><div><br></div></div><div>Please assist, thanks in advanced.</div><div><br></div><div>///RGB</div><div><br></div><div><br></div>                                               
<br>_______________________________________________
rrd-users mailing list
rrd-users@lists.oetiker.ch
https://lists.oetiker.ch/cgi-bin/listinfo/rrd-users<div style="background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 191); border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; font-family: arial, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; height: auto; line-height: normal; text-align: left; width: auto; direction: ltr; z-index: 99995; background-position: initial initial; background-repeat: initial initial; "></div></div>                                               </body>
</html>