Windows

时间:2017-02-13 11:27:49

标签: bamboo

我在Windows 2012 Server计算机上安装了Bamboo远程代理v5.12.3。从v5.9.7升级后,日志文件包含错误消息,表示拒绝将写日志文件写入根目录。

这是日志文件的片段,但有例外:

INFO   | jvm 1    | 2017/01/31 11:25:04 | log4j:ERROR setFile(null,true) call failed.
INFO   | jvm 1    | 2017/01/31 11:25:04 | java.io.FileNotFoundException: \atlassian-bamboo.log (Access is denied)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.io.FileOutputStream.open0(Native Method)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.io.FileOutputStream.open(FileOutputStream.java:270)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.configureLog4j(RemoteAgent.java:141)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:73)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.lang.reflect.Method.invoke(Method.java:498)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:30)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.lang.Thread.run(Thread.java:745)
INFO   | jvm 1    | 2017/01/31 11:25:04 | log4j:ERROR Either File or DatePattern options are not set for appender [filelog].
INFO   | jvm 1    | 2017/01/31 11:25:04 | log4j:ERROR setFile(null,true) call failed.
INFO   | jvm 1    | 2017/01/31 11:25:04 | java.io.FileNotFoundException: \js-atlassian-bamboo.log (Access is denied)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.io.FileOutputStream.open0(Native Method)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.io.FileOutputStream.open(FileOutputStream.java:270)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:223)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.parseCatsAndRenderers(PropertyConfigurator.java:672)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:516)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:580)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:415)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.configureLog4j(RemoteAgent.java:141)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at com.atlassian.bamboo.v2.build.agent.remote.RemoteAgent.start(RemoteAgent.java:73)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.lang.reflect.Method.invoke(Method.java:498)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at com.atlassian.bamboo.agent.bootstrap.AgentRunner.run(AgentRunner.java:30)
INFO   | jvm 1    | 2017/01/31 11:25:04 |   at java.lang.Thread.run(Thread.java:745)
INFO   | jvm 1    | 2017/01/31 11:25:04 | log4j:ERROR Either File or DatePattern options are not set for appender [javascript].

首先,我不了解Bamboo远程代理创建的所有日志文件。至少存在这些:

  • atlassian-bamboo-agent.log - 我已将其重定向到\ logs目录。这个文件是用竹子代理日志记录写的,这里的一切都很好......
  • atlassian-bamboo.log - 代理尝试将其写入C:\目录,我当然会阻止他。
  • js-atlassian-bamboo.log - 与之前的相同

任何人都可以向我解释一下这些日志文件之间有什么区别吗?

最后我不明白,为什么代理想要在驱动器C的根文件夹中创建atlassian-bamboo和js-atlassian-bamboo日志文件。如何配置代理,以便创建这些文件在另一个文件夹中?

提前致谢

1 个答案:

答案 0 :(得分:0)

atlassian-bamboo-agent.log - &gt;这将仅捕获代理

上的活动

atlassian-bamboo.log - &gt;这将捕获此代理正在占用的构建/部署日志

您可以配置日志,请查看以下链接

https://confluence.atlassian.com/bamboocloud/logging-in-bamboo-737184373.html