Re: CPU usage at 100% after a while

2022-02-21 Thread Bernd Eckenfels
Hello, Just want to add that selector problems have not been seldom in the past, and that there is also currently a project to replace the selector socket mechanism on Windows. ( https://mail.openjdk.java.net/pipermail/nio-dev/2021-May/008988.html ) And there have been some problems with

Re: Response buffer size

2021-01-08 Thread Bernd Eckenfels
Might depend on the server block size or tcp buffers, as it will not wait till the buffers are filled, it only processes the data available in a single read. Gruss Bernd -- http://bernd.eckenfels.net Von: Joan grupoventus Gesendet: Friday, January 8, 2021

Re: Server-side mid-air connection close on upload

2020-05-26 Thread Bernd Eckenfels
Michael, this looks a bit like the packets in between have been TLS handshakes which have not been carried out because the engine was not kicked off. Maybe a starHandshake() would help? Or can you share the full traces? Did you try http as well? Bernd -- http://bernd.eckenfels.net

Re: Server-side mid-air connection close on upload

2020-05-22 Thread Bernd Eckenfels
Hello, the blocking code could use a different reader thread, but maybe that would be too much overhead? (Having a single polling thread might have a lower footprint but could create concurrency stress) The question is if the sync code could use available() after sending some buffers (not

Re: How to post Kafka Avro records with httpclient

2020-04-06 Thread Bernd Eckenfels
You post the serialized Avro message as a byte array (or other protocols like bas64 form fields or whatever the server expects). Text mode might not be the most efficient protocol to use. Greetings Bernd -- http://bernd.eckenfels.net Von: amruta dale Gesendet:

Re: High CPU utilization with HTTP Client 4.x vs HTTP Client 3.x

2019-12-19 Thread Bernd Eckenfels
Hello, Can you link to the code on a web page like Github Gists, the attachments do not survive the mailing list. However it's unlikely that somebody can work specifically on your problem. Do you see different speeds or maybe did some profiling which can make this a bit easier to

Re: Way to send p12 file with post payload in httpclient 4.5.4

2019-09-26 Thread Bernd Eckenfels
Maybe using a ByteArrayBody or FileBody should help, since the InputStream can be consumed only once. Gruss Bernd -- http://bernd.eckenfels.net Von: Khare, Aparna Gesendet: Donnerstag, September 26, 2019 9:03 AM An: HttpClient User Discussion Betreff: Way to

Re: apache httpclient

2019-09-12 Thread Bernd Eckenfels
textBuilder.java:253) at org.apache.http.examples.client.ClientCustomSSL.main(ClientCustomSSL.java:52) Regards Somshekar C Kadam 9036660538 On Fri, Sep 6, 2019 at 11:29 PM Bernd Eckenfels wrote: > You need to specify the classpath and the full class name (including > package). > >

Re: apache httpclient

2019-09-06 Thread Bernd Eckenfels
@celsys041:~$ Regards Somshekar C Kadam 9036660538 On Fri, Sep 6, 2019 at 2:13 PM Bernd Eckenfels wrote: > You are not specifying a classpath? TrustStrategy is part of > httpcomponents-core. > > > -- > http://bernd.eckenfels.net > >

Re: apache httpclient

2019-09-06 Thread Bernd Eckenfels
t;> > > > ClientCustomSSL.java:64: error: cannot find symbol >> > > > >> > > > System.out.println(EntityUtils.toString(response.getEntity())); >> > > > ^ >> > > > symbol: variable EntityUtils >> > >

Re: apache httpclient

2019-09-05 Thread Bernd Eckenfels
time to connect same https link. I am not able to compile the > program, I will provide the details in a while (added jar file for > httpcore). So reuested to provide any link or steps > > Thanks in advance > > Regards > Somshekar C Kadam > 9036660538 > > > On Thu, Sep

Re: apache httpclient

2019-09-05 Thread Bernd Eckenfels
nal SSLSession sslSession = clientContext.getSSLSession(); if (sslSession != null) { System.out.println("SSL protocol " + sslSession.getProtocol()); System.out.println("SSL cipher suite " + sslSession.getCipherSuite()); } } } } } === Regards Somshekar C Kadam 9

Re: apache httpclient

2019-09-05 Thread Bernd Eckenfels
Hello, Certainly you can use the Apache HTTPClient to replace URLConnection, you don’t need to do anything special on ARM other than having Java Runtime installed. If you have a slow http download changes are high this is caused by slow CPU, missing random numbers, slow network or server. All

Re: [HttpClient 4.5.5 ]Proxy-Authorization header missing while requesting HTTPS url

2019-07-15 Thread Bernd Eckenfels
The scenario is different, with http you have the proxy and taget request being the same, with connect proxies they are separate requests. In both cases however you would not set the header yourself but use the appropriate authentication method on the proxy scope of the credential provider

Re: Confused about PoolingHttpClientConnectionManager's mechanism

2018-09-18 Thread Bernd Eckenfels
Hello, Did you actually read/consumed everything of the InputStream and is this a HTTP/1.1 service with Keepalive? Gruss Bernd Gruss Bernd -- http://bernd.eckenfels.net Von: 安 琦 Gesendet: Dienstag, September 18, 2018 11:32 AM An:

Re: so_reuseport and HttpClientConnection

2018-07-23 Thread Bernd Eckenfels
. With SO_REUSEPORT, it almost seems like I need the remote port to distinguish/check out a connection from the pool manager. Or I’ve to solve the problem in a different way on the server side. With regards, M.P. Ardhanareeswaran > On Jul 23, 2018, at 7:18 AM, Bernd Eckenfels wrote: > > Hello, > &

Re: so_reuseport and HttpClientConnection

2018-07-23 Thread Bernd Eckenfels
Hello, I am pretty sure there is no way to connect to a specific listener. However I am also pretty sure you would have to ask Httpd or Nginx projects instead. However I am also sure that you normally don’t need it, must of the caches are shared across all the workers (or sessions beeing

Re: SSL Certificate exceptions and defensive coding

2017-11-07 Thread Bernd Eckenfels
13:36, Bernd Eckenfels <e...@zusammenkunft.net> wrote: > Without knowing your code it is hard to tell what is configured. You can > implement multiple strategies for server certificate checking (including to > ignore the checks or use the default cacerts trust store) > >

Re: SSL Certificate exceptions and defensive coding

2017-11-06 Thread Bernd Eckenfels
Without knowing your code it is hard to tell what is configured. You can implement multiple strategies for server certificate checking (including to ignore the checks or use the default cacerts trust store) Gruss Bernd -- http://bernd.eckenfels.net From: Mohan

Re: Upgrading from Httpclient 3.1 to 4.5 - localhost:443 not responding

2017-04-26 Thread Bernd Eckenfels
BTW: If you serialized your object into a BOS you catcall toByteArray() and give that as an in memory entity content, there is no point to put an input stream on top of it to feed the entity. Gruss Bernd -- http://bernd.eckenfels.net From: Hassan Khan

Re: Side effects of ignoring JSESSIONID in a multi-threaded application

2017-04-03 Thread Bernd Eckenfels
Hello, I fully agree with both: it is typically a good idea to turn off cookie handling if you know your requests have to be statelessly processed and it is a warning sign if the server issues sessions when it should not need to. (There might be however some cache advantage of sticky sessions

Re: TLSv1.2 with cipher SHA256/384

2017-04-02 Thread Bernd Eckenfels
It is a Java problem and you can try the new BouncyCastle JSSE Provider to get modern ciphers on older Android. Gruss Bernd -- http://bernd.eckenfels.net From: Jacky.Lam Sent: Monday, April 3, 2017 5:12:49 AM To:

Re: How to work with HttpPut?

2017-01-27 Thread Bernd Eckenfels
Hello, You are using a multipart entity as you want to upload a form. Since the server stores all headers I guess it is expecting a simple entity with the raw content instead. (I think EntityBuilder.setFile()) Gruss Bernd -- http://bernd.eckenfels.net

Re: Is HttpClient thread safe?

2016-12-31 Thread Bernd Eckenfels
Hello, You can and should share the ahttpClient among multiple request threads. This way it can do pooling, keep alive and resource management. However do not concurrently use connections and basically stick to one thread for a complete execution. HttpResponse and Entity should be processed

Re: HttpAsyncClient bounded download size

2016-12-06 Thread Bernd Eckenfels
Hello, Can't help you with the code but just to make sure you also consider an additional option: in order to be friendly to servers you can request a partial response with a range header in the first place (however not sure about the interop impact). Gruss Bernd -- http://bernd.eckenfels.net

Re: RFC 6265 and non-prefix cookie path

2016-11-26 Thread Bernd Eckenfels
Why not keep it as a sane default behavior? Since there is a security warning it is reasonable to implement a counter measurement, especially if it was the prescribed method in the past. Gruss Bernd -- http://bernd.eckenfels.net On Sat, Nov 26, 2016 at 4:29 PM +0100, "Oleg Kalnichevski"

Re: SSL Handshake : timing and timeout

2016-11-15 Thread Bernd Eckenfels
Hello, A loop can IMHO only happen if one site violates thenprotocol and the other does not catch it. So it is seldom. A request- or header- Timeout would include it. But if you want to also abort connects in a delayed handshake then you would would need to watch the progress with a timer or

Re: RetryHandler Per GetMethod

2016-11-10 Thread Bernd Eckenfels
In fact the retry handlers (some implementations)  already look at the method and only retry idempotent methods Gruss Bernd -- http://bernd.eckenfels.net On Thu, Nov 10, 2016 at 11:15 AM +0100, "Oleg Kalnichevski" wrote: On Wed, 2016-11-09 at 09:05 -0500, Murat

Re: Why are many TCP open connections created on OS (Linux)?

2016-10-04 Thread Bernd Eckenfels
Am Tue, 4 Oct 2016 14:00:38 + schrieb "Gnerlich, Manuel (IPS PROJECTS GMBH)" : > I am using Apache AsychHttpClient with connection pool to send more > than 1 mio requests and configured maxinum number of connection (200) > and of connection per Host (100). > >

Re: Apache HTTP Implementation

2016-09-30 Thread Bernd Eckenfels
Am Fri, 30 Sep 2016 14:56:24 -0400 schrieb Ketan Nale : > Hi All, > > I want to build RESTful web service client using Apache HTTP client > API. Is there any existing implementation approach available to start > with? RESTeasy Client uses Apache httpclient and provides all

Re: CloseableHttpClient and custom verification of SSL session

2016-08-22 Thread Bernd Eckenfels
Hello, I guess it depends on the definition of "verifying session", for example I was using the TrustStrategy to do (additional) certificate public key info pinning: pinnedCertTrust = new PinnedCertTrust("...="); // this context falls back to system trust material (but first checks pinning)

Re: Trust all certificates

2016-04-08 Thread Bernd Eckenfels
Hello, I suspect it is a problem with too short DH keys offered by Java 7 clients. You can try to turn TLS_DHE_* ciphers off. According to SSL Labs it does also support ECDHE which should then work fine. https://www.ssllabs.com/ssltest/analyze.html?d=www.trf5.jus.br=189.39.123.181 Gruss Bernd

Re: Trust all certificates

2016-04-08 Thread Bernd Eckenfels
The exception you are showing means the server terminated the handshake for some reason. Hard to say why. It might require a client cert or does not like yout proposed ciphers or ssl protocols. This particular exception seems not related to untrusted certificates, your different approaches are