admin管理员组文章数量:1573019
问题描述:
Jenkins重启后无法启动提示:Please wait while Jenkins is getting ready to work。。。(Jenkins正在准备工作,请稍后。。。)
问题分析:
查看日志:
# docker-compose logs -f --tail=100
jenkins_1 | java.lang.NoSuchMethodError: 'java.lang.String com.thoughtworks.xstream.io.HierarchicalStreamReader.peekNextChild()'
jenkins_1 | at com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy$ConverterImpl.unmarshal(RoleBasedAuthorizationStrategy.java:579)
jenkins_1 | at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:465)
jenkins_1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
jenkins_1 | at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
jenkins_1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
jenkins_1 | at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:442)
jenkins_1 | at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:344)
jenkins_1 | at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:283)
jenkins_1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
jenkins_1 | at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:72)
jenkins_1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
jenkins_1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
jenkins_1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
jenkins_1 | at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
日志分析:
该日志中存在多个信息和警告,但其中一个错误是:
jenkins_1 | java.lang.NoSuchMethodError: 'java.lang.String com.thoughtworks.xstream.io.HierarchicalStreamReader.peekNextChild()'
jenkins_1 | at com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy$ConverterImpl.unmarshal(RoleBasedAuthorizationStrategy.java:579)
jenkins_1 | at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:465)
jenkins_1 | at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
该错误可能是由于插件依赖项问题而导致的全局配置加载失败。具体来说,这个错误可能与角色策略授权插件有关。
解决方法:
要解决这个问题,可以尝试以下步骤:
-
检查是否有任何插件依赖项错误。查看Jenkins控制台输出中是否有任何其他错误或警告。
-
禁用Jenkins角色策略授权插件role-strategy.jpi。
2.1 打开Jenkins服务器上的Jenkins Home目录。
2.2 在Jenkins Home目录中找到plugins目录。
2.3 在plugins目录中找到role-strategy.jpi文件,并将其重命名为role-strategy.jpi.disabled。 -
删除Jenkins配置config.xml内,角色策略授权插件的相关配置。
3.1 打开 Jenkins 的配置文件 `config.xml`,该文件通常位于 Jenkins 的主目录下。
3.2 使用文本编辑器搜索 `role-strategy` 或 `com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy`。
3.3 删除<authorizationStrategy></authorizationStrategy> 内全部内容,以及其他引用 `role-strategy` 的行,保存文件并关闭编辑器。 -
重新启动 Jenkins。
这样做将禁用角色策略授权插件,并允许Jenkins服务器启动。请注意,禁用插件可能会影响Jenkins服务器的某些功能。如果您需要重新启用该插件,请将role-strategy.jpi.disabled文件重命名为role-strategy.jpi,并重新启动Jenkins服务器。
本文标签: 无法启动ciomichelinJenkinsrolestrategy
版权声明:本文标题:Jenkins无法启动:com.michelin.cio.hudson.plugins.rolestrategy.RoleBasedAuthorizationStrategy 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/xitong/1725699791a1037328.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论