gpt4 book ai didi

bamboo - 如何从创建名为 'agentConfiguration' 的 bean 的错误中恢复?

转载 作者:行者123 更新时间:2023-12-02 09:20:59 24 4
gpt4 key购买 nike

为什么启动远程代理时出现以下错误?

代理无法启动,并且一直显示此错误

INFO   | jvm 21   | 2015/10/20 12:12:27 | [Fatal Error] :-1:-1: Premature end of file.
INFO | jvm 21 | 2015/10/20 12:12:27 | Exiting due to fatal exception.
INFO | jvm 21 | 2015/10/20 12:12:27 | java.lang.reflect.InvocationTargetException
INFO | jvm 21 | 2015/10/20 12:12:27 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO | jvm 21 | 2015/10/20 12:12:27 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
INFO | jvm 21 | 2015/10/20 12:12:27 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO | jvm 21 | 2015/10/20 12:12:27 | at java.lang.reflect.Method.invoke(Method.java:606)
INFO | jvm 21 | 2015/10/20 12:12:27 | at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:28)
INFO | jvm 21 | 2015/10/20 12:12:27 | at java.lang.Thread.run(Thread.java:745)
INFO | jvm 21 | 2015/10/20 12:12:27 | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'agentConfiguration' defined in class path resource [applicationContextRemoteAgent.xml]: Invocation of init method failed; nested exception is com.atlassian.bamboo.configuration.ConfigurationException: Could not load configuration file bamboo-agent.cfg.xml from /home/bamboo_path/bamboo-agent-home
INFO | jvm 21 | 2015/10/20 12:12:27 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1553)
INFO | jvm 21 | 2015/10/20 12:12:27 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
INFO | jvm 21 | 2015/10/20 12:12:27 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
INFO | jvm 21 | 2015/10/20 12:12:27 | at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
INFO | jvm 21 | 2015/10/20 12:12:27 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
...
INFO | jvm 21 | 2015/10/20 12:12:27 | at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:68)
INFO | jvm 21 | 2015/10/20 12:12:27 | ... 6 more
INFO | jvm 21 | 2015/10/20 12:12:27 | Caused by: com.atlassian.bamboo.configuration.ConfigurationException: Could not load configuration file bamboo-agent.cfg.xml from /home/bamboo_path/bamboo-agent-home
INFO | jvm 21 | 2015/10/20 12:12:27 | at com.atlassian.bamboo.v2.build.agent.remote.AgentConfiguration.initConfiguration(AgentConfiguration.java:101)
INFO | jvm 21 | 2015/10/20 12:12:27 | at com.atlassian.bamboo.v2.build.agent.remote.AgentConfiguration.init(AgentConfiguration.java:62)
INFO | jvm 21 | 2015/10/20 12:12:27 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
...
INFO | jvm 21 | 2015/10/20 12:12:27 | ... 19 more
INFO | jvm 21 | 2015/10/20 12:12:27 | Caused by: org.apache.commons.configuration.ConfigurationException: Premature end of file.
INFO | jvm 21 | 2015/10/20 12:12:27 | at org.apache.commons.configuration.XMLConfiguration.load(XMLConfiguration.java:673)

我正在使用 Bamboo Server 实例,5.8.1代理在 JDK 1.7 上运行

最佳答案

正如您所看到的:

INFO   | jvm 21   | 2015/10/20 12:12:27 | Caused by: com.atlassian.bamboo.configuration.ConfigurationException: Could not load configuration file bamboo-agent.cfg.xml from /home/bamboo_path/bamboo-agent-home
INFO | jvm 21 | 2015/10/20 12:12:27 | at com.atlassian.bamboo.v2.build.agent.remote.AgentConfiguration.initConfiguration(AgentConfiguration.java:101)

无法加载文件bamboo-agent.cfg.xml。在这种情况下,我发现文件已损坏,导致代理在启动时挂起。

该文件应采用以下格式:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<configuration>
<buildWorkingDirectory>/home/bamboo_path/bamboo-agent-home/xml-data/build-dir</buildWorkingDirectory>
<agentUuid>aaaaaaaa-bbbb-aaaa-aaaa-aaaaaaaaaaaa</agentUuid>
<agentDefinition>
<id>14221333</id>
<name>Java Compiler</name>
</agentDefinition>
</configuration>

我发现,当我删除损坏的文件并再次启动代理时,它将启动。不过,它将注册为新代理。缺少所有代理奉献或自定义功能设置。

您可以在bamboo管理面板中找到旧代理的定义

https_//bamboo.myurl.com/admin/agent/viewAgent.action?agentId=1234567

将名称和代理 ID 复制粘贴到 bamboo-agent.cfg.xml 并启动代理。

关于bamboo - 如何从创建名为 'agentConfiguration' 的 bean 的错误中恢复?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33230596/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com