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

Proxy authentification don't work when setted from jenkins.yaml

    Details

    • Similar Issues:

      Description

      I setted up configuration of the proxy for PluginManager in jenkins.yaml for configuration-as-code-plugin:

      plugins:
        proxy:
          name: "proxy.company.com"
          noProxyHost: "*.company.com"
          password: "password"
          port: 8080
          testUrl: "https://ya.ru"
          userName: "user"
      

      On startup it's force Jenkins to load https://updates.jenkins.io/update-center.json

      Despite the fact that I set up proxy's user and password, request is fail with error:

      Aug 21, 2018 4:42:06 PM io.jenkins.plugins.casc.plugins.PluginManagerConfigurator lambda$getPluginVersions$4
      WARNING: Failed to download plugin-versions metadata from https://updates.jenkins.io/update-center.json
      java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required"
         at sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:2142)
         at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1564)
         at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1492)
         at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:263)
         at io.jenkins.plugins.casc.plugins.PluginManagerConfigurator.lambda$getPluginVersions$4(PluginManagerConfigurator.java:287)
         at com.google.common.cache.LocalCache$LocalManualCache$1.load(LocalCache.java:4767)
         at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3568)
         at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2350)
         at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2313)
         at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2228)
         at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
         at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4764)
         at io.jenkins.plugins.casc.plugins.PluginManagerConfigurator.getPluginVersions(PluginManagerConfigurator.java:279)
         at io.jenkins.plugins.casc.plugins.PluginManagerConfigurator.getPluginMetadata(PluginManagerConfigurator.java:255)
         at io.jenkins.plugins.casc.plugins.PluginManagerConfigurator.configurePlugins(PluginManagerConfigurator.java:166)
         at io.jenkins.plugins.casc.plugins.PluginManagerConfigurator.configure(PluginManagerConfigurator.java:88)
         at io.jenkins.plugins.casc.plugins.PluginManagerConfigurator.configure(PluginManagerConfigurator.java:58)
         at io.jenkins.plugins.casc.ConfigurationAsCode.lambda$configureWith$4(ConfigurationAsCode.java:527)
         at io.jenkins.plugins.casc.ConfigurationAsCode.invokeWith(ConfigurationAsCode.java:499)
         at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:527)
         at io.jenkins.plugins.casc.ConfigurationAsCode.configureWith(ConfigurationAsCode.java:433)
         at io.jenkins.plugins.casc.ConfigurationAsCode.configure(ConfigurationAsCode.java:169)
         at io.jenkins.plugins.casc.ConfigurationAsCode.init(ConfigurationAsCode.java:161)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
         at java.lang.reflect.Method.invoke(Method.java:498)
         at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:104)
         at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:175)
         at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:296)
         at jenkins.model.Jenkins$5.runTask(Jenkins.java:1068)
         at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:214)
         at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
         at java.lang.Thread.run(Thread.java:748)
      

      Seems like the authentication is not setted up for HTTP connection.

      In other hand, when I set up this settings through GUI, it's work well.

        Attachments

          Activity

            People

            • Assignee:
              ewel Ewelina Wilkosz
              Reporter:
              vektory79 Victor Verbitsky
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: