未关闭InputStream 引起的血案

下面的方法是从aws s3 读取文件对象下载到本地

public int downloadFile(HttpServletResponse httpResponse, String storePath, long p, long pend, int len, long realLen) throws IOException {
	String key = getKeyByStorePath(storePath);
	String bucketName = getBucketNameFromKey(key);

	S3ObjectInputStream fis = null;
	try {
		fis = getObjectStream(bucketName, key);// 从aws s3 获取流

		fis.skip(p);

		// ... 对fis进行处理

	} catch (Exception e) {
		logger.error("aws下载失败  : " + mainHost);
	}
	return 0;
}

  从上面的代码看, 并未关闭流。 这个是代码上的低级错误。 结果却花了比较长时间排除错误。。

未关闭InputStream ,一般编程可能也不会导致什么大的麻烦。 比如我们看下面的代码:

private static void exec10000() {
	JAVA_THREAD_NUM = 600;
	HTTP_POOL_SIZE = 300;
	DIR = "E:\\work\\testfiles\\10000+\\1000+ 38KB\\";
	System.out.println("DISKFileTestUtil.exec10000()");
	try {
		File d = new File(DIR);
		File[] listFiles = d.listFiles();
		FILE_CNT = listFiles.length;
		FileInputStream[] fiss = new FileInputStream[FILE_CNT];
		for (int i = 0; i < listFiles.length; i++) {
			File f = listFiles[i];
			fiss[i] = new FileInputStream(f);

			int c = 0;
			while ((c = fiss[i].read()) != -1) {
				System.out.print((char)c);
			}
			int available = fiss[i] .available();
			System.out.println(available);
		}
	} catch (Exception e) {
		e.printStackTrace();
	}
}

假设E:\\work\\testfiles\\10000+\\1000+ 38KB 下有1000 个文件, 这样写,也没有关闭IO流,但是不会有什么大问题。

 

尽管如此,我观察到, 这样还是会有问题的,至少存在性能问题: CPU 占用高, 句柄数高

如下:

程序执行完毕,再观察, 确实是大幅下降,句柄数下降了1000 多!! :

但是,这次真的引起了血案 :

aws 的连接数是170,

下载文件超过一定数据(后面发现就是 170), 连接不上了,然后引起aws 内部错误:

Caused by: org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool

xxx

xxx

Timeout waiting for connection from pool 是什么鬼,连接超时? 于是设置更长的超时时间, 仍然没有解决问题, 后面发现跟连接数N的设置有关, 设置N个连接数, 那么就只能下载N个文件。于是想,可能是连接池中的连接没关闭吧!

通过netstat -nat|grep -i "80" 观察下吧!

一开始,  很多连接还是处于 连接状态
-bash-4.1# netstat -nat|grep -i "80"
tcp        0      0 ::ffff:192.168.5.49:34994   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35012   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35026   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35081   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34926   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34956   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34854   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57689      TIME_WAIT
tcp        0      0 ::ffff:192.168.5.49:34886   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35057   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34980   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35036   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35084   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34836   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35010   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34936   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34852   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57662      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34782   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35086   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35051   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34784   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57690      TIME_WAIT
tcp        0      0 ::ffff:192.168.5.49:35032   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34950   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35034   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34786   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34762   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34794   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35020   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34890   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34792   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34918   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34774   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57673      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34862   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34946   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34880   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34952   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34838   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57681      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34798   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57682      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34758   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34761   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34924   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34754   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34888   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34816   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34964   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34878   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34974   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34976   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34864   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34906   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34894   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34756   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34840   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34780   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34824   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35006   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:50680      ::ffff:127.0.0.1:3306       ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57675      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34806   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34882   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34828   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34978   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34982   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57661      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35016   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34866   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35061   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34970   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34850   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35038   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34990   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34884   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34912   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34765   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34986   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34834   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34904   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34760   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34803   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34788   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34846   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57676      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35014   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34870   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34914   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34988   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34966   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34818   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34960   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35000   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57657      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34856   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35040   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34938   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35087   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35083   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34858   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34928   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34868   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34996   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34755   ::ffff:192.168.5.81:80      ESTABLISHED
-bash-4.1# netstat -nat|grep -i "80"
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:57678             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61160         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61161         ESTABLISHED
tcp        0      0 192.168.4.49:48013          65.158.122.184:80           ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61307         TIME_WAIT
tcp        0      0 192.168.4.49:80             192.168.4.123:61162         ESTABLISHED
tcp        0      0 127.0.0.1:57657             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57662             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61159         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61344         ESTABLISHED
tcp        0      0 127.0.0.1:57679             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61157         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61163         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61156         ESTABLISHED
tcp        0      0 127.0.0.1:57681             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57675             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57676             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57673             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57682             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57691             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61143         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61152         ESTABLISHED
tcp        0      0 127.0.0.1:3306              127.0.0.1:50680             ESTABLISHED
tcp        0      0 127.0.0.1:57680             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61328         TIME_WAIT
tcp        0      0 127.0.0.1:57674             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61154         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61151         ESTABLISHED
tcp        0      0 127.0.0.1:57661             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61155         ESTABLISHED
tcp        0      0 :::6800                     :::*                        LISTEN
tcp        0      0 ::ffff:192.168.5.49:34940   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34822   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34892   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34848   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34948   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34812   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34922   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34942   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57680      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35047   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34796   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34808   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34920   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34958   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34844   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35042   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34800   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34998   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34790   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35002   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34874   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34778   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34872   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34810   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35022   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34757   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35088   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35080   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35053   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35018   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57679      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34954   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34832   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35055   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57691      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57678      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35059   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35049   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35030   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34908   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34842   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34932   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34898   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34876   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34992   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34968   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35004   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34930   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35085   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34773   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34753   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34769   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35008   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34972   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34944   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34759   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34751   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57674      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34902   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34916   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34752   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35082   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34804   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34910   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34814   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34900   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35045   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34777   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34767   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34934   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34826   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35028   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34962   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34984   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35024   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34772   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34860   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34896   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34820   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34830   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34994   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35012   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35026   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35081   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34926   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34956   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34854   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57689      TIME_WAIT
tcp        0      0 ::ffff:192.168.5.49:34886   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35057   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34980   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35036   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35084   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34836   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35010   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34936   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34852   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57662      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34782   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35086   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35051   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34784   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57690      TIME_WAIT
tcp        0      0 ::ffff:192.168.5.49:35032   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34950   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35034   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34786   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34762   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34794   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35020   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34890   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34792   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34918   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34774   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57673      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34862   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34946   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34880   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34952   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34838   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57681      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34798   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57682      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34758   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34761   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34924   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34754   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34888   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34816   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34964   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34878   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34974   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34976   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34864   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34906   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34894   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34756   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34840   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34780   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34824   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35006   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:50680      ::ffff:127.0.0.1:3306       ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57675      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34806   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34882   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34828   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34978   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34982   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57661      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35016   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34866   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35061   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34970   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34850   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35038   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34990   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34884   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34912   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34765   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34986   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34834   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34904   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34760   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34803   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34788   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:34846   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57676      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35014   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34870   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34914   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34988   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34966   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34818   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34960   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35000   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57657      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34856   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35040   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34938   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35087   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35083   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34858   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34928   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34868   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:34996   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34755   ::ffff:192.168.5.81:80      CLOSE_WAIT
-bash-4.1# netstat -nat|grep -i "80"
tcp        0      0 0.0.0.0:80                  0.0.0.0:*                   LISTEN
tcp        0      0 127.0.0.1:57678             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61160         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61161         ESTABLISHED
tcp        0      0 192.168.4.49:48013          65.158.122.184:80           ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61307         TIME_WAIT
tcp        0      0 192.168.4.49:80             192.168.4.123:61162         ESTABLISHED
tcp        0      0 127.0.0.1:57657             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57662             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61159         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61344         ESTABLISHED
tcp        0      0 127.0.0.1:57679             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61157         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61163         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61156         ESTABLISHED
tcp        0      0 127.0.0.1:57681             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57675             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57676             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57673             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57682             127.0.0.1:6800              ESTABLISHED
tcp        0      0 127.0.0.1:57691             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61143         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61152         ESTABLISHED
tcp        0      0 127.0.0.1:3306              127.0.0.1:50680             ESTABLISHED
tcp        0      0 127.0.0.1:57680             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61328         TIME_WAIT
tcp        0      0 127.0.0.1:57674             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61154         ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61151         ESTABLISHED
tcp        0      0 127.0.0.1:57661             127.0.0.1:6800              ESTABLISHED
tcp        0      0 192.168.4.49:80             192.168.4.123:61155         ESTABLISHED
tcp        0      0 :::6800                     :::*                        LISTEN
tcp        1      0 ::ffff:192.168.5.49:34940   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34822   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34892   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34848   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34948   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34812   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34922   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34942   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57680      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35047   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34796   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34808   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34920   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34958   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34844   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35042   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34800   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34998   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34790   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35002   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34874   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34778   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34872   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34810   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35022   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34757   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35088   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35080   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35053   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35018   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57679      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34954   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34832   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35055   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57691      ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57678      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35059   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35049   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35030   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34908   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34842   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34932   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34898   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34876   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34992   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34968   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35004   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34930   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35085   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34773   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34753   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34769   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35008   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34972   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34944   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34759   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34751   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57674      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34902   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34916   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34752   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35082   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34804   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34910   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34814   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34900   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35045   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34777   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34767   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34934   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34826   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35028   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34962   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34984   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35024   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34772   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34860   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34896   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34820   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34830   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34994   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35012   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35026   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35081   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34926   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34956   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34854   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57689      TIME_WAIT
tcp        1      0 ::ffff:192.168.5.49:34886   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35057   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34980   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35036   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35084   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34836   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35010   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34936   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34852   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57662      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34782   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35086   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35051   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34784   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57690      TIME_WAIT
tcp        0      0 ::ffff:192.168.5.49:35032   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34950   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35034   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34786   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34762   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34794   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35020   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34890   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34792   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34918   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34774   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57673      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34862   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34946   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34880   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34952   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34838   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57681      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34798   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57682      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34758   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34761   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34924   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34754   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34888   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34816   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34964   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34878   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34974   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34976   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34864   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34906   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34894   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34756   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34840   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34780   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34824   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35006   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:50680      ::ffff:127.0.0.1:3306       ESTABLISHED
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57675      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34806   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34882   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34828   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34978   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34982   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57661      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:35016   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34866   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35061   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34970   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34850   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35038   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34990   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34884   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34912   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34765   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34986   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34834   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34904   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34760   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34803   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34788   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34846   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57676      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:35014   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34870   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34914   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34988   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34966   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34818   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34960   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35000   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:127.0.0.1:6800       ::ffff:127.0.0.1:57657      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34856   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35040   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34938   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        0      0 ::ffff:192.168.5.49:35087   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        0      0 ::ffff:192.168.5.49:35083   ::ffff:192.168.5.81:80      ESTABLISHED
tcp        1      0 ::ffff:192.168.5.49:34858   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34928   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34868   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34996   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34755   ::ffff:192.168.5.81:80      CLOSE_WAIT 

再过一段时间,发现, 所有连接都被动关闭了!
-bash-4.1# netstat -nat|grep -i "80" | grep 192.168.5.81
tcp        1      0 ::ffff:192.168.5.49:34940   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34822   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34892   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34848   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34948   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34812   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34922   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34942   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35047   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34796   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34808   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34920   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34958   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34844   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35042   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34800   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34998   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34790   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35002   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34874   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34778   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34872   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34810   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35022   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34757   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35088   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35080   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35053   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35018   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34954   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34832   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35055   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35059   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35049   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35030   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34908   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34842   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34932   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34898   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34876   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34992   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34968   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35004   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34930   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35085   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34773   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34753   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34769   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35008   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34972   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34944   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34759   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34751   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34902   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34916   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34752   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35082   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34804   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34910   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34814   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34900   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35045   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34777   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34767   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34934   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34826   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35028   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34962   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34984   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35024   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34772   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34860   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34896   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34820   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34830   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34994   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35012   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35026   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35081   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34926   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34956   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34854   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34886   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35057   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34980   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35036   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35084   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34836   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35010   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34936   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34852   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34782   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35086   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35051   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34784   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35032   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34950   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35034   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34786   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34762   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34794   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35020   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34890   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34792   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34918   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34774   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34862   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34946   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34880   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34952   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34838   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34798   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34758   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34761   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34924   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34754   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34888   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34816   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34964   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34878   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34974   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34976   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34864   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34906   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34894   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34756   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34840   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34780   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34824   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35006   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34806   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34882   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34828   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34978   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34982   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35016   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34866   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35061   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34970   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34850   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35038   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34990   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34884   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34912   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34765   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34986   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34834   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34904   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34760   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34803   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34788   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34846   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35014   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34870   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34914   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34988   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34966   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34818   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34960   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35000   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34856   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35040   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34938   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35087   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:35083   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34858   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34928   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34868   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34996   ::ffff:192.168.5.81:80      CLOSE_WAIT
tcp        1      0 ::ffff:192.168.5.49:34755   ::ffff:192.168.5.81:80      CLOSE_WAIT
-bash-4.1# 

-bash-4.1# netstat -nat|grep -i "80" | grep 192.168.5.81 | wc -l
170 --- 这个正是我设置的 maxconnection 的数值。

可见,

一开始,  很多连接全部处于 ESTABLISHED, 后面部分变成了 CLOSE_WAIT, 后面则全部变成了CLOSE_WAIT —— 这就表示所有连接都超时了, 都已经被动关闭, 

———— 但是 , 很关键的是 被动关闭的连接并不会释放, 于是酿成了血案啊!

解决方法其实很简单,

try catch后面加个

finally {
if (fis != null) {
fis.close();
}
}

就好了!!!

时间: 2024-10-01 06:21:45

未关闭InputStream 引起的血案的相关文章

解决cursor未关闭造成的死锁

参考:https://blog.csdn.net/zc474235918/article/details/72731363/ https://blog.csdn.net/zmx729618/article/details/51259135 # import pymysql # conn=pymysql.connect(host='127.0.0.1',user='root',passwd='123456',db='mysql',charset='utf8', port=3306) # cur=c

未关闭的文件流会引起内存泄露么?

最近接触了一些面试者,在面试过程中有涉及到内存泄露的问题,其中有不少人回答说,如果文件打开后,没有关闭会导致内存泄露.当被继续追问,为什么会导致内存泄露时,大部分人都没有回答出来. 本文将具体讲一讲 文件(流)未关闭与内存泄露的关系. 什么是内存泄露 定义:当生命周期长的实例L 不合理地持有一个生命周期短的实例S,导致S实例无法被正常回收 举例说明 上面的代码可能会发生内存泄露 我们调用AppSettings.getInstance.setup()传入一个Activity实例 当上述的Activ

记一次排查mysql数据库连接未关闭问题的过程

在一些项目中由于一些特殊原因仍然保留着显示的获取数据库连接(Connection).提交事务.回滚事务.关闭连接等操作:其中关闭连接是比较容易疏忽又比较难在前期发现的问题. 我是如何排查连接未关闭的问题的? 首先还是提出3W: 1.What? 数据库连接是应用服务器和数据库之间建立的tcp连接,在获取连接并进行操作后需要手动关闭以释放资源,就像是文件流一样,资源是有限的. 2.Why? 连接不释放会导致连接池无法回收连接,进而数据库连接逐渐被占满,直到超出数据库设置的最大连接数而拒绝服务,显而易

HibernateDaoSupport 类session未关闭导致的连接泄露问题

Spring+Hibernate做项目, 发现有member在不加事务的情况下就去调用 getSession() 方法, 结果导致数据库连接不能释放, 也无法正常的提交事务(只能做查询, 不能做save(), update()). 如果配合连接池使用的话, 不出几分钟就会导致连接池无法拿到新连接的情况. 不过, 只要给DAO或者Service加入了事务, 就不会出现连接泄漏的问题. 谈谈解决方案: 最佳方案: 加入事务, 例如 tx 标签或者 @Transactional 都可以. 最笨方案:

未关闭虚拟机直接关闭vmware引发的一系列问题——Windows下linux虚拟机

虚拟机长时间挂起重新打开时卡顿,无法开启,脑抽直接关闭了vmware软件引起的一系列问题. 原因是关闭了vmware,但是相应的虚拟机并没有关闭,所以虚拟机不能重开 会出现如下提示 解决方案如下: 1,首先删除虚拟机目录中的所有.lok文件夹和一个很大的.vmem文件注①,如果顺利删除,那皆大欢喜,直接重启vmware和虚拟机就ok了,当然一般情况下会出现如下提示 如图所示,你需要先关闭vmware-vmx.exe进程才可以,那么下一步 2,我们关闭vmware-vmx.exe进程 首先打开任务

postgreSQL dropdb时 连接未关闭

如下图: 解决步骤: 1 . select * from pg_stat_activity where datname ='lnarterydb'   //查询该库有哪些会话 查询结果会有两个pid 2. SELECT  pg_terminate_backend(pid) ;     //中断该会话,回滚未提交事物 关于 pg_terminate_backend(pid) 函数,可以参考这儿 http://blog.163.com/dazuiba_008/blog/static/36334981

springboot 1.5.2 thymeleaf 标签未关闭异常解决办法

org.thymeleaf.exceptions.TemplateInputException: Exception parsing document: template="login" 原因: Spring Boot项目渲染html的时候,因默认使用是Thymeleaf模板引擎,遇到不闭合标签报错,日常在编写HTML代码时,一般标签都是闭合的,容易忽略的标签包括<meta/>, <link/>, <br/>, <hr/>等等 解决办法:

如何解决“连接未关闭。 连接的当前状态为打开”问题

1.可以在打开连接语句外套一个判断语句 if (conn.State ==ConnectionState.Closed)    {            conn.Open();    } 2.或者查看open语句外部是否已经包裹了open的语句如: public ***** () { SqlConnection conn = new SqlConnection(*********); conn.open() using(***********) { **** **** **** **** co

JSch : channel never closed or EOF 通道未关闭

最近,我们的项目在开发远程节点管理的时候,使用了jsch库.在测试的时候发现有个节点在cmd执行完成之后,channel.isClosed()一直都是false,导致请求无法返回,但是其它有些节点就没有关系,直接执行都是正常的,返回码也是完全相同.经google,也没有找到相应解决方法比如https://github.com/lucastheisen/jsch-extension/issues/6,https://stackoverflow.com/questions/12138777/jsch