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

Guice error when installing via `install-plugins.sh`

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Cannot Reproduce
    • Component/s: docker
    • Labels:
      None
    • Environment:
      Windows 10 Home (version 1803, OS build 17134.48)
      Docker version 17.07.0-ce, build 8784753
    • Similar Issues:

      Description

      Dockerfile environment:

      FROM jenkins/jenkins:2.125
      
      RUN /usr/local/bin/install-plugins.sh ssh-slaves
      

      Whole startup log, including stacktrace:

      Running from: /usr/share/jenkins/jenkins.war
      webroot: EnvVars.masterEnvVars.get("JENKINS_HOME")
      Jun 01, 2018 12:31:14 PM org.eclipse.jetty.util.log.Log initialized
      INFO: Logging initialized @413ms to org.eclipse.jetty.util.log.JavaUtilLog
      Jun 01, 2018 12:31:14 PM winstone.Logger logInternal
      INFO: Beginning extraction from war file
      Jun 01, 2018 12:31:15 PM org.eclipse.jetty.server.handler.ContextHandler setContextPath
      WARNING: Empty contextPath
      Jun 01, 2018 12:31:15 PM org.eclipse.jetty.server.Server doStart
      INFO: jetty-9.4.z-SNAPSHOT, build timestamp: 2017-11-21T21:27:37Z, git hash: 82b8fb23f757335bb3329d540ce37a2a2615f0a8
      Jun 01, 2018 12:31:15 PM org.eclipse.jetty.webapp.StandardDescriptorProcessor visitServlet
      INFO: NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet
      Jun 01, 2018 12:31:15 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
      INFO: DefaultSessionIdManager workerName=node0
      Jun 01, 2018 12:31:15 PM org.eclipse.jetty.server.session.DefaultSessionIdManager doStart
      INFO: No SessionScavenger set, using defaults
      Jun 01, 2018 12:31:15 PM org.eclipse.jetty.server.session.HouseKeeper startScavenging
      INFO: Scavenging every 660000ms
      Jenkins home directory: /var/jenkins_home found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
      Jun 01, 2018 12:31:16 PM org.eclipse.jetty.server.handler.ContextHandler doStart
      INFO: Started w.@66971f6b{/,file:///var/jenkins_home/war/,AVAILABLE}{/var/jenkins_home/war}
      Jun 01, 2018 12:31:16 PM org.eclipse.jetty.server.AbstractConnector doStart
      INFO: Started ServerConnector@24f360b2{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
      Jun 01, 2018 12:31:16 PM org.eclipse.jetty.server.Server doStart
      INFO: Started @2451ms
      Jun 01, 2018 12:31:16 PM winstone.Logger logInternal
      INFO: Winstone Servlet Engine v4.0 running: controlPort=disabled
      Jun 01, 2018 12:31:17 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Started initialization
      Jun 01, 2018 12:31:17 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Listed all plugins
      Jun 01, 2018 12:31:18 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Prepared all plugins
      Jun 01, 2018 12:31:18 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Started all plugins
      Jun 01, 2018 12:31:18 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Augmented all extensions
      Jun 01, 2018 12:31:19 PM hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1 error
      WARNING: Failed to instantiate Key[type=hudson.plugins.sshslaves.SSHLauncher$DescriptorImpl, annotation=[none]]; skipping this component
      com.google.inject.ProvisionException: Unable to provision, see the following errors:
      
      1) Error injecting constructor, java.lang.NoClassDefFoundError: hudson/tools/JDKInstaller$FileSystem
        at hudson.plugins.sshslaves.SSHLauncher$DescriptorImpl.<init>(SSHLauncher.java:1617)
      
      1 error
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:52)
              at com.google.inject.internal.SingletonScope$1.get(SingletonScope.java:145)
              at hudson.ExtensionFinder$GuiceFinder$FaultTolerantScope$1.get(ExtensionFinder.java:424)
              at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
              at com.google.inject.internal.InjectorImpl$2$1.call(InjectorImpl.java:1016)
              at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1092)
              at com.google.inject.internal.InjectorImpl$2.get(InjectorImpl.java:1012)
              at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:386)
              at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:377)
              at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:482)
              at hudson.ExtensionList.load(ExtensionList.java:380)
              at hudson.ExtensionList.ensureLoaded(ExtensionList.java:318)
              at hudson.ExtensionList.iterator(ExtensionList.java:172)
              at hudson.diagnosis.NullIdDescriptorMonitor.verify(NullIdDescriptorMonitor.java:72)
              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)
      Caused by: java.lang.NoClassDefFoundError: hudson/tools/JDKInstaller$FileSystem
              at java.lang.Class.getDeclaredMethods0(Native Method)
              at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
              at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
              at java.lang.Class.getMethod0(Class.java:3018)
              at java.lang.Class.getMethod(Class.java:1784)
              at hudson.model.Descriptor.<init>(Descriptor.java:289)
              at hudson.plugins.sshslaves.SSHLauncher$DescriptorImpl.<init>(SSHLauncher.java:1617)
              at hudson.plugins.sshslaves.SSHLauncher$DescriptorImpl$$FastClassByGuice$$7821d6d6.newInstance(<generated>)
              at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
              at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
              at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:105)
              at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:85)
              at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:267)
              at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
              at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1103)
              at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
              ... 26 more
      Caused by: java.lang.ClassNotFoundException: hudson.tools.JDKInstaller$FileSystem
              at jenkins.util.AntClassLoader.findClassInComponents(AntClassLoader.java:1374)
              at jenkins.util.AntClassLoader.findClass(AntClassLoader.java:1327)
              at jenkins.util.AntClassLoader.loadClass(AntClassLoader.java:1080)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
              ... 42 more
      
      Jun 01, 2018 12:31:19 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Loaded all jobs
      Jun 01, 2018 12:31:19 PM hudson.model.AsyncPeriodicWork$1 run
      INFO: Started Download metadata
      Jun 01, 2018 12:31:20 PM jenkins.util.groovy.GroovyHookScript execute
      INFO: Executing /var/jenkins_home/init.groovy.d/tcp-slave-agent-port.groovy
      Jun 01, 2018 12:31:20 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
      INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@733c23ff: display name [Root WebApplicationContext]; startup date [Fri Jun 01 12:31:20 UTC 2018]; root of context hierarchy
      Jun 01, 2018 12:31:20 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
      INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@733c23ff]: org.springframework.beans.factory.support.DefaultListableBeanFactory@5d4cbe05
      Jun 01, 2018 12:31:20 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
      INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5d4cbe05: defining beans [authenticationManager]; root of factory hierarchy
      Jun 01, 2018 12:31:20 PM org.springframework.context.support.AbstractApplicationContext prepareRefresh
      INFO: Refreshing org.springframework.web.context.support.StaticWebApplicationContext@8e7579e: display name [Root WebApplicationContext]; startup date [Fri Jun 01 12:31:20 UTC 2018]; root of context hierarchy
      Jun 01, 2018 12:31:20 PM org.springframework.context.support.AbstractApplicationContext obtainFreshBeanFactory
      INFO: Bean factory for application context [org.springframework.web.context.support.StaticWebApplicationContext@8e7579e]: org.springframework.beans.factory.support.DefaultListableBeanFactory@3dfec2e7
      Jun 01, 2018 12:31:20 PM org.springframework.beans.factory.support.DefaultListableBeanFactory preInstantiateSingletons
      INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@3dfec2e7: defining beans [filter,legacy]; root of factory hierarchy
      Jun 01, 2018 12:31:20 PM jenkins.install.SetupWizard init
      INFO:
      
      *************************************************************
      *************************************************************
      *************************************************************
      
      Jenkins initial setup is required. An admin user has been created and a password generated.
      Please use the following password to proceed to installation:
      
      7686b2ea47e64b8b8bc06c641afca48a
      
      This may also be found at: /var/jenkins_home/secrets/initialAdminPassword
      
      *************************************************************
      *************************************************************
      *************************************************************
      
      Jun 01, 2018 12:31:28 PM hudson.model.UpdateSite updateData
      INFO: Obtained the latest update center data file for UpdateSource default
      Jun 01, 2018 12:31:29 PM hudson.model.DownloadService$Downloadable load
      INFO: Obtained the updated data file for hudson.tasks.Maven.MavenInstaller
      Jun 01, 2018 12:31:29 PM hudson.model.AsyncPeriodicWork$1 run
      INFO: Finished Download metadata. 9,645 ms
      Jun 01, 2018 12:31:29 PM hudson.model.UpdateSite updateData
      INFO: Obtained the latest update center data file for UpdateSource default
      Jun 01, 2018 12:31:29 PM jenkins.InitReactorRunner$1 onAttained
      INFO: Completed initialization
      Jun 01, 2018 12:31:29 PM hudson.WebAppMain$3 run
      INFO: Jenkins is fully up and running
      --> setting agent port for jnlp
      --> setting agent port for jnlp... done
      

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Devin Nusbaum IIUC JENKINS-51483 is a potential cause, right? IIUC it may break dependency resolution in some plugin sets.

          Elliot Pryde as a workaround you may need to install https://plugins.jenkins.io/jdk-tool in plugins.txt

          Show
          oleg_nenashev Oleg Nenashev added a comment - Devin Nusbaum IIUC JENKINS-51483 is a potential cause, right? IIUC it may break dependency resolution in some plugin sets. Elliot Pryde as a workaround you may need to install https://plugins.jenkins.io/jdk-tool in plugins.txt
          Hide
          dnusbaum Devin Nusbaum added a comment -

          Oleg Nenashev I do not think this case is related to JENKINS-51483.

          Elliot Pryde What does /usr/local/bin/install-plugins.sh do?

          ssh-slaves would need an explicit dependency on jdk-tool if its baseline was updated, so my guess is that the install script is somehow bypassing the automatic detached plugin installation.

          Show
          dnusbaum Devin Nusbaum added a comment - Oleg Nenashev I do not think this case is related to JENKINS-51483 . Elliot Pryde What does /usr/local/bin/install-plugins.sh do? ssh-slaves would need an explicit dependency on jdk-tool if its baseline was updated, so my guess is that the install script is somehow bypassing the automatic detached plugin installation.
          Hide
          danielbeck Daniel Beck added a comment -

          https://github.com/jenkinsci/docker has a standalone issue tracker. As it's the source of install-plugins.sh, related issues should be filed there.

          Show
          danielbeck Daniel Beck added a comment - https://github.com/jenkinsci/docker has a standalone issue tracker. As it's the source of install-plugins.sh , related issues should be filed there.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Daniel BeckI kept it there, because it seemed like an issue related to the recent core changes

          Show
          oleg_nenashev Oleg Nenashev added a comment - Daniel Beck I kept it there, because it seemed like an issue related to the recent core changes

            People

            • Assignee:
              chuckosaurus Elliot Pryde
              Reporter:
              chuckosaurus Elliot Pryde
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: