<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Socket &amp;amp; IP (timeout) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949056#M577420</link>
    <description>I just checked and there are several patches which effect socket performance.  It might be a good idea to check out:&lt;BR /&gt;&lt;BR /&gt;PHNE_26771 &lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;PHKL_22840/PHKL_25613 &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www2.itrc.hp.com/service/patch/mainPage.do" target="_blank"&gt;http://www2.itrc.hp.com/service/patch/mainPage.do&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;See if anything in them looks like it might be causing your problem.&lt;BR /&gt;&lt;BR /&gt;Ron&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 11 Apr 2003 14:00:14 GMT</pubDate>
    <dc:creator>Ron Kinner</dc:creator>
    <dc:date>2003-04-11T14:00:14Z</dc:date>
    <item>
      <title>Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949044#M577408</link>
      <description>Hello colleagues,&lt;BR /&gt;we've an application client-server based on socket communication via IP; the server accpet connection on port 5001 then creates a new socket where the communication with the client is managed.&lt;BR /&gt;If we disconnect the LAN for a meaningful time then when the connection is re-established the communication client-server is done by a new couple of sockets ... the "old" socket on the server is no more used and it is no explicitly closed so the number of unused sockets an increase.&lt;BR /&gt;My question is: I suppose there's a "timeout" for the socket relating to the IP connection .... when a timeout is expired the socket should receive an event to say that it is no more valid; is my hypothesis true? if so, why we don't receive any events? does it depend on the kind of the "bind"? or something else?&lt;BR /&gt;&lt;BR /&gt;thanks a lot&lt;BR /&gt;Enrico</description>
      <pubDate>Fri, 11 Apr 2003 08:52:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949044#M577408</guid>
      <dc:creator>Enrico Venturi</dc:creator>
      <dc:date>2003-04-11T08:52:35Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949045#M577409</link>
      <description>see ndd.conf for settings and man ndd.&lt;BR /&gt;&lt;BR /&gt;use netstat -an or netstat -a | grep 5001 during lan removal.&lt;BR /&gt;&lt;BR /&gt;Watch out for FIN_WAIT2's too.&lt;BR /&gt;&lt;BR /&gt;Later,&lt;BR /&gt;Bill&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2003 09:20:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949045#M577409</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2003-04-11T09:20:12Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949046#M577410</link>
      <description>sorry that's  /etc/rc.config.d/nddconf (no .)</description>
      <pubDate>Fri, 11 Apr 2003 09:23:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949046#M577410</guid>
      <dc:creator>Bill McNAMARA_1</dc:creator>
      <dc:date>2003-04-11T09:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949047#M577411</link>
      <description>currently, I've reconnected the LAN and there're several unsed sockets, nevertheless they aren't in FINE_WAIT status! &lt;BR /&gt;Does the socket receive some trigger when the IP timeout expires?</description>
      <pubDate>Fri, 11 Apr 2003 09:24:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949047#M577411</guid>
      <dc:creator>Enrico Venturi</dc:creator>
      <dc:date>2003-04-11T09:24:19Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949048#M577412</link>
      <description>currently, I've reconnected the LAN and there're several unused sockets, nevertheless they aren't in FINE_WAIT status! &lt;BR /&gt;Does the socket receive some trigger when the IP timeout expires?</description>
      <pubDate>Fri, 11 Apr 2003 09:24:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949048#M577412</guid>
      <dc:creator>Enrico Venturi</dc:creator>
      <dc:date>2003-04-11T09:24:35Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949049#M577413</link>
      <description>Enrico,&lt;BR /&gt;&lt;BR /&gt;The sockets will receive a timeout and also a fin_wait(s) whilst the connection is waiting for a time out connection from the client.&lt;BR /&gt;&lt;BR /&gt;The fin_wait sockets will only close if the timeout is set check nettune on 10.20 or ndd on 11. as previously stated.&lt;BR /&gt;&lt;BR /&gt;I've attached a handy connection state gif that illustrates the point better than my explanation.....&lt;BR /&gt;&lt;BR /&gt;Hope this helps....&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-ChaZ-&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2003 09:35:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949049#M577413</guid>
      <dc:creator>Charles Harris</dc:creator>
      <dc:date>2003-04-11T09:35:06Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949050#M577414</link>
      <description>sorry if I insist with my questions but I don't understand:&lt;BR /&gt;in which way does the socket receive a  timeout trigger?? by which call??&lt;BR /&gt;and moreover, which is the parameter to see in ndd? and who can I get all the socket in FIN_WAIT by an API?</description>
      <pubDate>Fri, 11 Apr 2003 09:41:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949050#M577414</guid>
      <dc:creator>Enrico Venturi</dc:creator>
      <dc:date>2003-04-11T09:41:26Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949051#M577415</link>
      <description>Enrico,&lt;BR /&gt;&lt;BR /&gt;What status are the sockets you are seeing as unused ? - When you disconnect the LAN you will see only the listening sockets after all of the other connections have been closed. If I understand, I think you are asking why more sockets are used other than a single connection on 5900? - If this is the case, the reason other sockets are used is to allow for more than one concurrent connection to the listener socket.&lt;BR /&gt;&lt;BR /&gt;As more connections are made to the Listener port, the server spawns more sockets as part of the tcp connection, to allow further connections to the orginal socket.&lt;BR /&gt;&lt;BR /&gt;Hope this helps!&lt;BR /&gt;&lt;BR /&gt;-ChaZ-&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2003 09:56:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949051#M577415</guid>
      <dc:creator>Charles Harris</dc:creator>
      <dc:date>2003-04-11T09:56:59Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949052#M577416</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I think the ndd parameters you are looking for are:&lt;BR /&gt;&lt;BR /&gt;tcp_keepalive_detached_interval - Send keepalive probes for detached TCP&lt;BR /&gt;    tcp_keepalive_interval    - Interval for sending keepalive probes&lt;BR /&gt;&lt;BR /&gt;From the socket(2) manpage recv() will error with ETIMEOUT after the tcp_keepalive_interval (default 2hrs). I'd imagine a close() or shutdown() is then sent to that stream.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;&lt;BR /&gt;James.</description>
      <pubDate>Fri, 11 Apr 2003 10:01:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949052#M577416</guid>
      <dc:creator>James Murtagh</dc:creator>
      <dc:date>2003-04-11T10:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949053#M577417</link>
      <description>On my machine all the sockets are  in one of the following states: TIME_WAIT, LISTEN, ESTABLISHED; there aren't sockets in FIN_WAIT state. The partner don't close the socket therefore on my machine I don't receive an explicit close request. I suppose that when the IP timeout (2 hours) expires I should receive one trigger. The question is: in which way?????</description>
      <pubDate>Fri, 11 Apr 2003 10:04:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949053#M577417</guid>
      <dc:creator>Enrico Venturi</dc:creator>
      <dc:date>2003-04-11T10:04:08Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949054#M577418</link>
      <description>the fact is that I don't perform any recv() on the socket until the select() doesn't tell me that there's something to read ... &lt;BR /&gt;I perform a select(fd) where fd is the list of the file descriptors created in the process scope: the select gives me the sublist of the fd's where the recv() should find something ...&lt;BR /&gt;As far as concerning the socket bound to the (lost) IP connection, the select doesn't find anything on them. .....&lt;BR /&gt;Are there any parameters affecting the socket behaviour relating to the IP connection availability?</description>
      <pubDate>Fri, 11 Apr 2003 11:01:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949054#M577418</guid>
      <dc:creator>Enrico Venturi</dc:creator>
      <dc:date>2003-04-11T11:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949055#M577419</link>
      <description>TIME WAIT means that the connection has closed correctly and is just waiting for a short time to see if there are any lost packets which might show up.  This is to prevent a late packet from being confused with those from a new connection.  The time interval is supposed to be 2 times the maximum time that a packet can survive on the net.  On an 11.0 the default is 60 seconds which is the industry standard.&lt;BR /&gt;&lt;BR /&gt;tcp_time_wait_interval:&lt;BR /&gt;&lt;BR /&gt;    Amount of time TCP endpoints persist in TCPS_TIME_WAIT state.&lt;BR /&gt;    [1000,600000] Default: 60000 (60 seconds)    &lt;BR /&gt;&lt;BR /&gt;This means that after 60 seconds the TIME WAIT state should go away.  Presumably the TCP/IP stack should then signal back to the process that started the connection that the connection no longer exists.  I'm not a programmer so I am not familiar with the way this happens.&lt;BR /&gt;&lt;BR /&gt;This is probably a bit conservative so you could reduce this if you are just working with a few machines that you control.&lt;BR /&gt;&lt;BR /&gt;ndd -set /dev/tcp tcp_time_wait_interval 30000&lt;BR /&gt;would reduce it to 30 secs.  You have to edit /etc/rc.config.d/nddconf to make it stay after a reboot.  &lt;BR /&gt;&lt;BR /&gt;TRANSPORT_NAME[0]=tcp&lt;BR /&gt;NDD_NAME[0]=tcp_time_wait_interval &lt;BR /&gt;NDD_VALUE[0]=30000&lt;BR /&gt;&lt;BR /&gt;(Use the next higher integer in the brackets if you already have entries in nddconf)  &lt;BR /&gt;&lt;BR /&gt;I'm not sure which language you are using but you might benefit from reading how Perl does it:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.perlfect.com/articles/sockets.shtml" target="_blank"&gt;http://www.perlfect.com/articles/sockets.shtml&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Be sure to read the links at the bottom.&lt;BR /&gt;&lt;BR /&gt;For more advanced info (note the references):&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://216.239.57.100/search?q=cache:4V3XWMAx008C:www.csd.uch.gr/~markatos/papers/issues.ps+hpux+%22time+wait%22&amp;amp;hl=en&amp;amp;lr=lang_en" target="_blank"&gt;http://216.239.57.100/search?q=cache:4V3XWMAx008C:www.csd.uch.gr/~markatos/papers/issues.ps+hpux+%22time+wait%22&amp;amp;hl=en&amp;amp;lr=lang_en&lt;/A&gt;|lang_de&amp;amp;ie=UTF-8&lt;BR /&gt;&lt;BR /&gt;Ron&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2003 13:51:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949055#M577419</guid>
      <dc:creator>Ron Kinner</dc:creator>
      <dc:date>2003-04-11T13:51:27Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949056#M577420</link>
      <description>I just checked and there are several patches which effect socket performance.  It might be a good idea to check out:&lt;BR /&gt;&lt;BR /&gt;PHNE_26771 &lt;BR /&gt;&lt;BR /&gt;and&lt;BR /&gt;&lt;BR /&gt;PHKL_22840/PHKL_25613 &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www2.itrc.hp.com/service/patch/mainPage.do" target="_blank"&gt;http://www2.itrc.hp.com/service/patch/mainPage.do&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;See if anything in them looks like it might be causing your problem.&lt;BR /&gt;&lt;BR /&gt;Ron&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2003 14:00:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949056#M577420</guid>
      <dc:creator>Ron Kinner</dc:creator>
      <dc:date>2003-04-11T14:00:14Z</dc:date>
    </item>
    <item>
      <title>Re: Socket &amp; IP (timeout)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949057#M577421</link>
      <description>there should be no need at all to shrink time_wait_interval to 30000&lt;BR /&gt;&lt;BR /&gt;unless the connections were "active" at the time the cable was disconnected - that is to say actively trying to transmit data, unless you explicitly close them, they will remain in ESTABLISHED _forever_ _UNLESS_ you have used setsockopt() to set SO_KEEPALIVE, at which point the tcp_keepalive_interval comes into play (along with tcp_ip_abort_interval)&lt;BR /&gt;&lt;BR /&gt;if your software has timed-out on its own on a socket, it really Really, REALLY aught to go ahead and call close() on the socket(s)...&lt;BR /&gt;</description>
      <pubDate>Sat, 12 Apr 2003 00:41:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/socket-amp-ip-timeout/m-p/2949057#M577421</guid>
      <dc:creator>rick jones</dc:creator>
      <dc:date>2003-04-12T00:41:54Z</dc:date>
    </item>
  </channel>
</rss>

