hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey B. (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HTTPCLIENT-1362) Confusing message in HttpHostConnectException
Date Fri, 31 May 2013 18:45:20 GMT

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

Sergey B. commented on HTTPCLIENT-1362:
---------------------------------------

Below is an example of occurrence of the bug:

org.apache.http.conn.HttpHostConnectException: Connection to https://ir.nalog.ru:8443 refused
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158)
~[httpclient-4.1.2.jar:4.1.2]
        at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149) ~[httpclient-4.1.2.jar:4.1.2]
        at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
~[httpclient-4.1.2.jar:4.1.2]
        at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
~[httpclient-4.1.2.jar:4.1.2]
        at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
~[httpclient-4.1.2.jar:4.1.2]
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
~[httpclient-4.1.2.jar:4.1.2]
        at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
~[httpclient-4.1.2.jar:4.1.2]
        at ru.bm.ws.unisoft.FnsService.processRequest(FnsService.java:152) [FnsService.class:na]
        at ru.bm.ws.unisoft.FnsService.doPost(FnsService.java:84) [FnsService.class:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:641) [servlet-api.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:722) [servlet-api.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
[catalina.jar:7.0.21]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
[catalina.jar:7.0.21]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:207)
[catalina.jar:7.0.21]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:185)
[catalina.jar:7.0.21]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
[catalina.jar:7.0.21]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:151) [catalina.jar:7.0.21]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100) [catalina.jar:7.0.21]
        at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929) [catalina.jar:7.0.21]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
[catalina.jar:7.0.21]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405) [catalina.jar:7.0.21]
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:269) [tomcat-coyote.jar:7.0.21]
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
[tomcat-coyote.jar:7.0.21]
        at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:300)
[tomcat-coyote.jar:7.0.21]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
[na:1.6.0_24]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
[na:1.6.0_24]
        at java.lang.Thread.run(Thread.java:679) [na:1.6.0_24]
Caused by: java.net.ConnectException: Connection timed out
        at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.6.0_24]
        at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:327) ~[na:1.6.0_24]
        at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:193)
~[na:1.6.0_24]
        at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:180) ~[na:1.6.0_24]
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:384) ~[na:1.6.0_24]
        at java.net.Socket.connect(Socket.java:546) ~[na:1.6.0_24]
        at sun.security.ssl.SSLSocketImpl.connect(SSLSocketImpl.java:584) ~[na:1.6.0_24]
        at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:375)
~[httpclient-4.1.2.jar:4.1.2]
        at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
~[httpclient-4.1.2.jar:4.1.2]
        ... 26 common frames omitted

                
> Confusing message in HttpHostConnectException
> ---------------------------------------------
>
>                 Key: HTTPCLIENT-1362
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1362
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>            Reporter: Sergey B.
>            Priority: Trivial
>              Labels: exception
>
> TCP connection can fail with two different kind of errors: 'Connection timed' out and
'Connection refused'. When a connection error occurs HttpClient catches SocketException and
replaces it with HttpHostConnectException. In addition to exception class it replaces exception
message, changing original text with 'Connection to ... refused'. This message is confusing
because it looks very much like SocketException 'Connection refused', but in fact it hides
original 'Connection timed out'.
> Consider using different messages in HttpHostConnectException depending on parent exception.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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


Mime
View raw message