Operating System - HP-UX
1855860 Members
1806 Online
104107 Solutions
New Discussion

port is seen established while the network is down

 
TCP Port issue
New Member

port is seen established while the network is down

I have a system running on hp-ux 11.23 that controls ATM. each ATM is assigned its own port number that the host listens to. when there is network problems, ATM goes in offline mode but in the host it shows that the port is still established.

unless we are told that the ATM is offline in order for us to kill the port manually for it to re-establish the connection, the ATM can remain in offline mode forever since the port is still established.

Is there a way of constantly checking the ports if indeed are able to reach the remote ATM and then resetting the ports?
1 REPLY 1
Laurent Menase
Honored Contributor

Re: port is seen established while the network is down

Hi,
with tcp, the only way to detect that peer is not reachable is to send message which don't get acked.
For this there is a the keepalive (man setsockopt)
by default the keepalive is 2h, but you may for your need lower it to some smaller values.
- for instance 2 min-
then every 2 min a packet will be send to check that the tcp connection is still ok,
If the peer is back online, but it tcp connection was closed while the nework was down, then it will probably reset the connection. if peer doesn't answer , the keepalive packet will be send again for tcp_ip_abort_interval (default 10min)


The keepalive could also be managed at application layer, sending a "keepalive" message which need to be acked before some timeout, else the connection is abortively closed with so_linger (l_onoff=1,l_linger=0)