org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials

Jenkins JIRA | Christian Effertz | 11 months ago
  1. 0

    We have a similar issue as described in JENKINS-3350 _Connect to update center via HTTP proxy that requires NTLM authentication_ But our proxy does not require NTLM authentication, it just likes it best. I found this out via reading the log entries generated by the apache httpclient during an attempt to download a plugin. There you can read {code} Dec 15, 2015 12:43:02 PM FINE org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme Supported authentication schemes in the order of preference: [ntlm, digest, basic] Dec 15, 2015 12:43:02 PM INFO org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme ntlm authentication scheme selected Dec 15, 2015 12:43:02 PM FINE org.apache.commons.httpclient.auth.AuthChallengeProcessor processChallenge Using authentication scheme: ntlm Dec 15, 2015 12:43:02 PM FINE org.apache.commons.httpclient.auth.AuthChallengeProcessor processChallenge Authorization challenge processed ... Dec 15, 2015 12:43:02 PM SEVERE org.apache.commons.httpclient.HttpMethodDirector authenticate Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:332) at org.apache.commons.httpclient.HttpMethodDirector.authenticateProxy(HttpMethodDirector.java:320) {code} To highlight it * Supported authentication schemes in the order of preference: ntlm, digest, basic * ntlm authentication scheme selected - automatically by apache http client So in our case we could get around all this hassle if there was an option on the proxy page to define the authentication scheme the http client shall use. If I find the time I will have a look if I can propose a pull request. I have attached a small draft how it could look like !jenkins-auth-scheme.png|thumbnail! Why the priority major? For me it is rather cumbersome to manually download all plugins in order to upload them into jenkins via the internal plugin upload page. Moreover the nice feature of the self-updating jenkins is broken for us.

    Jenkins JIRA | 11 months ago | Christian Effertz
    org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
  2. 0

    We have a similar issue as described in JENKINS-3350 _Connect to update center via HTTP proxy that requires NTLM authentication_ But our proxy does not require NTLM authentication, it just likes it best. I found this out via reading the log entries generated by the apache httpclient during an attempt to download a plugin. There you can read {code} Dec 15, 2015 12:43:02 PM FINE org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme Supported authentication schemes in the order of preference: [ntlm, digest, basic] Dec 15, 2015 12:43:02 PM INFO org.apache.commons.httpclient.auth.AuthChallengeProcessor selectAuthScheme ntlm authentication scheme selected Dec 15, 2015 12:43:02 PM FINE org.apache.commons.httpclient.auth.AuthChallengeProcessor processChallenge Using authentication scheme: ntlm Dec 15, 2015 12:43:02 PM FINE org.apache.commons.httpclient.auth.AuthChallengeProcessor processChallenge Authorization challenge processed ... Dec 15, 2015 12:43:02 PM SEVERE org.apache.commons.httpclient.HttpMethodDirector authenticate Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:332) at org.apache.commons.httpclient.HttpMethodDirector.authenticateProxy(HttpMethodDirector.java:320) {code} To highlight it * Supported authentication schemes in the order of preference: ntlm, digest, basic * ntlm authentication scheme selected - automatically by apache http client So in our case we could get around all this hassle if there was an option on the proxy page to define the authentication scheme the http client shall use. If I find the time I will have a look if I can propose a pull request. I have attached a small draft how it could look like !jenkins-auth-scheme.png|thumbnail! Why the priority major? For me it is rather cumbersome to manually download all plugins in order to upload them into jenkins via the internal plugin upload page. Moreover the nice feature of the self-updating jenkins is broken for us.

    Jenkins JIRA | 11 months ago | Christian Effertz
    org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
  3. 0

    Failed to by pass proxy

    htmlunit | 8 years ago | doublez78
    org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Heritrix fails to handle a server that responds to a request with a 401 including for example these 2 headers: WWW-Authenticate: NTLM WWW-Authenticate: Basic realm="testrealm" Heritrix doesn't support NTLM, but it does support basic, and even if it is configured properly for the site in question, we get this: 2011-07-30 01:21:51.629 SEVERE thread-21 org.apache.commons.httpclient.HttpMethodDirector.authenticate() Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials at org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:332) at org.apache.commons.httpclient.HttpMethodDirector.authenticateHost(HttpMethodDirector.java:282) at org.apache.commons.httpclient.HttpMethodDirector.authenticate(HttpMethodDirector.java:234) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:170) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.archive.modules.fetcher.FetchHTTP.innerProcess(FetchHTTP.java:642) at org.archive.modules.Processor.innerProcessResult(Processor.java:175) at org.archive.modules.Processor.process(Processor.java:142) at org.archive.modules.fetcher.FetchHTTP.process(FetchHTTP.java:904) at org.archive.modules.ProcessorChain.process(ProcessorChain.java:131) at org.archive.crawler.framework.ToeThread.run(ToeThread.java:147) Reported on the mailing list by Adam Wilmer: http://tech.groups.yahoo.com/group/archive-crawler/message/7243

    JIRA | 5 years ago | Noah Levitt
    org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials
  6. 0

    Frequent exception from TaskManager plugin

    YouTrack | 7 years ago
    org.apache.commons.httpclient.auth.InvalidCredentialsException: Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.apache.commons.httpclient.auth.InvalidCredentialsException

      Credentials cannot be used for NTLM authentication: org.apache.commons.httpclient.UsernamePasswordCredentials

      at org.apache.commons.httpclient.auth.NTLMScheme.authenticate()
    2. HttpClient
      HttpMethodDirector.authenticateProxy
      1. org.apache.commons.httpclient.auth.NTLMScheme.authenticate(NTLMScheme.java:332)
      2. org.apache.commons.httpclient.HttpMethodDirector.authenticateProxy(HttpMethodDirector.java:320)
      2 frames