hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Krosnev (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HTTPCORE-420) Connections left open after HTTP synchronous server shutdown
Date Tue, 29 Mar 2016 15:23:25 GMT

     [ https://issues.apache.org/jira/browse/HTTPCORE-420?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Anton Krosnev updated HTTPCORE-420:
-----------------------------------
    Description: 
I have the following problem on Linux  with Apache HttpComponents 4.4.1 synchronous server:
After calling server.shutdown(42, TimeUnit.MICROSECONDS),  if there are Keep-alive connections
opened (there is no request processing), these sockets are not closed. Only ServerSocket is
closed:

bq. netstat -aon | grep 58276

bq. TCP    127.0.0.1:50658        127.0.0.1:58276        ESTABLISHED     18012

bq. TCP    127.0.0.1:58276        127.0.0.1:50658        ESTABLISHED     18012

In attempt to start again HTTP server on the same port a BindingException is thrown:


bq. Caused by: java.net.BindException: Address already in use

bq. at java.net.PlainSocketImpl.socketBind(Native Method)

bq. at java.net.PlainSocketImpl.socketBind(PlainSocketImpl.java:521)

bq. at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:414)

bq. at java.net.ServerSocket.bind(ServerSocket.java:326)

bq. at java.net.ServerSocket.<init>(ServerSocket.java:192)

bq. at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:170)

bq. at org.apache.http.impl.bootstrap.HttpServer.start(HttpServer.java:116)

On Windows the behavior is the same , however there is no BindingException and the server
starts process requests without any problems.

> Connections left open after HTTP synchronous server shutdown
> ------------------------------------------------------------
>
>                 Key: HTTPCORE-420
>                 URL: https://issues.apache.org/jira/browse/HTTPCORE-420
>             Project: HttpComponents HttpCore
>          Issue Type: Bug
>          Components: HttpCore
>    Affects Versions: 4.4.3
>         Environment: java version "1.8.0_65"
> Java(TM) SE Runtime Environment (build 1.8.0_65-b17)
> Java HotSpot(TM) 64-Bit Server VM (build 25.65-b01, mixed mode)
> Linux 3.0.101-0.47.71-default #1 SMP Thu Nov 12 12:22:22 UTC 2015 (b5b212e) x86_64 x86_64
x86_64 GNU/Linux
>            Reporter: Anton Krosnev
>             Fix For: 4.4.5
>
>
> I have the following problem on Linux  with Apache HttpComponents 4.4.1 synchronous server:
After calling server.shutdown(42, TimeUnit.MICROSECONDS),  if there are Keep-alive connections
opened (there is no request processing), these sockets are not closed. Only ServerSocket is
closed:
> bq. netstat -aon | grep 58276
> bq. TCP    127.0.0.1:50658        127.0.0.1:58276        ESTABLISHED     18012
> bq. TCP    127.0.0.1:58276        127.0.0.1:50658        ESTABLISHED     18012
> In attempt to start again HTTP server on the same port a BindingException is thrown:
> bq. Caused by: java.net.BindException: Address already in use
> bq. at java.net.PlainSocketImpl.socketBind(Native Method)
> bq. at java.net.PlainSocketImpl.socketBind(PlainSocketImpl.java:521)
> bq. at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:414)
> bq. at java.net.ServerSocket.bind(ServerSocket.java:326)
> bq. at java.net.ServerSocket.<init>(ServerSocket.java:192)
> bq. at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:170)
> bq. at org.apache.http.impl.bootstrap.HttpServer.start(HttpServer.java:116)
> On Windows the behavior is the same , however there is no BindingException and the server
starts process requests without any problems.



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

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


Mime
View raw message