You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "praveen neppalli naga (JIRA)" <ji...@apache.org> on 2009/05/11 21:43:45 UTC

[jira] Created: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

HttpClient:- Connections not released when SSL Tunneling fails.
---------------------------------------------------------------

                 Key: HTTPCLIENT-848
                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
             Project: HttpComponents HttpClient
          Issue Type: Bug
          Components: HttpConn
    Affects Versions: 3.1 Final
            Reporter: praveen neppalli naga


Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 

The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
HttpMethidDirector.java:  executeWithRetry()
when executeConnect() return false and there is no retry, the connections are not released.

Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "praveen neppalli naga (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708196#action_12708196 ] 

praveen neppalli naga commented on HTTPCLIENT-848:
--------------------------------------------------

absolutely. I do HttpMethod#releaseConnection() in the finally block.

I debugged through the code before i opened this issue. 

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709953#action_12709953 ] 

Oleg Kalnichevski commented on HTTPCLIENT-848:
----------------------------------------------

Feel free to re-open the issue and attach a wire/context log (which can be produced using thus guide [1]) and the test case.

Oleg

[1] http://hc.apache.org/httpclient-3.x/logging.html

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Updated: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "praveen neppalli naga (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

praveen neppalli naga updated HTTPCLIENT-848:
---------------------------------------------

    Attachment: context.log
                HttpClientTest.java

Attached the logs and the test case.
This is the scenario.

Make https get  call using httpclient 3.1 to say "https://www.verisin.com/"
Have a squid proxy and dont authorize "https://www.verisin.com/" in the acl list, so squid will block this call.
As expected httpClient makes a CONNECT with squid proxy to tunnel with the host.
Squid responds back with 403.
httpClient does not release connection to the pool so any subsequent calls for the same host will not get connection.
MaxTotalConnections = 4
DefaultMaxConnectionsPerHost = 1

The expected behavior is that, httpClient releases the connection to the pool for this specific host when CONNECT call fails.

Also Pplease let me know if I doing something wrong.

Thanks
Praveen

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>         Attachments: context.log, HttpClientTest.java
>
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Reopened: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "praveen neppalli naga (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

praveen neppalli naga reopened HTTPCLIENT-848:
----------------------------------------------


Reopening,
I am going to attach the context/wire logs and a simple test case.

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708192#action_12708192 ] 

Oleg Kalnichevski commented on HTTPCLIENT-848:
----------------------------------------------

Are you sure your application _always_ invokes HttpMethod#releaseConnection() when done with the request? The best way to ensure the underlying connection gets released back to the pool is by calling this method from a finally block.

Oleg

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "praveen neppalli naga (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710512#action_12710512 ] 

praveen neppalli naga commented on HTTPCLIENT-848:
--------------------------------------------------

I verified the fix and it works fine.
Thanks for  your quick turn around.

Do you want me to go ahead and close the issue?

Also when do you think this fix will be released?

Thanks
Praveen

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>             Fix For: 3.1.1
>
>         Attachments: context.log, HttpClientTest.java
>
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12708201#action_12708201 ] 

Oleg Kalnichevski commented on HTTPCLIENT-848:
----------------------------------------------

Could you please attach a _complete_ context / wire log of a session exhibiting the problem? 

Even if this is a genuine bug in HttpClient it is unlikely to get fixed, as 3.x branch is effectively approaching end of life. Consider upgrading to HttpClient 4.0

Oleg

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-848.
------------------------------------------

       Resolution: Fixed
    Fix Version/s: 3.1.1

Fixed in SVN trunk. Please re-test.

Oleg

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>             Fix For: 3.1.1
>
>         Attachments: context.log, HttpClientTest.java
>
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Resolved: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Oleg Kalnichevski resolved HTTPCLIENT-848.
------------------------------------------

    Resolution: Invalid

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "praveen neppalli naga (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12709949#action_12709949 ] 

praveen neppalli naga commented on HTTPCLIENT-848:
--------------------------------------------------

Hi Oleg, sorry for the delayed response. I just saw you resolved the issue.

I tested the scenario with 4.0 and i dont see the problem. 
But I just want to prove that its a bug in 3.x version as I am not in a position to upgrade to 4.0 as its a beta. 
What information/logs do you need. I have a test case which will reproduce this behavior.

Thanks
Praveen

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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


[jira] Commented: (HTTPCLIENT-848) HttpClient:- Connections not released when SSL Tunneling fails.

Posted by "Oleg Kalnichevski (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HTTPCLIENT-848?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710663#action_12710663 ] 

Oleg Kalnichevski commented on HTTPCLIENT-848:
----------------------------------------------

> Also when do you think this fix will be released?

Praveen,

It is very unlikely there will ever be another official release of the 3.x branch

Oleg

> HttpClient:- Connections not released when SSL Tunneling fails.
> ---------------------------------------------------------------
>
>                 Key: HTTPCLIENT-848
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-848
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpConn
>    Affects Versions: 3.1 Final
>            Reporter: praveen neppalli naga
>             Fix For: 3.1.1
>
>         Attachments: context.log, HttpClientTest.java
>
>
> Trying to use HTTPS, and SSL tunneling fails as expected because the host is not accepted by the squid proxy, so squid proxy return 403. 
> The problem I am seeing is that, when ever this happens the connections are not released to the pool. I traced the code and it appears that in 
> HttpMethidDirector.java:  executeWithRetry()
> when executeConnect() return false and there is no retry, the connections are not released.
> Is this expected? Or am I doing something wrong.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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