jenkinsci / jenkinsci/active-directory-plugin
[JENKINS-54892] java.nio.file.AccessDeniedException: C:\Program Files\Java\jdk1.8.0_171\bin\java.exe
- Dominant language
- Java
- Stars
- 53
- Forks
- 115
- PR merge metrics
- No merged PRs in 30d
Description
After upgrading to New Jenkins version 2.138.3, Jenkins job is failed due to
java.nio.file.AccessDeniedException: C:\Program Files\Java\jdk1.8.0_171\bin\java.exe
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
at java.nio.file.Files.deleteIfExists(Files.java:1165)
at hudson.Util.tryOnceDeleteFile(Util.java:316)
at hudson.Util.deleteFile(Util.java:272)
Caused: java.io.IOException: Unable to delete 'C:\Program Files\Java\jdk1.8.0_171\bin\java.exe'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
at hudson.Util.deleteFile(Util.java:277)
at hudson.FilePath.deleteRecursive(FilePath.java:1304)
at hudson.FilePath.deleteContentsRecursive(FilePath.java:1313)
at hudson.FilePath.deleteRecursive(FilePath.java:1295)
---
Originally reported by saftron, imported from: java.nio.file.AccessDeniedException: C:\Program Files\Java\jdk1.8.0_171\bin\java.exe
fbelzunc
Raw content of original issue
After upgrading to New Jenkins version 2.138.3, Jenkins job is failed due to
java.nio.file.AccessDeniedException: C:\Program Files\Java\jdk1.8.0_171\bin\java.exe
at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:83)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
at java.nio.file.Files.deleteIfExists(Files.java:1165)
at hudson.Util.tryOnceDeleteFile(Util.java:316)
at hudson.Util.deleteFile(Util.java:272)
Caused: java.io.IOException: Unable to delete 'C:\Program Files\Java\jdk1.8.0_171\bin\java.exe'. Tried 3 times (of a maximum of 3) waiting 0.1 sec between attempts.
at hudson.Util.deleteFile(Util.java:277)
at hudson.FilePath.deleteRecursive(FilePath.java:1304)
at hudson.FilePath.deleteContentsRecursive(FilePath.java:1313)
at hudson.FilePath.deleteRecursive(FilePath.java:1295)
- environment:
localhost:8080//
1 attachment
- [AccessDeniedException_Jenkins.JPG](https://issues.jenkins.io/secure/attachment/45295/AccessDeniedException_Jenkins.JPG)
> 
Contributor guide
Research direction
Start with the active-directory-plugin context and trace the reported Windows failure through hudson.Util.deleteFile and hudson.FilePath.deleteRecursive. Reproduce the Jenkins 2.138.3 job failure if possible and determine why java.exe cannot be deleted; done means the job completes without this AccessDeniedException.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- authentication
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100