Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-39125

Windows: Cannot change Maven custom tool installer due to slave file locking

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Minor
    • core
    • None

    Description

      Unable to update Maven Custom Tool on Windows slaves due to file lock on Maven process.

      Cause:

      18:53:36 Caused by: java.io.IOException (http://stacktrace.jenkins-ci.org/search?query=java.io.IOException) : remote file operation failed: C:\JENKINS_HOME\tools\hudson.tasks.Maven_MavenInstallation\Maven3-3-3-lockfix at hudson.remoting.Channel@2b1d2861:bld2k8-03: java.nio.file.FileSystemException: C:\JENKINS_HOME\tools\hudson.tasks.Maven_MavenInstallation\Maven3-3-3-lockfix\lib\maven-core-3.3.9.jar: The process cannot access the file because it is being used by another process.
      

      Full Output (job logs):

      Replaced:

      • JENKINS_HOME location with C:\JENKINS_HOME (windows)
      • Nexus URL with NEXUS_URL
      18:53:36 [JDK_8u91_JCEP] $ cmd /c call C:\JENKINS_HOME\tools\hudson.model.JDK\JDK_8u91_JCEP\hudson7143384717113035922.bat
      
      18:53:36 FATAL: Failed to install NEXUS_URL/nexus/content/repositories/ebu-tools/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-corefix-lockfix.zip (NEXUS_URL/nexus/content/repositories/ebu-tools/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-corefix-lockfix.zip) to C:\JENKINS_HOME\tools\hudson.tasks.Maven_MavenInstallation\Maven3-3-3-lockfix
      
      18:53:36 java.io.IOException (http://stacktrace.jenkins-ci.org/search?query=java.io.IOException) : Failed to install NEXUS_URL/nexus/content/repositories/ebu-tools/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-corefix-lockfix.zip (NEXUS_URL/nexus/content/repositories/ebu-tools/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-corefix-lockfix.zip) to C:\JENKINS_HOME\tools\hudson.tasks.Maven_MavenInstallation\Maven3-3-3-lockfix
      
      18:53:36 at hudson.FilePath.installIfNecessaryFrom(FilePath.java:832) (http://stacktrace.jenkins-ci.org/search/?query=hudson.FilePath.installIfNecessaryFrom&entity=method)
      
      18:53:36 at hudson.tools.ZipExtractionInstaller.performInstallation(ZipExtractionInstaller.java:79) (http://stacktrace.jenkins-ci.org/search/?query=hudson.tools.ZipExtractionInstaller.performInstallation&entity=method)
      
      18:53:36 at hudson.tools.InstallerTranslator.getToolHome(InstallerTranslator.java:68) (http://stacktrace.jenkins-ci.org/search/?query=hudson.tools.InstallerTranslator.getToolHome&entity=method)
      
      18:53:36 at hudson.tools.ToolLocationNodeProperty.getToolHome(ToolLocationNodeProperty.java:108) (http://stacktrace.jenkins-ci.org/search/?query=hudson.tools.ToolLocationNodeProperty.getToolHome&entity=method)
      
      18:53:36 at hudson.tools.ToolInstallation.translateFor(ToolInstallation.java:206) (http://stacktrace.jenkins-ci.org/search/?query=hudson.tools.ToolInstallation.translateFor&entity=method)
      
      18:53:36 at hudson.tasks.Maven$MavenInstallation.forNode(Maven.java:624) (http://stacktrace.jenkins-ci.org/search/?query=hudson.tasks.Maven$MavenInstallation.forNode&entity=method)
      
      18:53:36 at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:183) (http://stacktrace.jenkins-ci.org/search/?query=hudson.maven.MavenModuleSetBuild.getEnvironment&entity=method)
      
      18:53:36 at com.cloudbees.jenkins.plugins.customtools.CustomToolInstallWrapper.decorateLauncher(CustomToolInstallWrapper.java:155) (http://stacktrace.jenkins-ci.org/search/?query=com.cloudbees.jenkins.plugins.customtools.CustomToolInstallWrapper.decorateLauncher&entity=method)
      
      18:53:36 at hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher(AbstractBuild.java:566) (http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.createLauncher&entity=method)
      
      18:53:36 at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:492) (http://stacktrace.jenkins-ci.org/search/?query=hudson.model.AbstractBuild$AbstractBuildExecution.run&entity=method)
      
      18:53:36 at hudson.model.Run.execute(Run.java:1738) (http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Run.execute&entity=method)
      
      18:53:36 at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:531) (http://stacktrace.jenkins-ci.org/search/?query=hudson.maven.MavenModuleSetBuild.run&entity=method)
      
      18:53:36 at hudson.model.ResourceController.execute(ResourceController.java:98) (http://stacktrace.jenkins-ci.org/search/?query=hudson.model.ResourceController.execute&entity=method)
      
      18:53:36 at hudson.model.Executor.run(Executor.java:410) (http://stacktrace.jenkins-ci.org/search/?query=hudson.model.Executor.run&entity=method)
      
      18:53:36 Caused by: java.io.IOException (http://stacktrace.jenkins-ci.org/search?query=java.io.IOException) : remote file operation failed: C:\JENKINS_HOME\tools\hudson.tasks.Maven_MavenInstallation\Maven3-3-3-lockfix at hudson.remoting.Channel@2b1d2861:bld2k8-03: java.nio.file.FileSystemException: C:\JENKINS_HOME\tools\hudson.tasks.Maven_MavenInstallation\Maven3-3-3-lockfix\lib\maven-core-3.3.9.jar: The process cannot access the file because it is being used by another process.
      

      Is this an issue that Jenkins can work around, or is it a limitation of Windows file locking and / or Maven ?

      Thx.

      Attachments

        Issue Links

          Activity

            People

              oleg_nenashev Oleg Nenashev
              owood Owen Wood
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: