[JIRA] [core] (JENKINS-35093) Moving a Build Job to a Folder results in Exception and loss of build history

2 views
Skip to first unread message

Thomas.Hieber@Berthold.com (JIRA)

unread,
May 24, 2016, 8:55:02 AM5/24/16
to jenkinsc...@googlegroups.com
Thomas Hieber created an issue
 
Jenkins / Bug JENKINS-35093
Moving a Build Job to a Folder results in Exception and loss of build history
Issue Type: Bug Bug
Assignee: Unassigned
Components: core
Created: 2016/May/24 12:54 PM
Environment: Windows 10/64Bit, Jenkins 2.2
Labels: build-history loss-of-data move
Priority: Major Major
Reporter: Thomas Hieber

When I try to move an existing Job to a Folder I get an exception error, and the move completes only partially. The Job is inside the new folder, but build history is lost. Settings for the Job are still ok, it will also build with the correct next build number.

Stack trace
org.apache.commons.io.FileExistsException: Destination 'c:\Jenkins\LB47x\LB_SAMPLE\builds' already exists
at org.apache.commons.io.FileUtils.moveDirectory(FileUtils.java:2748)
at hudson.model.Job.movedTo(Job.java:682)
at hudson.model.Items.move(Items.java:438)
at com.cloudbees.hudson.plugins.folder.relocate.StandardHandler.doMove(StandardHandler.java:72)
at com.cloudbees.hudson.plugins.folder.relocate.StandardHandler.handle(StandardHandler.java:64)
at com.cloudbees.hudson.plugins.folder.relocate.DefaultRelocationUI.doMove(DefaultRelocationUI.java:121)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:324)
at org.kohsuke.stapler.interceptor.RequirePOST$Processor.invoke(RequirePOST.java:52)
at org.kohsuke.stapler.PreInvokeInterceptedFunction.invoke(PreInvokeInterceptedFunction.java:26)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:167)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:100)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:124)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:813)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$11.dispatch(MetaClass.java:380)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.MetaClass$5.doDispatch(MetaClass.java:233)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:58)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:135)
at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:47)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:59)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:126)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:117)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at jenkins.security.BasicHeaderProcessor.doFilter(BasicHeaderProcessor.java:93)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:67)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:171)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.kohsuke.stapler.compression.CompressionFilter.doFilter(CompressionFilter.java:49)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.kohsuke.stapler.DiagnosticThreadNameFilter.doFilter(DiagnosticThreadNameFilter.java:30)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:553)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
at winstone.BoundedExecutorService$1.run(BoundedExecutorService.java:77)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.4.2#64017-sha1:e244265)
Atlassian logo

dbeck@cloudbees.com (JIRA)

unread,
May 25, 2016, 5:05:01 AM5/25/16
to jenkinsc...@googlegroups.com
Daniel Beck commented on Bug JENKINS-35093
 
Re: Moving a Build Job to a Folder results in Exception and loss of build history

Let me guess: Windows Search service is running? Or maybe an antivirus is running?

Thomas.Hieber@Berthold.com (JIRA)

unread,
May 25, 2016, 5:10:01 AM5/25/16
to jenkinsc...@googlegroups.com

Antivirus is running for sure - this could explain if this happend once, but this happens all the time. I moved now about 10 Jobs, and each and every one failed. (I was able to manually copy the builds Directory into the target Directory, and after a restart of the Jenkins Service build history was back...)

wim@akimbo.be (JIRA)

unread,
Aug 26, 2016, 6:02:01 PM8/26/16
to jenkinsc...@googlegroups.com

I have the same issue. The trick to reproduce it appears to be to configure the Workspace Root Directory and Build Record Root Directory (the settings hidden under "advanced" on the /configure page).

I have tested and reproduced with these settings:

Workspace Root Directory = c:\users\wcoen_000\jenkins\workspaces\${ITEM_FULLNAME}
Build Record Root Directory = c:\users\wcoen_000\jenkins\builds\${ITEM_FULLNAME}
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

wim@akimbo.be (JIRA)

unread,
Aug 26, 2016, 6:09:04 PM8/26/16
to jenkinsc...@googlegroups.com
Wim Coenen edited a comment on Bug JENKINS-35093
I have the same issue. The trick to reproduce it appears to be to configure the Workspace Root Directory and Build Record Root Directory (the settings hidden under "advanced" on the /configure page).

I have tested and reproduced with these settings in a fresh Jenkins instance :
{noformat}

Workspace Root Directory = c:\users\wcoen_000\jenkins\workspaces\${ITEM_FULLNAME}
Build Record Root Directory = c:\users\wcoen_000\jenkins\builds\${ITEM_FULLNAME}
{noformat}

Next I created a trivial job which executes "echo test > test" and archives the resulting test file.

Next I tried to move this job into a folder.

Thomas.Hieber@Berthold.com (JIRA)

unread,
Sep 12, 2016, 9:33:04 AM9/12/16
to jenkinsc...@googlegroups.com

I can confirm, this is also the case for us. we have set Build Record Root Directory to c:\Jenkins\$

{ITEM_FULL_NAME}\builds and Build Record Root Directory to c:\Jenkins\${ITEM_FULL_NAME}

\workspace.

Thomas.Hieber@Berthold.com (JIRA)

unread,
Sep 12, 2016, 9:34:02 AM9/12/16
to jenkinsc...@googlegroups.com
Thomas Hieber edited a comment on Bug JENKINS-35093
I can confirm, this is also the case for us. we have set Build Record Root Directory to

{code:java}
c:\Jenkins\${ITEM_FULL_NAME}\builds

{code}

and Build Record Root Directory to


{code:java}
c:\Jenkins\${ITEM_FULL_NAME}\workspace.

{code}

ivan.fofanov@gmail.com (JIRA)

unread,
Oct 24, 2016, 3:07:05 PM10/24/16
to jenkinsc...@googlegroups.com

hagit.segev4@gmail.com (JIRA)

unread,
Jul 31, 2018, 5:59:02 AM7/31/18
to jenkinsc...@googlegroups.com

Happens to me too. Must restart Jenkins after that. Unix system.

This message was sent by Atlassian JIRA (v7.10.1#710002-sha1:6efc396)

mdealer@gmail.com (JIRA)

unread,
Feb 28, 2019, 1:54:09 AM2/28/19
to jenkinsc...@googlegroups.com

Just happened to a large job for us.

This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)
Reply all
Reply to author
Forward
0 new messages