-
Bug
-
Resolution: Unresolved
-
Major
-
tomcat/centos
-
Powered by SuggestiMate
Hello,
On the latest version 1.546 for a maven build I get this error:
Started by user anonymous ln builds/lastSuccessfulBuild /home/dev/.jenkins/jobs/MyBuild/lastSuccessful failed java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastSuccessful at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:241) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1116) at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at hudson.Util.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1064) at hudson.model.Run.createSymlink(Run.java:1783) at hudson.model.Run.updateSymlinks(Run.java:1764) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) ln builds/lastStableBuild /home/dev/.jenkins/jobs/MyBuild/lastStable failed java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastStable at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:241) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1116) at sun.reflect.GeneratedMethodAccessor313.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at hudson.Util.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1064) at hudson.model.Run.createSymlink(Run.java:1783) at hudson.model.Run.updateSymlinks(Run.java:1765) at hudson.model.Run.execute(Run.java:1676) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:519) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:231) Building in workspace /home/dev/.jenkins/jobs/MyBuild/workspace Updating svn://myweb.com/repos/Events/trunk at revision '2014-01-10T15:06:09.745 +0000' At revision 1974 WARNING: clock of the subversion server appears to be out of sync. This can result in inconsistent check out behavior. no change for svn://myweb.com/repos/Events/trunk since the previous build Parsing POMs
It does not seem to get the latest update from the svn.
Switching back to 1.544 fixed the issue.
Cheers Greg
[JENKINS-21330] java.nio.file.DirectoryNotEmptyException: /home/dev/.jenkins/jobs/MyBuild/lastSuccessful
@greg huber: Why do you say that this is not a problem? I mean the builds succeed but the errors in the log are annoying and not there in the previous version. DO you think other wise?
Well, I was initially complaining about my build not working, where it would not update from the svn, but miss understood the exception as an error. I think it does this when the build fails? I installed the poll plugin to force an update from the svn
I guess it would be better to clean up the java.nio.file.DirectoryNotEmptyException message, to avoid this kind of confusion.
Cheers Greg.
Ya . I agree. Going to reopen this as this seems to be coping in the stable release versions as well
Yes :
[JENKINS] Archiving disabled ln builds/lastSuccessfulBuild /opt/jenkins/jobs/.../XXX.pe$pe-metier/lastSuccessful failed java.nio.file.DirectoryNotEmptyException: /opt/jenkins/jobs/.../XXX.pe$pe-metier/lastSuccessful at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1116) at sun.reflect.GeneratedMethodAccessor51.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at hudson.Util.createSymlinkJava7(Util.java:1146) at hudson.Util.createSymlink(Util.java:1064) at hudson.model.Run.createSymlink(Run.java:1775) at hudson.model.Run.updateSymlinks(Run.java:1756) at hudson.maven.MavenBuild$ProxyImpl2.end(MavenBuild.java:570)
On :
- jenkins 1.549
- centos 6.5
- java 1.7
Same issue seen in 1.580
Started by user –
ln builds/lastSuccessfulBuild /var/lib/jenkins/jobs/XXXXXXX/lastSuccessful failed
java.nio.file.DirectoryNotEmptyException: /var/lib/jenkins/jobs/Sears-Staging/lastSuccessful
at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:241)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108)
at java.nio.file.Files.deleteIfExists(Files.java:1116)
at sun.reflect.GeneratedMethodAccessor165.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at hudson.Util.createSymlinkJava7(Util.java:1194)
at hudson.Util.createSymlink(Util.java:1112)
at hudson.model.Run.createSymlink(Run.java:1851)
at hudson.model.Run.updateSymlinks(Run.java:1832)
at hudson.model.Run.execute(Run.java:1743)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
After cleaning up the last stable and lastsuccessful folder i'm not getting this error.
I am having below problem with Jenkins 1.597. Even though build is done successfully but I can see below error on start of log. I have been using this version from couple months now. I am not sure what causes this problem.
ln builds\lastSuccessfulBuild F:\Jenkins\jobs\STDVERSION\lastSuccessful failed
java.nio.file.DirectoryNotEmptyException: F:\Jenkins\jobs\STDVERSION\lastSuccessful
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
at java.nio.file.Files.deleteIfExists(Unknown Source)
at sun.reflect.GeneratedMethodAccessor3435.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.Util.createSymlinkJava7(Util.java:1200)
at hudson.Util.createSymlink(Util.java:1118)
at hudson.model.Run.createSymlink(Run.java:1822)
at hudson.model.Run.updateSymlinks(Run.java:1803)
at hudson.model.Run.execute(Run.java:1716)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
ln builds\lastStableBuild F:\Jenkins\jobs\STD754_Consolidation01_Clean\lastStable failed
java.nio.file.DirectoryNotEmptyException: F:\Jenkins\jobs\STD754_Consolidation01_Clean\lastStable
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
at java.nio.file.Files.deleteIfExists(Unknown Source)
at sun.reflect.GeneratedMethodAccessor3435.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.Util.createSymlinkJava7(Util.java:1200)
at hudson.Util.createSymlink(Util.java:1118)
at hudson.model.Run.createSymlink(Run.java:1822)
at hudson.model.Run.updateSymlinks(Run.java:1804)
at hudson.model.Run.execute(Run.java:1716)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:89)
at hudson.model.Executor.run(Executor.java:240)
Im getting this issue on Jenkins ver. 1.617
java.nio.file.DirectoryNotEmptyException: /Users/jenkins/.jenkins/jobs/Nightly/jobs/Internal_Nightly/lastSuccessful at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1165) at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at hudson.Util.createSymlinkJava7(Util.java:1225) at hudson.Util.createSymlink(Util.java:1143) at hudson.model.Run.createSymlink(Run.java:1848) at hudson.model.Run.updateSymlinks(Run.java:1829) at hudson.model.Run.execute(Run.java:1742) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374) java.nio.file.DirectoryNotEmptyException: /Users/jenkins/.jenkins/jobs/Nightly/jobs/Internal_Nightly/lastStable at sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:242) at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(AbstractFileSystemProvider.java:108) at java.nio.file.Files.deleteIfExists(Files.java:1165) at sun.reflect.GeneratedMethodAccessor156.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at hudson.Util.createSymlinkJava7(Util.java:1225) at hudson.Util.createSymlink(Util.java:1143) at hudson.model.Run.createSymlink(Run.java:1848) at hudson.model.Run.updateSymlinks(Run.java:1830) at hudson.model.Run.execute(Run.java:1742) at com.tikal.jenkins.plugins.multijob.MultiJobBuild.run(MultiJobBuild.java:73) at hudson.model.ResourceController.execute(ResourceController.java:98) at hudson.model.Executor.run(Executor.java:374)
Same Issue at 1.609.3 (on windows)
To reproduce: deleted ALL old builds (so there is no lastsuccessfull/laststable available) with:
import hudson.model.*
import java.util.Date
hudson = Hudson.instance
for (job in hudson.projects) {
job.getBuilds().each
}
It seems that the exception is caused by the code that creates the console output for upstream/downstream projects
i'm using "Build other Projects (extended)" post build actions
Started by upstream project "Trunk.XXX.UpdateVersion" build number 521
originally caused by:
Started by upstream project "Trunk.XXX.BuildStarter" build number 252
originally caused by:
Started by user Administrator
ln builds\lastSuccessfulBuild C:\JENKINS\HOME_MASTER\jobs\Trunk.XXX.Build\lastSuccessful failed
java.nio.file.DirectoryNotEmptyException: C:\JENKINS\HOME_MASTER\jobs\Trunk.XXX.Build\lastSuccessful
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
at java.nio.file.Files.deleteIfExists(Unknown Source)
at sun.reflect.GeneratedMethodAccessor403.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.Util.createSymlinkJava7(Util.java:1224)
at hudson.Util.createSymlink(Util.java:1142)
at hudson.model.Run.createSymlink(Run.java:1842)
at hudson.model.Run.updateSymlinks(Run.java:1823)
at hudson.model.Run.execute(Run.java:1736)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381)
ln builds\lastStableBuild C:\JENKINS\HOME_MASTER\jobs\Trunk.XXX.Build\lastStable failed
java.nio.file.DirectoryNotEmptyException: C:\JENKINS\HOME_MASTER\jobs\Trunk.XXX.Build\lastStable
at sun.nio.fs.WindowsFileSystemProvider.implDelete(Unknown Source)
at sun.nio.fs.AbstractFileSystemProvider.deleteIfExists(Unknown Source)
at java.nio.file.Files.deleteIfExists(Unknown Source)
at sun.reflect.GeneratedMethodAccessor403.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at hudson.Util.createSymlinkJava7(Util.java:1224)
at hudson.Util.createSymlink(Util.java:1142)
at hudson.model.Run.createSymlink(Run.java:1842)
at hudson.model.Run.updateSymlinks(Run.java:1824)
at hudson.model.Run.execute(Run.java:1736)
at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:381)
Anything else that i can do to help to isolate/solve the bug?
This issue is assigned to the Component "Maven Plugin"
not sure what this means but basically i'm not using that plugin (installed but disabled)
We experience this issue here randomly, too, and it's still present in version 1.622.
Is there any work-around one could use until it's fixed?
Just to give my two cents on this issue, which started to happen just after a renaming Tristan project to Tristan (local)
To solve it, I renamed my C:\Program Files (x86)\Jenkins\jobs\Tristan (local)*lastSuccessful* folder to lastSuccessful.old
This suggest that may be Jenkins should choose among one of the following approaches:
- Jenkins refactors project's configuration files so they reflect the new project name;
- Or Jenkins, forces user to aknowledge (checkbox) that he will loose Last Successful Build *information because because folder *lastSuccessful *will be renamed to *lastSuccessful.nnn, where nnn is sequencial number to prevent folder overwriting.
Hope this helps
I am using Jenkins v1.643
This started happening on a new Jenkins server that a teammate was trying to setup by cloning an existing one, and I found out that he used scp -r to copy the whole working tree and that resulted in the lastSuccessful and lastStable soft-links to get converted to physical directories. I guess Jenkins was trying to remove it like it is a file (which a soft-link is), but since it turned out to be a directory that is not empty, it is causing this exception. When you remove/rename these directories, it clears the path for Jenkins to recreate the soft-links thus solving the problem.
Perhaps Jenkins can handle this case more gracefully?
`createSymlinkJava7` could detect this case and either report the real mistake, or simply delete the bogus directory.
sorry not a problem