Device or resource busy error

Issue

  • Jenkins crashes or has an abnormal behavior (potentially when trying to delete an item) and a similar trace like the one below is seen on logs:
java.nio.file.FileSystemException: /some/path/.nfs01234567890abcdef1234567: Device or resource busy

Environment

  • Jenkins
  • CloudBees Jenkins Enterprise (CJE)
  • CloudBees Jenkins Enterprise (CJOC)
  • HA: NFS server
  • (optional) EnvInject Plugin version 1.91.2 or earlier??

Resolution

Before anything else verify that your NFS server is correctly running and accessible from your Jenkins instance.
This error is known to appear if only the nfs service is running and not the rpcbind.
See our NFS Guide for more details to setup and optimize your NFS server configuration.

If you NFS server is properly running see these other options:

Case A: your CJE instance makes use of the have EnvInject Plugin

Upgrade to EnvInject Plugin version >= 1.91.3+. ??

Case B: your instance does not makes use of the have EnvInject Plugin

If EnvInject is not in use, there are a few things you can do to try to narrow down the culprit: run lsof +D <FULL_PATH_TO_ITEM> for the offending item. ??Verify that Jenkins is indeed the <PID> that is returned and holding the .nfs files.

  • If it is not Jenkins, and is another process, kill it by running kill <PID>. ??Verify that the .nfs are gone after the process is killed and attempt to delete the job again.
  • If it is Jenkins, check to make sure that all plugins correctly close loggers and propagate the close to upper loggers. ??Refer as an example to to??https://issues.jenkins-ci.org/browse/JENKINS-28409 for more information.

Note: Proposed above commands work on Linux OS.

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.