commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mahendran Pirinthapan <mpirintha...@gmail.com>
Subject [commons-httpclient] Continuously getting 401 response when using commons-httpclient
Date Tue, 12 May 2015 15:18:00 GMT
Hi all,

We are using apache commons-httpclient-3.1.0 in our project to send Rest
call requests to Jenkins server, which is deployed in our environment. We
have the following code to set the credentials for the requests.

httpClient.getState().setCredentials(AuthScope.ANY,new
UsernamePasswordCredentials(
                                                         username,
password));
httpClient.getParams().setAuthenticationPreemptive(true);

In our production environment if one request is responded with 401 status
code by Jenkins then the subsequent requests also fails with 401 status
code. Please find the debug log in [1].

Since our production environment is a long running server we can not
restart it frequently. So the above issue affects all the users if it
occurred once.

I kindly expect your thoughts on resolving this issue.

1.
https://drive.google.com/file/d/0B4YeqhMGkQxvZzYzVEVZVWgyUXc/view?usp=sharing


Thanks & Regards,
M.Pirinthapan


<https://plus.google.com/u/0/+MahendranPirinthapan/about>
<http://lk.linkedin.com/in/pirinthapan>
<https://www.facebook.com/MahendranPrinthapan/about>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message