It's all about the answers!

Ask a question

Build Forge bfagent.log Not Getting Updated/Rotated

J Y (111) | asked Aug 31 '17, 5:00 a.m.


I have Build Forge Server v8.0.0.4 setup in my environment and am also running v8.0.0.4 Build Forge agent on RHEL 6.8 server.

I am trying to configure log rotation for bfagent.log located under /opt/buildforge/logs/ but have not been very successful either.

And now I have screwed up the log writing it seems. The bfagent.log file is no longer getting updated. I have tried restarting xinetd services as as well as the agent server but to no avail.

Does anyone have any idea how I can make Build Forge agent write to the log file again? Also, how do I setup log rotation for this log file?

Thank you.

One answer

permanent link
Joshua Keefe (56) | answered Sep 05 '17, 4:49 p.m.

Hello JY,

I am not familiar with the Build Forge Agent's ability to rotate the logs, specifically the activity_log setting under the bfagent.conf file.
That log is recommended only to be enabled should you have an issue and/or at the Support's team request.

The default setting the bfagent activity_log should be "/tmp/bfagent.log", even on Windows.

The directory /opt/buildforge/logs/ appears to be the directory used by the Build Forge Console, not the agent specifically.

Were you attempting the rotate the Perl engine logs under Build Forge or later, which instructions can be found at the following?

Enabling the Perl Engine log rotation feature

The Build Forge Java engine (MJC) should already automatically rotate.

J Y commented Sep 05 '17, 11:12 p.m. | edited Sep 07 '17, 3:24 a.m.

Hey Joshua,

Thanks for taking the time to answer my question! Now I believe where the problem lies. 

I upgraded the Build Forge agent from v7.1.3.1 to v8.0.0.4. In the original /etc/bfagent.conf, the activity log was enabled and customized to log under /opt/buildforge/logs/bfagent.log

When I upgraded to v8.0.0.4, the setting was wiped out and I missed to reconfigure this parameter in the /etc/bfagent.conf file which explains why it's not writing to the /opt/buildforge/logs/bfagent.log file.

After the configuration, I tried to delete the bfagent.log file to see if a new log file will be generated and indeed it does, upon the running of a new job. So first issue is addressed.

Now going to the next question of log rotation. Are there really no innate mechanism of log rotation? 

If that's the case, I'll probably have to come up with a cron job to do the log rotation...

Joshua Keefe commented Sep 06 '17, 10:00 a.m.

Hello JY,

Currently, there is no feature available under the bfagent to rotate the log.

As noted before, the log is intended for debugging and not for a log that should be always enabled on a working bfagent.
As there have been some rare instances where leaving the activity_log enabled has directed generated issues under the bfagent resolved after the activity_log was disabled.

Installing -> Installing agents -> Configuring the agent -> bfagent.conf reference
activity_log path

There is no limit on file size. The file must be manually deleted. This setting is intended to be used temporarily for debugging the agent. It is not intended as a permanent log for a working agent.

J Y commented Sep 06 '17, 10:31 p.m.

Noted, Joshua. In that case, I will disable it.

Thanks alot for the help!

Your answer

Register or to post your answer.