1

我最近将 Jenkins 从 1.506 升级到 1.515

升级后,Jenkins 似乎没有启动。日志中充满了警告,例如:

WARNING: Failed to load hudson.scm.Cvs...
java.lang.InstantiationException: file:/jenkins/plugins/cvs/WEB-INF/classes/META-INF/annotations/hudson.Extension might need to be rebuilt: java.lang.ClassNotFoundException: hudson.scm.Cvs...

并且 Web GUI 无法访问(超时)。

我再次降级到 1.506,但结果相同。由于所有日志警告都与 CVS 相关(我不使用,我们在 svn 上),我尝试删除

/jenkins/plugins/cvs
/jenkins/plugins/cvs.jpi

但是它们在每次重新启动后都会回来,以及所有警告。

我在 Solaris 上运行的专用 tomcat 中运行 jenkins 作为战争。

现在,Jenkins 完全无法访问。任何指针表示赞赏!

下面是更大的日志片段。

May 23, 2013 2:50:17 PM org.apache.coyote.http11.Http11Protocol init
INFO: Initializing Coyote HTTP/1.1 on http-28080
May 23, 2013 2:50:17 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 538 ms
May 23, 2013 2:50:17 PM org.apache.catalina.core.StandardService start
INFO: Starting service Catalina
May 23, 2013 2:50:17 PM org.apache.catalina.core.StandardEngine start
INFO: Starting Servlet Engine: Apache Tomcat/6.0.20
Jenkins home directory: /data/trg/tar5/jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
May 23, 2013 2:50:19 PM org.apache.coyote.http11.Http11Protocol start
INFO: Starting Coyote HTTP/1.1 on http-28080
May 23, 2013 2:50:19 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 2182 ms
May 23, 2013 2:50:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started initialization
May 23, 2013 2:50:21 PM jenkins.InitReactorRunner$1 onAttained
INFO: Listed all plugins
ScriptContent not available for JVM 1.5
May 23, 2013 2:50:22 PM jenkins.InitReactorRunner$1 onAttained
INFO: Prepared all plugins
May 23, 2013 2:50:22 PM jenkins.InitReactorRunner$1 onAttained
INFO: Started all plugins
May 23, 2013 2:50:22 PM jenkins.InitReactorRunner$1 onAttained
INFO: Augmented all extensions
May 23, 2013 2:50:23 PM hudson.ExtensionFinder$Sezpoz scout
WARNING: Failed to scout hudson.scm.CvsModule$DescriptorImpl
java.lang.InstantiationException: file:/data/trg/tar5/jenkins/plugins/cvs/WEB-INF/classes/META-INF/annotations/hudson.Extension might need to be rebuilt: java.lang.ClassNotFoundException: hudson.scm.CvsModule$DescriptorImpl
    at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
    at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:666)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:312)
    at hudson.ExtensionList.load(ExtensionList.java:295)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
    at hudson.ExtensionList.iterator(ExtensionList.java:138)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:311)
    at hudson.ExtensionList.load(ExtensionList.java:295)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
    at hudson.ExtensionList.get(ExtensionList.java:153)
    at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:1090)
    at hudson.maven.PluginImpl.init(PluginImpl.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at     sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
    at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
    at jenkins.model.Jenkins$7.runTask(Jenkins.java:893)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: hudson.scm.CvsModule$DescriptorImpl
    at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:966)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
    ... 24 more
May 23, 2013 2:50:23 PM hudson.ExtensionFinder$Sezpoz scout
WARNING: Failed to scout hudson.scm.CvsRepositoryItem$CvsRepositoryItemDescriptor
java.lang.InstantiationException: file:/data/trg/tar5/jenkins/plugins/cvs/WEB-INF/classes/META-INF/annotations/hudson.Extension might need to be rebuilt:     java.lang.ClassNotFoundException: hudson.scm.CvsRepositoryItem$CvsRepositoryItemDescriptor
    at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
    at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:666)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:312)
    at hudson.ExtensionList.load(ExtensionList.java:295)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
    at hudson.ExtensionList.iterator(ExtensionList.java:138)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:311)
    at hudson.ExtensionList.load(ExtensionList.java:295)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
    at hudson.ExtensionList.get(ExtensionList.java:153)
    at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:1090)
    at hudson.maven.PluginImpl.init(PluginImpl.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
    at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
    at jenkins.model.Jenkins$7.runTask(Jenkins.java:893)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: hudson.scm.CvsRepositoryItem$CvsRepositoryItemDescriptor
    at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:966)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
    ... 24 more
May 23, 2013 2:50:23 PM hudson.ExtensionFinder$Sezpoz scout
WARNING: Failed to scout hudson.scm.browsers.ViewCVS$DescriptorImpl
java.lang.InstantiationException: file:/data/trg/tar5/jenkins/plugins/cvs/WEB-INF/classes/META-INF/annotations/hudson.Extension might need to be rebuilt:             java.lang.ClassNotFoundException: hudson.scm.browsers.ViewCVS$DescriptorImpl
    at net.java.sezpoz.IndexItem.element(IndexItem.java:144)
    at hudson.ExtensionFinder$Sezpoz.scout(ExtensionFinder.java:666)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:312)
    at hudson.ExtensionList.load(ExtensionList.java:295)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
    at hudson.ExtensionList.iterator(ExtensionList.java:138)
    at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:311)
    at hudson.ExtensionList.load(ExtensionList.java:295)
    at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
    at hudson.ExtensionList.get(ExtensionList.java:153)
    at hudson.PluginManager$PluginUpdateMonitor.getInstance(PluginManager.java:1090)
    at hudson.maven.PluginImpl.init(PluginImpl.java:54)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at hudson.init.InitializerFinder.invoke(InitializerFinder.java:120)
    at hudson.init.InitializerFinder$TaskImpl.run(InitializerFinder.java:184)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
    at jenkins.model.Jenkins$7.runTask(Jenkins.java:893)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
    at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.ClassNotFoundException: hudson.scm.browsers.ViewCVS$DescriptorImpl
    at hudson.PluginManager$UberClassLoader.findClass(PluginManager.java:966)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
    at net.java.sezpoz.IndexItem.element(IndexItem.java:134)
    ... 24 more
May 23, 2013 2:50:23 PM hudson.ExtensionFinder$Sezpoz scout
WARNING: Failed to scout hudson.scm.cvstagging.LegacyTagAction$LegacyTagActionDescriptor
4

1 回答 1

1

我通过清除“工作区根目录”解决了这个问题。那是:

  • 阻止詹金斯
  • 移动工作区文件夹 (mv JENKINS_HOME/workspace JENKINS_HOME/workspace-old)
  • 创建新工作区 (mkdir JENKINS_HOME/workspace)
  • 重启詹金斯

我不知道是什么损坏了,或者如何损坏,但是这个解决方案似乎没有任何不利影响。根据 Jenkins 配置页面(Jenkins > 管理 Jenkins > 配置系统 > 单击主目录附近的高级按钮),工作区根目录用于“指定 Jenkins 将在主节点上存储作业工作区的位置”。

据我所知,它似乎只存储从 svn 签出的每个作业的文件,这些文件显然很容易替换。

无论如何,现在一切都重新开始了。升级第二次运行良好。

于 2013-05-24T03:34:21.823 回答