You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "kjhawierhjbasdf (Jira)" <ji...@apache.org> on 2020/10/05 03:15:00 UTC

[jira] [Commented] (DIRMINA-1135) Connections hanging around in CLOSE_WAIT state, not getting cleaned up properly

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

kjhawierhjbasdf commented on DIRMINA-1135:
------------------------------------------

I have attached screenshot which shows connections status, these connections are in CLOSE_WAIT state from last couple of days.

I have seen multiple scenarios where connections are getting hung up in CLOSE_WAIT state. One of them is - I have explained in description part, about health check configuration from aws application load balancer.

Is there a way to close such connections forcefully from server side, without killing the parent process. I have tried fetching all the connections and by checking their IDLE status, I tried to call close and destroy, but that also did not cleaned connections.

> Connections hanging around in CLOSE_WAIT state, not getting cleaned up properly
> -------------------------------------------------------------------------------
>
>                 Key: DIRMINA-1135
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1135
>             Project: MINA
>          Issue Type: Bug
>            Reporter: kjhawierhjbasdf
>            Assignee: Jonathan Valliere
>            Priority: Major
>         Attachments: Screenshot 2020-10-05 at 8.31.37 AM.png
>
>
> Hello Team,
> We are using Apache MINA(v2.0.21) for tcp tls server implementation.
> I tried with running following operations in loop,
> establishing 200-300 connections 
> sending data
> closing connections
> And I observed that, closed connections were getting cleaned up properly.
> In another scenario, We tried configuring AWS ALB and target group, which was establishing connection for healthcheck. These were not valid tls connections, but only tcp connections. And In this case, we observed that, connections were in CLOSE_WAIT state, And these CLOSE_WAITs are hanging around far too long. This was impacting our service.
> I did debug the TCP server code, I found that when the sessionClosed method is never getting called. Then I tried closing session from sessionIdle method, Even after that session.isConnected is showing true, connection is not getting closed.
>  
> Our product owner is raising concern about, we should be able to avoid denial of service attack.
>  
> Can you please provide pointers to investigate further.
> Thanks,
> Rupesh Shah



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org