Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-58567

Update plugins through proxy with authentication not working

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Blocker
    • Resolution: Not A Defect
    • Component/s: core
    • Environment:
      Jenkins 2.186, Java 1.8.0_221, macOS 10.14.5, Safari 12.1.1,
    • Similar Issues:

      Description

      I entered proxy configuration in Jenkins > Manage plugins and successfully tested the configuration.

      But I'm not able to do updates, because the proxy authentication does not work.

      There were errors checking the update sites: IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 authenticationrequired"

      The update site URL is working fine in proxy configuration test (see screenshot, Test: Erfolg=Success, Update server: error)

      2019-07-19 06:44:27.136+0000 [id=47]	INFO	hudson.model.AsyncPeriodicWork$1#run: Started Download metadata
      2019-07-19 06:44:27.160+0000 [id=47]	INFO	hudson.util.Retrier#start: Attempt #1 to do the action check updates server
      2019-07-19 06:44:27.468+0000 [id=47]	INFO	hudson.util.Retrier#start: The attempt #1 to do the action check updates server failed with an allowed exception:
      java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 authenticationrequired"
      	at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2148)
      	at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1570)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1498)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:268)
      	at hudson.model.DownloadService.loadJSON(DownloadService.java:167)
      	at hudson.model.UpdateSite.updateDirectlyNow(UpdateSite.java:189)
      	at hudson.PluginManager.checkUpdatesServer(PluginManager.java:1771)
      	at hudson.util.Retrier.start(Retrier.java:62)
      	at hudson.PluginManager.doCheckUpdatesServer(PluginManager.java:1742)
      	at jenkins.model.DownloadSettings$DailyCheck.execute(DownloadSettings.java:130)
      	at hudson.model.AsyncPeriodicWork$1.run(AsyncPeriodicWork.java:101)
      	at java.lang.Thread.run(Thread.java:748)
      2019-07-19 06:44:27.469+0000 [id=47]	INFO	hudson.util.Retrier#start: Calling the listener of the allowed exception 'Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 authenticationrequired"' at the attempt #1 to do the action check updates server
      2019-07-19 06:44:27.473+0000 [id=47]	INFO	hudson.util.Retrier#start: Attempted the action check updates server for 1 time(s) with no success
      2019-07-19 06:44:27.477+0000 [id=47]	SEVERE	hudson.PluginManager#doCheckUpdatesServer: Error checking update sites for 1 attempt(s). Last exception was: IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 authenticationrequired"
      2019-07-19 06:44:27.483+0000 [id=47]	INFO	hudson.model.AsyncPeriodicWork$1#run: Finished Download metadata. 345 ms
      

       

        Attachments

          Issue Links

            Activity

            Hide
            oleg_nenashev Oleg Nenashev added a comment -
            Show
            oleg_nenashev Oleg Nenashev added a comment - Alexander Bering  Please attache the response header contents.  https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Proxy-Authenticate
            Hide
            murphy85 Alexander Bering added a comment - - edited

            Hi Oleg Nenashev I tried to increase the logging level of jenkins to see more informations, but I didn't see more logs. After restart the logger configuration was reset.

            This is the response header using a regular browser:

            Proxy-Authenticate: Basic realm="McAfee Web Gateway"
            Show
            murphy85 Alexander Bering added a comment - - edited Hi Oleg Nenashev I tried to increase the logging level of jenkins to see more informations, but I didn't see more logs. After restart the logger configuration was reset. This is the response header using a regular browser: Proxy-Authenticate: Basic realm= "McAfee Web Gateway"
            Hide
            murphy85 Alexander Bering added a comment - - edited

            I'm sorry, in later Java 8versions the Basic Authentication is deactivated by default.

            I had to set the following java arguments:

            -Djdk.http.auth.tunneling.disabledSchemes=

            Show
            murphy85 Alexander Bering added a comment - - edited I'm sorry, in later Java 8versions the Basic Authentication is deactivated by default. I had to set the following java arguments: -Djdk.http.auth.tunneling.disabledSchemes=
            Hide
            murphy85 Alexander Bering added a comment -

            But the test should have failed, too

            Show
            murphy85 Alexander Bering added a comment - But the test should have failed, too

              People

              • Assignee:
                Unassigned
                Reporter:
                murphy85 Alexander Bering
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: