Issue
You observe that your logs include lots of traces like the one shown below:
org.jenkinsci.plugins.workflow.job.WorkflowRun getLogFile WARNING: Avoid calling getLogFile on JobXXX #BuildYYY java.lang.UnsupportedOperationException at org.jenkinsci.plugins.workflow.job.WorkflowRun.getLogFile(WorkflowRun.java:1082) at hudson.plugins.timestamper.io.LogFileReader.nextLine(LogFileReader.java:157) at hudson.plugins.timestamper.action.TimestampsActionOutput$1.readNextLine(TimestampsActionOutput.java:173) at hudson.plugins.timestamper.action.TimestampsActionOutput$1.read(TimestampsActionOutput.java:132) at java.io.BufferedReader.fill(BufferedReader.java:161)
This can fill the logs and cause different problems in your instance.
Environment
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller
-
CloudBees Jenkins Enterprise - Managed controller
Resolution
This is a known issue, JENKINS-54128 related to the timestamper plugin and its interaction with workflow-job
plugin and groovy-postbuild
plugin.
In order to correct the problem:
-
Take a backup as per the Backup and restore guide
-
Upgrade the above mentioned plugins (or at least the one that you are using), to the versions listed below:
-
Pipeline: Job 2.29 or higher
-
Groovy Postbuild 2.5
-
Workaround
If you can get rid of the warnings in the logs, one easy way to do it is to set the log level for org.jenkinsci.plugins.workflow.job.WorkflowRun
to SEVERE
. That will remove the warning messages from your logs, but our recommendations is that you move to a more long term solution by planning the plugin updates suggested in the previous section.
Tested product/plugin versions
-
Jenkins LTS 2.138.41.0.1
-
Pipeline: Job 2.29
-
Groovy Postbuild 2.3.1