java.net.HttpRetryException: cannot retry due to server authentication, in streaming mode

I faced the same issue when using SimpleClientHttpRequestFactory. Solved it by setting

SimpleClientHttpRequestFactory requestFactory = new SimpleClientHttpRequestFactory();
requestFactory.setOutputStreaming(false);
return requestFactory;

The problem is due to chunking and subsequent retry mechanism incase of authentication.

You can also disable chunks using HttpClientPolicy

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)