You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Ashish Singhi (JIRA)" <ji...@apache.org> on 2016/01/11 18:22:40 UTC

[jira] [Commented] (HBASE-9393) Hbase does not closing a closed socket resulting in many CLOSE_WAIT

    [ https://issues.apache.org/jira/browse/HBASE-9393?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15092315#comment-15092315 ] 

Ashish Singhi commented on HBASE-9393:
--------------------------------------

We are able to reproduce this by executing the below simple scenario:
0. Check the total number of CLOSE_WAIT connections already existing for a RS 
1. Create a table
2. Put a row
3. Flush the table  (Ensure the store file is assigned to the same RS)
Now we can notice there will be a new CLOSE_WAIT connection.

>From initial analysis we found that for every HFile on a RS we have a CLOSE_WAIT connection to it. When we disable the table all the CLOSE_WAIT connections to it are closed and on enabling it we see again the CLOSE_WAIT connections to it.
The StoreFile$Reader has FSDataInputStreamWrapper which is open and not closed. During disable of the table we saw that the close method is getting called. I still need to check the reason behind keeping these open.

We have also checked that a HDFS client opening a connection to a file and not closing that client will show up a new CLOSE_WAIT connection.

> Hbase does not closing a closed socket resulting in many CLOSE_WAIT 
> --------------------------------------------------------------------
>
>                 Key: HBASE-9393
>                 URL: https://issues.apache.org/jira/browse/HBASE-9393
>             Project: HBase
>          Issue Type: Bug
>    Affects Versions: 0.94.2, 0.98.0
>         Environment: Centos 6.4 - 7 regionservers/datanodes, 8 TB per node, 7279 regions
>            Reporter: Avi Zrachya
>
> HBase dose not close a dead connection with the datanode.
> This resulting in over 60K CLOSE_WAIT and at some point HBase can not connect to the datanode because too many mapped sockets from one host to another on the same port.
> The example below is with low CLOSE_WAIT count because we had to restart hbase to solve the porblem, later in time it will incease to 60-100K sockets on CLOSE_WAIT
> [root@hd2-region3 ~]# netstat -nap |grep CLOSE_WAIT |grep 21592 |wc -l
> 13156
> [root@hd2-region3 ~]# ps -ef |grep 21592
> root     17255 17219  0 12:26 pts/0    00:00:00 grep 21592
> hbase    21592     1 17 Aug29 ?        03:29:06 /usr/java/jdk1.6.0_26/bin/java -XX:OnOutOfMemoryError=kill -9 %p -Xmx8000m -ea -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -Dhbase.log.dir=/var/log/hbase -Dhbase.log.file=hbase-hbase-regionserver-hd2-region3.swnet.corp.log ...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)