Legacy Knowledge Base
Published Sep. 10, 2025

How to resolve a Jenkins "Failed to rotate logs" error when executing the Project Build Discarder

Written By

Isaac Wilson

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.
Note: please note that Liferay has renamed its Liferay Experience Could offerings to Liferay SaaS (formerly LXC) and Liferay PaaS (formerly LXC-SM).

Issue

  • In our -infra service's CI logging, we are seeing frequent errors such as the following:
    build-10 [ci-0] WARNING    j.m.BackgroundGlobalBuildDiscarder#lambda$processJob$0: An exception occurred when executing Project Build Discarder
    build-10 [ci-0] Also:  java.nio.file.NoSuchFileException: /var/jenkins_home/jobs/project_name/branches/branch_name/builds/10 -> /var/jenkins_home/jobs/project_name/branches/branch_name/builds/.10
      at sun.nio.fs.UnixException.translateToIOException(UnixException.java:86)
      at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      at sun.nio.fs.UnixCopyFile.move(UnixCopyFile.java:396)
      at sun.nio.fs.UnixFileSystemProvider.move(UnixFileSystemProvider.java:262)
      at java.nio.file.Files.move(Files.java:1395)
      at hudson.model.Run.delete(Run.java:1645)
      at hudson.tasks.LogRotator.perform(LogRotator.java:166)
    build-10 [ci-0] jenkins.util.io.CompositeIOException: Failed to rotate logs for [project_name/branch_name #10]
  • Is it possible to resolve these errors?

Environment

  • Liferay PaaS with a CI version equal or lesser to v4.0.7 

Resolution

  • This is a known Jenkins issue (documented in the third party ticket JENKINS-61687), which can be resolved by updating the Jenkins version in use to 2.249.1+.
  • As such, this issue can be resolved in Liferay Cloud by updating the CI image version in use to v4.1.0+, as this release incremented the Jenkins version included in the CI images above Jenkins v2.249.1.

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base