Operating System - HP-UX
1826350 Members
4492 Online
109692 Solutions
New Discussion

Re: TCP connection not establishing

 
SOLVED
Go to solution
wci
Frequent Advisor

TCP connection not establishing

Hi
we have a local application which uses a tcp/IP port defined in /etc/services and running on hp-ux 11.11.

The issue we have is that the server is allowing certain amount of connections ( 3-4 maximum ) and it sets rest on TIME_WAIT state when checked with netstat and ndd ( tcp_status).

Once this is the case it will not allow any other connections from extermal servers.
The application is basically a messaging system

Are their any parameters which has to be set to
allow incoming connections when installing a third part applications on hp-ux 11.11 ?

error is as follows
Escape character is '^]'.
UConnection closed by foreign host.

any input appriciated.

6 REPLIES 6
Jeeshan
Honored Contributor

Re: TCP connection not establishing

Hi

first check that the port which application used won't acquired by other application.

please be mind it that, the /etc/services is only human readable file. If you want to establish the port, the pplication itself should allocate that.

you can verify that, the port is working or not.
a warrior never quits
RAC_1
Honored Contributor

Re: TCP connection not establishing

You need to look at your apps code. Particularly listen and wait calls. You can defne wait queue on apps.
On networking side, at tcp level, you can look at tcp_conn_request_max tunable.
ndd -h tcp_conn_request_max

It would not make any differene unlesss, you take care of it at application level.
There is no substitute to HARDWORK
wci
Frequent Advisor

Re: TCP connection not establishing

Thanks

checked with lsof and only the local application is occupying the port and the issue is its only allowing limited ( 2-4) connections at a time. If this app is stopped the port is any way not occupied if checked with netstat or lsof.

checked tcp_conn_request_max with
# ndd -get /dev/tcp tcp_conn_request_max and other relevet parrameters and its default to
4096.

will get back to app support to check the code.
Are their any commonly known kernel parameters relevant to this kind of issue ?

wci
Laurent Menase
Honored Contributor

Re: TCP connection not establishing

you should take a tusc -E -v of the application.
and a nettl trace taken at the same time.
are you using ipfilter?
What is the sequence of syscall?

socket()
bind()
listen()
while ()
accept()

rick jones
Honored Contributor
Solution

Re: TCP connection not establishing

tcp_conn_request_max is one of the two upper bounds on the number of _queued_ connections on a listen socket - ie those connections waiting for the application to call accept(). the other is the backlog parameter the application provides on its listen() call.

it does not otherwise control the maximum number of connections a given process may have.

the limit to the number of connections a given process may have at one time is the number of file descriptors it may have open. of course, applications may impose their own, lower, limits as well.

The output given:

Escape character is '^]'.
UConnection closed by foreign host.

suggests that the connection is being established, the server is calling accept(), and then immediately calling close() (or shutdown() followed by close()) - it suggests the application is deciding to terminate the connection, which suggests an application configuration.

the suggestion to take a tusc trace of the server is a very good one.

wrt the TIME_WAIT connections, the side which initiates the connection close is the side which tracks TIME_WAIT, per the TCP specifications. that there are TIME_WAIT endpoints on the server is consistent with the server being the one to initiate close.
there is no rest for the wicked yet the virtuous have no pillows
wci
Frequent Advisor

Re: TCP connection not establishing


Thanks for the information.

Application support is looking at the issue
at the moment.

ipf is installed but not configured but stopped and still the issue is their.

we have a mail ( sendmail ) gateway running on the same server which is running without any issue.
may have to wait till application support gets back with their findings.

thanks all.

wci