Re: How Do I Set SNI(Server Name Indentification)

2023-08-11 Thread Shawn Heisey
On 8/10/23 14:03, Petar Tahchiev wrote: Hi Jochen, I don't have 2 different SSL certificates. I have no idea what SNI is but that seems to be the only difference in the log from curl and httpclient5. https://en.wikipedia.org/wiki/Server_Name_Indication Basically it's a feature of TLS that

Re: Sockets not closing

2022-07-07 Thread Shawn Heisey
On 7/7/22 11:58, Gordon Ross wrote: I’ve tried doing the bare minimum of: InputStream is = response.getEntity().getContent(); is.close(); response.close(); I remember having some problems with connections staying open, leading the client to run out.  I was advised to make sure the entity is

Re: OS

2019-04-18 Thread Shawn Heisey
On 4/18/2019 2:03 AM, liname...@outlook.com wrote: Hello, I am doing an investigation. Does Windows Server 2019 support the following products: Apache HttpComponents 3.1 Apache HttpComponents 4.0.1 Apache HttpComponents 4.3.5 I have seen this question from you on several Apache mailing

Re: httpCore5 - ClassicGetExecutionExample

2018-08-09 Thread Shawn Heisey
On 8/8/2018 2:36 PM, Tommy Pham wrote: Ah. I forgot about Apache migrating to Git a while back. I wasn't sure if all the projects are migrated. Thank you, again. As far as I know, there is no mandate at Apache to switch everything to git.  It's up to each individual project to decide what

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-17 Thread Shawn Heisey
On 5/17/2018 3:51 AM, Oleg Kalnichevski wrote: HttpClientBuilder in HC4 got overloaded with so many connection management parameters which could easily get rendered ineffective by explicitly passing an instance of HttpClientConnectionManager to the builder. The same could with HC5 would look

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread Shawn Heisey
On 5/16/2018 8:42 AM, Shawn Heisey wrote: >   RequestConfig rc = RequestConfig.custom().setConnectTimeout(15000) >           .setSocketTimeout(12).build(); >   httpClient = HttpClients.custom().setDefaultRequestConfig(rc) > .setMaxConnPerRoute(300).setMaxConnTotal(5000).disableAuto

Re: Fwd: HttpClient5 : simple example on how to configure timeout after build()

2018-05-16 Thread Shawn Heisey
On 5/16/2018 8:09 AM, / wrote: I am looking for an example on how to configure HttpClient5 after it has been built and how to extract/print some of its configuration. Once I have an HttpClient object, how do I go about and change some of its settings, for example connection timeout or

Are there any "Upgrading from 4.x" notes for the alpha/beta 5.0 releases? (trying to update Solr)

2017-12-13 Thread Shawn Heisey
I'm trying to prepare Solr for the release of the 5.0 versions of httpcomponents.  When I update the ivy config to pull down the alpha/beta 5.0 releases, there are naturally a lot of errors in the code. The "Organize Imports" function in eclipse can find many of the classes whose packages have

maxPerRoute -- what *exactly* defines a route?

2017-11-01 Thread Shawn Heisey
One of the settings that you can set when creating HttpClient objects is the maximum connections per route on the connection manager. Increasing this value is part of making HttpClient capable of handling many threads/connections at once. The exact definition of a route is not stated in the

Can the connection pool be shut down in any way other than explicitly closing?

2017-07-18 Thread Shawn Heisey
I have a user on the solr-user mailing list who is running into an exception from HttpClient: Caused by: java.lang.IllegalStateException: Connection pool shut down at org.apache.http.util.Asserts.check(Asserts.java:34) at org.apache.http.pool.AbstractConnPool.lease(AbstractConnPool.java:184) at

Re: Support HTTP/2 protocol

2017-01-30 Thread Shawn Heisey
On 1/26/2017 8:15 AM, Oleg Kalnichevski wrote: > ALPN will be supported as soon as it is supported by the Java platform > (which is not going to happen until Java 9). I see evidence that the other Java http implementations have ALPN support already ... but those systems implement both server and

Re: HttpClient behavior on close with active connections

2016-11-10 Thread Shawn Heisey
On 11/10/2016 3:21 AM, Oleg Kalnichevski wrote: > On Wed, 2016-11-09 at 13:43 -0700, Shawn Heisey wrote: >> What happens to a long-lived HTTP connection if another thread calls >> close() on the HttpClient? Does the connection immediately die and >> throw an exception, or

HttpClient behavior on close with active connections

2016-11-09 Thread Shawn Heisey
I'm using SolrJ 6.2.1 in the program I'm writing, which pulls in httpclient/httpmime 4.5.2 and httpcore 4.4.5 as dependencies. One of the things that my SolrJ code does takes over an hour to complete. The HTTP connection is kept open for all that time. I'd like to find a way for the Solr server

Re: Controlling releaseConnection

2016-10-17 Thread Shawn Heisey
On 10/17/2016 3:22 PM, Pellerin, Clement wrote: > Our customer needs to delay the release of the connection until the response > is fully processed. > They want to turn off the early automatic release of the connection and do it > manually later. > > This is the problematic code in

Re: HttpClient is not proving to be thread-safe and reusable -- probably user error

2016-06-21 Thread Shawn Heisey
On 6/21/2016 8:56 AM, Pete Keyes wrote: > You failed to consume the response. Apache-HC will never return the > connection to the pool. Once you've hit the 500th thread all > connections are leased. In the run() method simply add a finally to > your try/catch and move the response object into

HttpClient is not proving to be thread-safe and reusable -- probably user error

2016-06-21 Thread Shawn Heisey
At the paste URL below is the code I'm using in a test. The test is checking for race conditions in some server code I've written: http://apaste.info/Vs6 This code will stop working correctly during the second loop. On the first loop, it creates 400 threads and requests the URL once in each

Re: Provide auth username/password with system properties or environment?

2015-11-19 Thread Shawn Heisey
On 11/19/2015 3:03 AM, Oleg Kalnichevski wrote: > On Wed, 2015-11-18 at 13:17 -0700, Shawn Heisey wrote: >> In the meantime, I am hoping that there is a way that Solr users can >> provide credentials to HttpClient via another means, like system >> properties or

Provide auth username/password with system properties or environment?

2015-11-18 Thread Shawn Heisey
Recent versions of Solr have added basic authentication. The Solr client functionality uses HttpClient. The start script included with Solr has some additional functionality for manipulating the running server, and the class that this script calls uses HttpClient to talk to Solr. We have an

Re: Getting SocketTimeoutException after a very short amount of time

2015-10-13 Thread Shawn Heisey
On 9/4/2015 3:18 PM, Shawn Heisey wrote: > On 9/4/2015 12:36 PM, Oleg Kalnichevski wrote: >> There is nothing wrong with your code. Feel free to run it outside >> Solr without any extra dependencies to make sure it works as intended. >> I _strongly_ suspect there is an older

Re: Code with 4.x deprecations already removed?

2015-09-14 Thread Shawn Heisey
On 9/14/2015 1:45 AM, Oleg Kalnichevski wrote: > You should not be using 5.0 unless you intent to participate in > development of HttpClient. The trunk is currently unstable and I have > no idea how long it may take for it to get stable enough for a GA > release. Please use 4.5.x branch for now.

Re: Getting SocketTimeoutException after a very short amount of time

2015-09-04 Thread Shawn Heisey
On 9/4/2015 12:36 PM, Oleg Kalnichevski wrote: > There is nothing wrong with your code. Feel free to run it outside > Solr without any extra dependencies to make sure it works as intended. > I _strongly_ suspect there is an older version of HttpClient / > HttpCore on your classpath. I'm willing

Re: Getting SocketTimeoutException after a very short amount of time

2015-09-03 Thread Shawn Heisey
On 9/3/2015 10:57 AM, Shawn Heisey wrote: > I don't see anything in the file my start script creates by > redirecting stdout, though. If everything were working right, > shouldn't I see output from setting the timeout in my own code? I replaced the client construction using Solr's HttpC

Re: Getting SocketTimeoutException after a very short amount of time

2015-08-31 Thread Shawn Heisey
On 8/31/2015 3:02 AM, Oleg Kalnichevski wrote: > The socket timeout in blocking i/o is handled by the JRE. We have no > control over it. > --- > Caused by: java.net.SocketTimeoutException: Read timed out > at java.net.SocketInputStream.socketRead0(Native Method) > --- > There likely to

Getting SocketTimeoutException after a very short amount of time

2015-08-30 Thread Shawn Heisey
I am seeing SocketTimeoutException in the log for my SolrJ program. SolrJ uses HttpClient. I'm starting with the HC list for this problem because that seems like the most likely place for a problem, but I know that it could be in SolrJ or my own code. The index cycle that timed out began at

Re: [ANNOUNCEMENT] HttpComponents Client 4.5 GA Released

2015-06-05 Thread Shawn Heisey
On 6/5/2015 3:24 AM, Oleg Kalnichevski wrote: The Apache HttpComponents project is pleased to announce 4.5 GA release of HttpComponents HttpClient. HttpClient 4.5 (GA) is a minor feature release that includes several incremental enhancements to the existing functionality such as support for

Re: [ANNOUNCEMENT] HttpComponents Core 4.4.1 GA released

2015-03-20 Thread Shawn Heisey
On 3/20/2015 11:24 AM, Oleg Kalnichevski wrote: The Apache HttpComponents project is pleased to announce 4.4.1 GA release of HttpComponents Core. You probably don't hear this enough ... thank you to anyone who works on this project. You make a lot of other software possible. For the sake of

Re: HTTP 2 and Apache HTTP client

2015-01-09 Thread Shawn Heisey
On 1/9/2015 2:41 AM, Oleg Kalnichevski wrote: Shawn, I can work on HC in my spare time only. Even if I quit my day job and divorce my wife I am not sure HTTP/2.0 in HC by the end of February is realistic. The best case scenario would be having BETA quality support for HTTP/2.0 by the end of

Re: HTTP 2 and Apache HTTP client

2015-01-08 Thread Shawn Heisey
On 1/8/2015 5:28 PM, Stefan Magnus Landrø wrote: Maybe consider jetty instead? https://github.com/eclipse/jetty.project/blob/jetty-http2/jetty-http2/http2-client/src/test/java/org/eclipse/jetty/http2/client/Client.java For an Apache project like Solr (which uses HttpClient and is my primary

Re: HTTP 2 and Apache HTTP client

2015-01-08 Thread Shawn Heisey
On 1/8/2015 7:20 AM, Oleg Kalnichevski wrote: There is no concrete roadmap for HTTP/2.0 yet. An immediate objective is full compliance with the latest HTTP/1.1 spec (RFC 7230 and related) https://wiki.apache.org/HttpComponents/HttpComponentsRoadmap Recently I read through the draft RFC for

Re: [ANNOUNCEMENT] HttpComponents Core 4.4 GA released

2014-12-19 Thread Shawn Heisey
On 12/19/2014 6:39 AM, Oleg Kalnichevski wrote: It is a GA release of core components HttpClient is based up. HttpClient 4.4 GA is not ready yet. Got it. Missed that little detail. Thanks, Shawn - To unsubscribe, e-mail:

Re: [ANNOUNCEMENT] HttpComponents Core 4.4 GA released

2014-12-18 Thread Shawn Heisey
On 12/18/2014 1:41 AM, Oleg Kalnichevski wrote: The Apache HttpComponents project is pleased to announce 4.4 GA release of HttpComponents Core. I'm trying to upgrade the Lucene-Solr codebase to use HC 4.4, but ivy can't find it. It's missing from the maven repo that ivy tried to use for

Re: HttpClient v4.x deprecations

2014-09-24 Thread Shawn Heisey
On 9/24/2014 3:45 PM, Todd W Lainhart wrote: Is there a policy regarding when deprecated APIs are finally removed from subsequent distributions? E.G. If I find a field marked as @deprecated as of 4.2, when would I expect it to get pulled, if at all? Or is the policy not to expect any

Re: Fwd: Connection timeout doesn't behave the same on windows and linux

2014-03-03 Thread Shawn Heisey
On 3/3/2014 9:00 AM, Bratislav Stojanovic wrote: It seems that connection timeout parameter doesn't work on Linux Mint 16 (which is basically Ubuntu). *Code runs perfectly fine on Windows.*Here's my setup : snip *.setConnectTimeout(1000)* snip *The problem : when I run this code on

Re: How to know which port is newly created for the connection ?

2014-02-17 Thread Shawn Heisey
On 2/17/2014 12:34 AM, Kiran Chitturi wrote: Thank you so much for your reply. If I use the 'SystemDefaultHttpClient' for creating http client, there are many options for configuring the http client like socket reuse, disabling stale check, etc.. that are not possible to configure through

Re: How to know which port is newly created for the connection ?

2014-02-16 Thread Shawn Heisey
On 2/14/2014 2:15 PM, Kiran Chitturi wrote: I am using http client 4.3.2 and I have a few questions. 1) I am making lot of concurrent requests to a server. When creating requests, I want to debug and check which ports are newly created by the client. Currently, I can see the ports in

Re: Migrating to HttpClient 4.3.1 from 4.2.6 - Solr

2014-01-09 Thread Shawn Heisey
On 1/5/2014 9:03 AM, Oleg Kalnichevski wrote: That is intended. HttpClient instances are expected to be immutable (not their dependencies though). This helps make them thread safe without incurring an overhead of synchronization. One should customize individual requests or execution contexts