Operating System - HP-UX
1833030 Members
2422 Online
110049 Solutions
New Discussion

Re: error in connections tcp

 
SOLVED
Go to solution
Jairo Campana
Trusted Contributor

error in connections tcp

hello I have a server who accepts connections tcp of clients (LDAP,smtp,telnet etc.)the netstat display:
TCP: IPv4
Local Address Remote Address Swind Send-Q Rwind Recv-Q State
-------------------- -------------------- ----- ------ ----- ------ -------
172.31.195.150.3389 172.31.195.241.1748 16216 0 24820 0 ESTABLISHE
172.31.195.150.3389 172.31.195.241.1810 16292 0 24820 20 ESTABLISHE

suddenly moment the connections and the processor goes away to 100% of load ...what this causing this problem and and so that the processor raises the 100% of load
legionx
9 REPLIES 9
Steven E. Protter
Exalted Contributor

Re: error in connections tcp

General Answer: December 2002 Patch bundle. Always a good idea, fully tested.

Next look for TCP patches at patches hpux on the main page of itrc.hp.com

Read and install anything that deals with this issue.

Check with network administration for issues on the router.

lanadmin -x 0 (for lan0)

make sure the router matches those settings.

A simple ping test followed by traceroute might help you spot network problems.

Pinging the box from the outside should maintain steady times. If they climb steadily you could have a flaky NIC card.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Jairo Campana
Trusted Contributor

Re: error in connections tcp

suddenly moment the connections suddenly moment the connections is seen like CLOSE_WAIT and the processor goes away to 100% of load ...what this causing this problem and and so that the processor raises the 100% of load
legionx
Michael Steele_2
Honored Contributor

Re: error in connections tcp

The "...netfmt..." command and "...nettl..." log may have record of this.

netfmt -LN -f /var/adm/nettl*.LOG* > /tmp/file

vi the file and search for driver, cable, 100/BASET, disaster, etc.

From above you appear to have connectivity.
Support Fatherhood - Stop Family Law
KapilRaj
Honored Contributor

Re: error in connections tcp

write a small script to test it in the cron which would do a netstat -a & then take the local & remote IP & port . Do an lsof on both the hosts & find out which service / application is responsible for that. I have a problem with one of our boxes here. My observations are ,

1. TCP Connections usually go to a CLOSE_WAIT state when CPU goes 100 %. ( I do not think CLOSE_WAIT connections trigger CPU to hit 100%).

2. Another problem could be if you are using diff application versions of apache or any web product... not truely confident of this statement.

3. Most of the time it is an application related issue, look for some application patches (U hvnt mentioned which product apache / tomcat / ???)

4. This happens when a TCP socket closes the connection from remote end and our box is still waiting for an ACK. could not investigate further as i had to go for an alternate solution .

Nice day,

kaps
Nothing is impossible
connie miller_1
New Member

Re: error in connections tcp

 
expert advice and help with win 98 and win 98 ce and dsl network card installed devices compatiabiltys web or connection problems, adapters drivers and top researched accessories,pc the best the worst, quick restore cds and all internet support ask me
John Poff
Honored Contributor

Re: error in connections tcp

Connie,

I think the original question was for a problem on a system running HP-UX, since this is the HP-UX forum. Thanks for your contribution, though. It certainly is one of the most unique posts I've ever seen here.

JP
Jairo Campana
Trusted Contributor

Re: error in connections tcp

I explain better the problem :
I have clients (100 clients) consulting to my server of LDAP(aplication IPLANET)with connections the port 389;suddenly the connections increase in 4000 connections, and all of them are in state CLOSED_WAIT without freeing itself and CPU IDLE=0%
therefore it does not take care of new consultations so that the CPU remains without resources , and the CPU is saturated .

thanks
legionx
James A. Donovan
Honored Contributor

Re: error in connections tcp

Make sure that you're up to date on all the latest ARPA/Streams patches. I recommend installing the Dec. 2002 quality pak from the Support CD.

Also, use ndd to set the tcp tunable, tcp_fin_wait_2_timeout

You can add an entry to your /etc/rc.config.d/nddconf file to keep the value you set after rebooting.

TRANSPORT_NAME[0]=tcp
NDD_NAME[0]=tcp_fin_wait_2_timeout
NDD_VALUE[0]=60000

Another excellent resource is this TCP/IP tuning guide. (Written for solaris, but applicable to all unix platforms...)

http://www.sean.de/Solaris/soltune.html
Remember, wherever you go, there you are...
Ron Kinner
Honored Contributor
Solution

Re: error in connections tcp

Found this. It will remove the CLOSE_WAITs:

#!/usr/bin/ksh
#
# Author Tim Fulford
# Date 22 Jan 2001
# Purpose Kills CLOSE_WAIT sockets using ndd

close_wait_ip_collect ()
{
netstat -na | grep CLOSE | cut -c20-65 > /tmp/close_wait_ip_collect.out
}

close_wait_ip_convert_to_hex ()
{
cat /tmp/close_wait_ip_collect.out | while read TRGT SRCE
do
echo ${TRGT}.${SRCE} | awk -F"." '{printf "%02x%02x%02x%02x%04x%02x%02x%02x%02x%04x\n", $1, $2, $3, $4, $5, $6, $7, $8, $9, $10}'
done
}
close_wait_remove_socket ()
{
cat /tmp/close_wait_ip_convert_to_hex.out | while read SOCKET
do
echo "Clearing socket HEX address : ${SOCKET}"
echo "ndd -set /dev/tcp tcp_discon_by_addr ${SOCKET}"
done
}
close_wait_clear_up ()
{
rm /tmp/close_wait_ip_convert_to_hex.out /tmp/close_wait_ip_collect.out
echo "Finished...."
}


close_wait_ip_collect
close_wait_ip_convert_to_hex > /tmp/close_wait_ip_convert_to_hex.out
close_wait_remove_socket
close_wait_clear_up

Also found this:

Fixes Included in Netscape Directory Server 4.16

PR_Accept Failed Error Messages in the Logs
In Directory Server 4.15 a regression defect was introduced in which all connections would not be closed and left in a CLOSE_WAIT state. In this case all available file descriptors/handles would eventually be used up. PR_Accept failed error messages would appear in the logs and the server would be non-responsive. This regression is fixed. (557007)

Not sure of the relationship between IPLANET and Netscape Server but there are links to both on the bottom of the page. Also a list of recommended HPUX patches. http://docs.sun.com/source/816-5595-10/

Ron