在El Capitan Update之后无法运行Jenkins

时间:2016-06-23 17:43:15

标签: macos jenkins

我的任务是将mac盒子升级到El Capitan。 El Capitan与最新版本的XCode一起运行。

我按照以下步骤处理新的SIP:

this answer

How To Install Homebrew in Mac OS X El Capitan

我把所有这些东西都按顺序(或者至少看起来如此)得到了,但由于无法访问config.xml文件,Jenkins的盒子似乎已经失效了。认为这是更多的许可问题(因为这就是我在两个引用链接中执行了步骤的原因),我发现了这篇文章How to fix permission issues on Homebrew in OS X El Capitan?,我确认了Reset Jenkins Configuration Command Line上的步骤,并且我执行了所需的步骤:

1)Stop Jenkins (the easiest way to do this is to kill the servlet container.)
2)Go to $JENKINS_HOME in the file system and find config.xml file.
3)Open this file in the editor.
4)Look for the <useSecurity>true</useSecurity> element in this file.
5)Replace true with false
6)Remove the elements authorizationStrategy and securityRealm
7)Start Jenkins

但是当我去Jenkins时,我仍然无法访问/.../config.xml

正如我所说的,我是这个过程的新手(实际上是处理一个mac),那么比我对所发生的事情有更多经验的人也是如此吗?

以下是用于参考的堆栈跟踪:

org.jvnet.hudson.reactor.ReactorException: hudson.util.IOException2: Unable to read /Users/Shared/Jenkins/Home/config.xml
    at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:246)
    at jenkins.InitReactorRunner.run(InitReactorRunner.java:43)
    at jenkins.model.Jenkins.executeReactor(Jenkins.java:899)
    at jenkins.model.Jenkins.<init>(Jenkins.java:801)
    at hudson.model.Hudson.<init>(Hudson.java:81)
    at hudson.model.Hudson.<init>(Hudson.java:77)
    at hudson.WebAppMain$2.run(WebAppMain.java:214)
Caused by: hudson.util.IOException2: Unable to read /Users/Shared/Jenkins/Home/config.xml
    at hudson.XmlFile.unmarshal(XmlFile.java:170)
    at jenkins.model.Jenkins$16.run(Jenkins.java:2527)
    at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
    at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
    at jenkins.model.Jenkins$7.runTask(Jenkins.java:888)
    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.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
Caused by: com.thoughtworks.xstream.converters.ConversionException: -1 : -1
---- Debugging information ----
message             : -1
cause-exception     : java.lang.ArrayIndexOutOfBoundsException
cause-message       : -1
class               : hudson.model.Hudson
required-type       : hudson.model.Hudson
converter-type      : hudson.util.RobustReflectionConverter
path                : /hudson/disabledAdministrativeMonitors
line number         : 3
version             : null
-------------------------------
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
    at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
    at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
    at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061)
    at hudson.util.XStream2.unmarshal(XStream2.java:109)
    at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045)
    at hudson.XmlFile.unmarshal(XmlFile.java:166)
    ... 9 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
    at com.thoughtworks.xstream.core.util.OrderRetainingMap.entrySet(OrderRetainingMap.java:77)
    at java.util.HashMap.putMapEntries(HashMap.java:511)
    at java.util.HashMap.putAll(HashMap.java:784)
    at com.thoughtworks.xstream.core.util.OrderRetainingMap.<init>(OrderRetainingMap.java:36)
    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.buildMap(FieldDictionary.java:135)
    at com.thoughtworks.xstream.converters.reflection.FieldDictionary.fieldOrNull(FieldDictionary.java:113)
    at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.getFieldOrNull(PureJavaReflectionProvider.java:186)
    at hudson.util.RobustReflectionConverter.fieldDefinedInClass(RobustReflectionConverter.java:328)
    at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:269)
    at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222)
    at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
    ... 18 more

我也尝试过这个Jira的解决方案:Jenkins Wiki仍然没有运气。

1 个答案:

答案 0 :(得分:0)

原来这是一个java版本问题。在El Capitan更新之后,它促使我重新安装Java,默认安装当然是Java 8.回滚到Java 7并安装了Maven 3.0.2,所有内容都已启动并运行。