Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
06-25-2010, 05:25 AM
|
#1
|
|
LQ Newbie
Registered: Jun 2010
Posts: 3
Rep:
|
How to kill a TCP connection which has status TIME_WAIT & no PID
Hi,
I want to kill TCP connections which have status as TIME_WAIT & no PID
(as per the output of the "netstat - p" command).
The problem is that these connections don't have process ID (see below).
====================================================================
[remedy@CNDAUNREDBOP13 ~]$ netstat -p |grep 56000
tcp 0 0 CNDAUNREDBOP13:59388 10.5.45.39:56000 TIME_WAIT -
tcp 0 0 CNDAUNREDBOP13:59389 10.5.45.39:56000 TIME_WAIT -
tcp 0 0 CNDAUNREDBOP13:59390 10.5.45.39:56000 TIME_WAIT -
tcp 0 0 CNDAUNREDBOP13:59385 10.5.45.39:56000 TIME_WAIT -
tcp 0 0 CNDAUNREDBOP13:59386 10.5.45.39:56000 TIME_WAIT -
tcp 0 0 CNDAUNREDBOP13:59411 10.5.45.39:56000 TIME_WAIT -
====================================================================
|
|
|
|
06-25-2010, 06:26 AM
|
#2
|
|
Member
Registered: Jun 2010
Location: France
Distribution: openSUSE 11.2, (B)LFS, Mepis, Linux Mint 9
Posts: 30
Rep:
|
Hi,
Just check if it's not a software service running, sub-service, or hiddent software listener linked to an application or such.
|
|
|
|
06-25-2010, 06:46 AM
|
#3
|
|
Member
Registered: Mar 2009
Posts: 245
Rep:
|
They are closed. The TIME-WAIT state is a precaution against connections being reopened by old duplicate packets, or new connections being corrupted.
|
|
|
|
06-25-2010, 08:45 AM
|
#4
|
|
Member
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 549
Rep:
|
Try
netstat -a -n -t and check that what is Local address and Foreign address of those connection and investigate further.
|
|
|
|
06-28-2010, 02:01 AM
|
#5
|
|
LQ Newbie
Registered: Jun 2010
Posts: 3
Original Poster
Rep:
|
Hi,
I know which application is leavig these open connections.It is actually a shell script file that picks up data from one server & sends it to another server.
Since these connections are not having any pid, i cant kill these connections.
These connections are also not shown as the output of "lsof -i tcp:56000" command.
Can i put a timeout interval for these TIME_WAIT connections?
|
|
|
|
06-28-2010, 06:02 AM
|
#6
|
|
Member
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 549
Rep:
|
You change change tcp keepalive using following command
echo 2300 > /proc/sys/net/ipv4/tcp_keepalive_time
thanks
|
|
|
|
06-28-2010, 03:51 PM
|
#7
|
|
Member
Registered: Mar 2009
Posts: 245
Rep:
|
Quote:
Originally Posted by davinder31may
Can i put a timeout interval for these TIME_WAIT connections?
|
There is a timeout of 4 minutes. From you description it is working perfectly, what problem are you having?
|
|
|
|
06-28-2010, 03:57 PM
|
#8
|
|
Member
Registered: Mar 2009
Posts: 245
Rep:
|
Quote:
Originally Posted by vishesh
You change change tcp keepalive using following command
echo 2300 > /proc/sys/net/ipv4/tcp_keepalive_time
|
Which not what was asked.
|
|
|
|
06-28-2010, 11:40 PM
|
#9
|
|
LQ Newbie
Registered: Jun 2010
Posts: 3
Original Poster
Rep:
|
Quote:
Originally Posted by TimothyEBaldwin
There is a timeout of 4 minutes. From you description it is working perfectly, what problem are you having?
|
My main concern is tcp connections with status as "TIME_WAIT" which i dont want.
|
|
|
|
06-29-2010, 12:11 PM
|
#10
|
|
Member
Registered: Mar 2009
Posts: 245
Rep:
|
Quote:
Originally Posted by davinder31may
My main concern is tcp connections with status as "TIME_WAIT" which i dont want.
|
Do you really want to destroy the reliability of TCP? Read RFC 1337 for some examples of what can go wrong if you get rid the TIME-WAIT state.
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 06:27 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|