Jenkins-備份鎖定錯誤

問題
 
公司的Jenkins,原本可以正常備份,但這幾天備份出現錯誤,如下訊息:
[ERROR] org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
org.jvnet.hudson.plugins.backup.BackupException: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
        at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:115)
        at org.jvnet.hudson.plugins.backup.utils.BackupTask.run(BackupTask.java:130)
        at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: org.codehaus.plexus.archiver.ArchiverException: Problem creating zip: The process cannot access the file because another process has locked a portion of the file
        at org.jvnet.hudson.plugins.backup.utils.BackupEngine.handleEnd(BackupEngine.java:104)
        at org.apache.commons.io.DirectoryWalker.walk(DirectoryWalker.java:336)
        at org.jvnet.hudson.plugins.backup.utils.BackupEngine.doBackup(BackupEngine.java:113)
        ... 2 more

原因

找了好久後,最後找到原因,為目錄monitoring被鎖定而無法產生壓縮檔。此目錄是之前為了查看Jenkins的效能所裝的plugin。
http://jenkins_ur/monitoring


解決方式

1.在備份設定上,將該目錄排除即可。


2.鑑於久未使用,我最後是將它移除。


這個網誌中的熱門文章

IIS 設定只允許特定IP進入

[Sql Server] 資料庫備份筆記