HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

port is seen established while the network is down

 
TCP Port issue
Occasional Visitor

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
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)