Jenkins和Ruby Metric插件错误

时间:2012-02-23 16:07:56

标签: ruby ruby-on-rails-3 jenkins jenkins-plugins

我正在运行Jenkins 1.424.2 for Ruby on Rails应用程序,我想使用Ruby Metrics插件。我使用manage plugins网站安装了它。但是当我重新启动Jenkins时,插件在作业的配置选项中不可用。

所以,我查看了日志文件,结果证明该插件无法启动。首先是依赖maven-plugin的一些错误,然后是这个错误

SEVERE: Failed Initializing plugin rubyMetrics
java.lang.NullPointerException

以下是日志文件的整个输出:

...
Running from: /usr/share/jenkins/jenkins.war
[Winstone 2012/02/23 16:53:57] - Beginning extraction from war file
Jenkins home directory: /var/lib/jenkins found at: EnvVars.masterEnvVars.get("JENKINS_HOME")
[Winstone 2012/02/23 16:53:59] - HTTP Listener started: port=8080
[Winstone 2012/02/23 16:53:59] - Winstone Servlet Engine v0.9.10 running: controlPort=disabled
Feb 23, 2012 4:53:59 PM jenkins.model.Jenkins$6 onAttained
INFO: Started initialization
Feb 23, 2012 4:54:00 PM jenkins.model.Jenkins$6 onAttained
INFO: Listed all plugins
Feb 23, 2012 4:54:00 PM jenkins.model.Jenkins$6 onTaskFailed
SEVERE: Failed Loading plugin rubyMetrics
java.io.IOException: Dependency maven-plugin (1.397) doesn't exist
    at hudson.PluginWrapper.resolvePluginDependencies(PluginWrapper.java:424)
    at hudson.PluginManager$2$1$1.run(PluginManager.java:284)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:797)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
Feb 23, 2012 4:54:00 PM hudson.plugins.ansicolor.PluginImpl start
INFO: starting ansicolor plugin (https://github.com/dblock/jenkins-ansicolor-plugin)
Feb 23, 2012 4:54:00 PM jenkins.model.Jenkins$6 onAttained
INFO: Prepared all plugins
Feb 23, 2012 4:54:00 PM jenkins.model.Jenkins$6 onTaskFailed
SEVERE: Failed Initializing plugin rubyMetrics
java.lang.NullPointerException
    at hudson.PluginManager$2$1$2.run(PluginManager.java:301)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:797)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
Feb 23, 2012 4:54:00 PM jenkins.model.Jenkins$6 onAttained
INFO: Started all plugins
null
Feb 23, 2012 4:54:00 PM jenkins.model.Jenkins$6 onAttained
INFO: Augmented all extensions
hudson.util.IOException2: Unable to read /var/lib/jenkins/jobs/Raffler/builds/2012-02-23_16-28-13/build.xml
    at hudson.XmlFile.unmarshal(XmlFile.java:155)
    at hudson.model.Run.reload(Run.java:283)
    at hudson.model.Run.<init>(Run.java:272)
    at hudson.model.AbstractBuild.<init>(AbstractBuild.java:159)
    at hudson.model.Build.<init>(Build.java:100)
    at hudson.model.FreeStyleBuild.<init>(FreeStyleBuild.java:41)
    at sun.reflect.GeneratedConstructorAccessor7.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:532)
    at hudson.model.AbstractProject.loadBuild(AbstractProject.java:947)
    at hudson.model.AbstractProject$1.create(AbstractProject.java:256)
    at hudson.model.AbstractProject$1.create(AbstractProject.java:254)
    at hudson.model.RunMap.load(RunMap.java:221)
    at hudson.model.AbstractProject.onLoad(AbstractProject.java:254)
    at hudson.model.Project.onLoad(Project.java:88)
    at hudson.model.Items.load(Items.java:115)
    at jenkins.model.Jenkins$14.run(Jenkins.java:2273)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:169)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
    at jenkins.model.Jenkins$5.runTask(Jenkins.java:797)
    at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:210)
    at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:679)
Caused by: com.thoughtworks.xstream.io.StreamException:  : input contained no data
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:80)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readRealEvent(AbstractPullReader.java:154)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.readEvent(AbstractPullReader.java:147)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.move(AbstractPullReader.java:126)
    at com.thoughtworks.xstream.io.xml.AbstractPullReader.moveDown(AbstractPullReader.java:111)
    at com.thoughtworks.xstream.io.xml.XppReader.<init>(XppReader.java:48)
    at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:44)
    at com.thoughtworks.xstream.io.xml.XppDriver.createReader(XppDriver.java:49)
    at hudson.XmlFile.unmarshal(XmlFile.java:153)
    ... 24 more
Caused by: java.io.EOFException: input contained no data
    at org.xmlpull.mxp1.MXParser.fillBuf(MXParser.java:3003)
    at org.xmlpull.mxp1.MXParser.more(MXParser.java:3046)
    at org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1410)
    at org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
    at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
    at com.thoughtworks.xstream.io.xml.XppReader.pullNextEvent(XppReader.java:63)
    ... 32 more
Feb 23, 2012 4:54:01 PM jenkins.model.Jenkins$6 onAttained
INFO: Loaded all jobs
Feb 23, 2012 4:54:01 PM jenkins.model.Jenkins$6 onAttained
INFO: Completed initialization
Feb 23, 2012 4:54:01 PM hudson.TcpSlaveAgentListener <init>
INFO: JNLP slave agent listener started on TCP port 52218
Feb 23, 2012 5:00:02 PM hudson.model.Run run
INFO: Raffler #29 main build action completed: SUCCESS
Feb 23, 2012 5:03:19 PM hudson.model.Run run
INFO: Raffler #30 main build action completed: SUCCESS
...

这是jenkins或插件中的错误吗?我该如何解决?

1 个答案:

答案 0 :(得分:1)

一些Jenkins插件依赖于其他插件。看起来你需要更新Maven插件(这是核心Jenkins发行版的一部分)。转到http://[jenkins_server]/pluginManager/并查看它是否允许您更新插件。如果没有,请转到http://[jenkins_server]/pluginManager/installed并检查是否安装了Maven插件以及它是哪个版本。如果已安装,但版本是&lt; 1.397或者根本没有安装,你可能需要更新整个Jenkins安装。

(但这有点奇怪,因为Jenkins 1.424应该附带Maven 1.424,所以整个插件可能是其中一个错误。)