"ERROR: missing workspace" and chaining builds

3,645 views
Skip to first unread message

Vincent Massol

unread,
Dec 19, 2017, 8:01:32 AM12/19/17
to Jenkins Users
Hi guys,

I regularly get the following errors in our Jenkins pipeline on XWiki:

ERROR: missing workspace /home/hudsonagent/jenkins_root/workspace/XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA on agent-2-1

[main] Caused by: java.io.IOException: /home/hudsonagent/jenkins_root/workspace/XWiki_xwiki-platform_master-ZGNMAWOYB6APYNMYWF7HH475RM4M6C6RE2U76Y5M5RWNQJWOLFGA/xwiki-platform-core/xwiki-platform-flamingo/xwiki-platform-flamingo-themes/xwiki-platform-flamingo-theme-test/xwiki-platform-flamingo-theme-test-tests/target/xwiki doesn't exist.

Our Jenkins file does this:

stage ('Platform Builds') {
  parallel
(
   
'main': {
      build
(
        name
: 'Main',
        goals
: 'clean deploy',
        profiles
: 'legacy,integration-tests,office-tests,snapshotModules',
        properties
: '-Dxwiki.checkstyle.skip=true -Dxwiki.surefire.captureconsole.skip=true -Dxwiki.revapi.skip=true'
     
)
      build
(
        name
: 'Distribution',
        goals
: 'clean deploy',
        profiles
: 'legacy,integration-tests,office-tests,snapshotModules',
        pom
: 'xwiki-platform-distribution/pom.xml'
     
)
      build
(), ...
 
}, ...


And build() is running Maven on a node() (xwikiBuild() is pipeline library running Maven):

def build(map)
{
  node
{
    xwikiBuild
(map.name) {
...
   
}

 
}
}


In this situation, do you see any reason for Jenkins to delete a workspace on "main" and a reason for each node() call to not request a new workspace? So in short I guess I'm asking for some clarification on when workspaces are initialized.

Thanks!
-Vincent


Vincent Massol

unread,
Dec 19, 2017, 8:06:39 AM12/19/17
to Jenkins Users
Could it be that the workspace is deleted once the node() ends and that it happens that some other node() calls happen to run on the same node and that Jenkins would allocate a workspace only once per job? That would be strange though.

Thanks
-Vincent

Reinhold Füreder

unread,
Dec 19, 2017, 8:10:36 AM12/19/17
to jenkins...@googlegroups.com

Hi Vincent,

 

does it work most of the times? If so, could it be related to https://issues.jenkins-ci.org/browse/JENKINS-27329 “WorkspaceCleanupThread may delete workspaces of running jobs”?

 

HTH Reinhold

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e9c23914-c1cc-43db-86b2-e30c06d70583%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Vincent Massol

unread,
Dec 19, 2017, 10:28:07 AM12/19/17
to Jenkins Users


On Tuesday, December 19, 2017 at 2:10:36 PM UTC+1, Reinhold Füreder wrote:

Hi Vincent,

 

does it work most of the times? If so, could it be related to https://issues.jenkins-ci.org/browse/JENKINS-27329 “WorkspaceCleanupThread may delete workspaces of running jobs”?


Indeed it works most of the time and the problem only happens from time to time. The issue you reference could well be the cause, thanks for pointing it (I'll try to workaround mentioned in it).

Thanks
-Vincent

Vincent Massol

unread,
Dec 19, 2017, 10:31:33 AM12/19/17
to Jenkins Users
Note that we're having this problem only since we moved to pipeline.

Thanks
-Vincent

Rashi Saxena

unread,
Jun 7, 2018, 3:23:58 PM6/7/18
to Jenkins Users
Hi Vincent

I got this problem on pipeline deployment , says ERROR : Missing Workspace and failed the job which is very annoying.

Were you able to figure out the fix or any workaround ? any help would be much appreciated.

Thanks 
Rashi

Reinhold Füreder

unread,
Jun 8, 2018, 2:34:14 AM6/8/18
to jenkins...@googlegroups.com

Hi Rashi,

 

If it happened/happens sporadically and you have Jenkins < 2.125 it may be related to https://issues.jenkins-ci.org/browse/JENKINS-27329

 

HTH Reinhold

Reply all
Reply to author
Forward
0 new messages