git Jenkins 中的 hudson.util.HudsonFailedToLoad 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32494209/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
hudson.util.HudsonFailedToLoad error in Jenkins
提问by rick
I am getting below error when i am trying to access my Jenkins server,
当我尝试访问我的 Jenkins 服务器时出现以下错误,
hudson.util.HudsonFailedToLoad: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
at hudson.WebAppMain.run(WebAppMain.java:234)
Caused by: org.jvnet.hudson.reactor.ReactorException: java.lang.Error: java.lang.reflect.InvocationTargetException
at org.jvnet.hudson.reactor.Reactor.execute(Reactor.java:269)
at jenkins.InitReactorRunner.run(InitReactorRunner.java:44)
at jenkins.model.Jenkins.executeReactor(Jenkins.java:910)
at jenkins.model.Jenkins.<init>(Jenkins.java:809)
at hudson.model.Hudson.<init>(Hudson.java:82)
at hudson.model.Hudson.<init>(Hudson.java:78)
at hudson.WebAppMain.run(WebAppMain.java:222)
Caused by: java.lang.Error: java.lang.reflect.InvocationTargetException
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:109)
at hudson.init.TaskMethodFinder$TaskImpl.run(TaskMethodFinder.java:169)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:282)
at jenkins.model.Jenkins.runTask(Jenkins.java:899)
at org.jvnet.hudson.reactor.Reactor.run(Reactor.java:210)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:117)
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: java.lang.reflect.InvocationTargetException
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:497)
at hudson.init.TaskMethodFinder.invoke(TaskMethodFinder.java:105)
... 8 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.fieldsFor(FieldDictionary.java:76)
at com.thoughtworks.xstream.converters.reflection.PureJavaReflectionProvider.visitSerializableFields(PureJavaReflectionProvider.java:127)
at hudson.util.RobustReflectionConverter.doMarshal(RobustReflectionConverter.java:149)
at hudson.util.RobustReflectionConverter.marshal(RobustReflectionConverter.java:108)
at com.thoughtworks.xstream.core.AbstractReferenceMarshaller.convert(AbstractReferenceMarshaller.java:69)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:58)
at com.thoughtworks.xstream.core.TreeMarshaller.convertAnother(TreeMarshaller.java:43)
at com.thoughtworks.xstream.core.TreeMarshaller.start(TreeMarshaller.java:82)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.marshal(AbstractTreeMarshallingStrategy.java:37)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:898)
at com.thoughtworks.xstream.XStream.marshal(XStream.java:887)
at com.thoughtworks.xstream.XStream.toXML(XStream.java:860)
at hudson.XmlFile.write(XmlFile.java:178)
at hudson.model.Descriptor.save(Descriptor.java:758)
at hudson.plugins.git.GitTool.onLoaded(GitTool.java:108)
... 13 more
At the end of error file,i thought may be error related to Git tool. So i have also removed git-client plugin from /var/lib/jenkins/plugins. But after that it will show error unable to read config.xml
file even though file is already there in /var/lib/jenkins/config.xml
在错误文件的末尾,我认为可能是与 Git 工具相关的错误。所以我也从 /var/lib/jenkins/plugins 中删除了 git-client 插件。但在那之后它会显示错误无法读取config.xml
文件即使文件已经存在于 /var/lib/jenkins/config.xml
I need git-client plugin also. I don't know how to solve this problem. Please help if anyone know about this issue. Thanks
我还需要 git-client 插件。我不知道如何解决这个问题。如果有人知道这个问题,请帮忙。谢谢
回答by Waseem Ahmed
I stopped jenkins service and deleted that file and folder from
我停止了 jenkins 服务并从
Jenkins_HOME/plugin
cloudbees-folder.jpi
cloudbees-folder [directory]
and then restart jenkins service.
然后重启詹金斯服务。
回答by mainframer
I met this java.lang.ArrayIndexOutOfBoundsException: -1
error before. It was because I started jenkins server with lower java version(maybe 1.6 or older?). And at the end I resolved this issue by starting jenkins with a newer version of java.
我java.lang.ArrayIndexOutOfBoundsException: -1
以前遇到过这个错误。那是因为我用较低的 Java 版本(可能是 1.6 或更旧?)启动了 jenkins 服务器。最后,我通过使用较新版本的 java 启动 jenkins 解决了这个问题。
回答by Arjun Marati
Resolved: https://issues.jenkins-ci.org/browse/JENKINS-41241
已解决:https: //issues.jenkins-ci.org/browse/JENKINS-41241
The issue get resolves when you delete all the plugins from Jenkins Installation folder. Follow these steps (Windows installation)
当您从 Jenkins 安装文件夹中删除所有插件时,问题得到解决。按照以下步骤操作(Windows 安装)
- Go to Jenkins installation folder in "C:\Program files\Jenkins\Plugins" copy all the files in some other drive for future reference.
- Stop Jenkins server : Go to Control Panel\All Control Panel Items\Administrative Tools\Services search for Jenkins and stop it
- Delete all the files in the "C:\Program files\Jenkins\Plugins" folder
- Restart the Jenkins your good to go but all the plugins will have to be reinstalled
- Refer the "Plugins " folder which you have copied in some other destination and install the plugins
- 转到“C:\Program files\Jenkins\Plugins”中的 Jenkins 安装文件夹,将其他驱动器中的所有文件复制以备将来参考。
- 停止 Jenkins 服务器:转到 Control Panel\All Control Panel Items\Administrative Tools\Services 搜索 Jenkins 并停止它
- 删除“C:\Program files\Jenkins\Plugins”文件夹中的所有文件
- 重新启动 Jenkins 就可以了,但必须重新安装所有插件
- 参考您在其他目的地复制的“插件”文件夹并安装插件
回答by Sugandha Jain
Removing plugins from jenkins directory and restarting jenkins worked for me.
从 jenkins 目录中删除插件并重新启动 jenkins 对我有用。
For my linux system, I did following:
对于我的 linux 系统,我执行了以下操作:
goto jenkins home "/var/lib/jenkins/"
ls plugins //plugins directory inside jenkins home exists
Make sure to copy plugins directory to some other path for backup
cd plugins
sudo rm -rf ./* Remove entire contents inside plugins directory.
Restart jenkins with command: sudo service jenkins restart
Restart jenkins link in browser and it opened normally.
转到詹金斯主页“/var/lib/jenkins/”
ls plugins //jenkins home中的plugins目录存在
确保将插件目录复制到其他路径进行备份
光盘插件
sudo rm -rf ./* 删除插件目录中的全部内容。
使用命令重新启动 jenkins: sudo service jenkins restart
在浏览器中重启 jenkins 链接,它正常打开。
回答by Nakul
In my case I installed a new JDK 1.8, without uninstalling existing 1.7. Try uninstalling newer jdk (1.8 in my case) solved my problem.
就我而言,我安装了一个新的 JDK 1.8,而没有卸载现有的 1.7。尝试卸载较新的 jdk(在我的情况下为 1.8)解决了我的问题。
回答by dildeepak
Basically, this type of error comes when Jenkins find some chaos inside its plugin or config folders arose due to any of our effort to upgrade/downgrade/update.
基本上,当 Jenkins 发现由于我们升级/降级/更新的任何努力而在其插件或配置文件夹中出现一些混乱时,就会出现这种类型的错误。
The simple solution is , we need to login to Jenkins and go to the location where we were trying to do the modification, and try to revert it back by deleting or modifying to its previous state.
简单的解决方案是,我们需要登录 Jenkins 并转到我们尝试进行修改的位置,并尝试通过删除或修改其先前状态来将其恢复。
e.g I got this similar issue while trying to upgrade/downgarde the credentials plugin. So I went to /home/Jenkins/plugins
and deleted all the files related to credentials and restarted the Jenkins from tomcat.
例如,我在尝试升级/降级凭证插件时遇到了类似的问题。所以我去/home/Jenkins/plugins
删除了所有与凭据相关的文件,并从 tomcat 重新启动了 Jenkins。
/home/Jenkins/plugins
rm -rf credentials.jpi.pinned
rm -rf credentials.jpi.disabled
rm -rf credentials.jpi
rm -rf credentials.bak