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

Archive artefacts crashes on file names containing Unicode characters

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: core
    • Environment:
    • Similar Issues:

      Description

      I created a simple project which didn't contain any build actions, only a post-build "archive artifacts" action. The project was supposed to pull a bunch of files out of SVN and dump them into a zip file, excluding certain files to make it easier for me to deploy.

      One of the files however is named specialcharacters-ę.html - notice the non-ASCII character.

      On attempting to "build" the project, the following content is dumped to the console log:

      Archiving artifacts
      ERROR: Failed to archive artifacts: **/*
      java.io.IOException: java.io.IOException: Failed to extract E:\Jenkins\workspace\demo.cyotek.com/transfer of 151 files
      	at hudson.FilePath.readFromTar(FilePath.java:2300)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2209)
      	at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
      	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:236)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      	at hudson.model.Run.execute(Run.java:1763)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.io.FileNotFoundException: E:\Jenkins\jobs\demo.cyotek.com\builds\3\archive\features\specialcharacters-?.html (The filename, directory name, or volume label syntax is incorrect)
      	at java.io.FileOutputStream.open0(Native Method)
      	at java.io.FileOutputStream.open(Unknown Source)
      	at java.io.FileOutputStream.<init>(Unknown Source)
      	at java.io.FileOutputStream.<init>(Unknown Source)
      	at hudson.util.IOUtils.copy(IOUtils.java:38)
      	at hudson.FilePath.readFromTar(FilePath.java:2290)
      	... 13 more
      
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2216)
      	at jenkins.model.StandardArtifactManager.archive(StandardArtifactManager.java:61)
      	at hudson.tasks.ArtifactArchiver.perform(ArtifactArchiver.java:236)
      	at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
      	at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:782)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:723)
      	at hudson.model.Build$BuildExecution.post2(Build.java:185)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:668)
      	at hudson.model.Run.execute(Run.java:1763)
      	at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      	at hudson.model.ResourceController.execute(ResourceController.java:98)
      	at hudson.model.Executor.run(Executor.java:410)
      Caused by: java.util.concurrent.ExecutionException: java.io.IOException: This archives contains unclosed entries.
      	at hudson.remoting.Channel$2.adapt(Channel.java:813)
      	at hudson.remoting.Channel$2.adapt(Channel.java:808)
      	at hudson.remoting.FutureAdapter.get(FutureAdapter.java:59)
      	at hudson.FilePath.copyRecursiveTo(FilePath.java:2212)
      	... 12 more
      Caused by: java.io.IOException: This archives contains unclosed entries.
      	at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.finish(TarArchiveOutputStream.java:225)
      	at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.close(TarArchiveOutputStream.java:241)
      	at hudson.util.io.TarArchiver.close(TarArchiver.java:111)
      	at hudson.FilePath.writeToTar(FilePath.java:2263)
      	at hudson.FilePath.access$2100(FilePath.java:190)
      	at hudson.FilePath$45.invoke(FilePath.java:2202)
      	at hudson.FilePath$45.invoke(FilePath.java:2198)
      	at hudson.FilePath$FileCallableWrapper.call(FilePath.java:2719)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:120)
      	at hudson.remoting.UserRequest.perform(UserRequest.java:48)
      	at hudson.remoting.Request$2.run(Request.java:326)
      	at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      	at java.util.concurrent.FutureTask.run(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
      	at hudson.remoting.Engine$1$1.run(Engine.java:62)
      	at java.lang.Thread.run(Unknown Source)
      	at ......remote call to JUPITER(Native Method)
      	at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1416)
      	at hudson.remoting.UserResponse.retrieve(UserRequest.java:220)
      	at hudson.remoting.Channel$2.adapt(Channel.java:811)
      	... 15 more
      Build step 'Archive the artifacts' changed build result to FAILURE
      

      Judging from the way it converted the ę to ? I assume it's an encoding issue of some sort.

      I did a fairly brief search of issues but didn't find anything specific. I did find a note in one issue relating to console output which stated that the encoding of Java was incorrect. Accordingly, I tried adding -Dfile.encoding=UTF8 to jenkins.xml, restarted the service, and confirmed via /systeminfo that the encoding was now set to UTF8 however retrying to the build result in the same error.

      The file is used as part of a test so is required to be named that way. Can you offer any suggestions on resolving the issue, or is it an an actual bug that I can't workaround?

      I've classed it as major as I'm aware of no workaround save to rename the file - which isn't a solution in this case, but feel free to disagree with that assessment!

      Thanks;

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            richardmoss Richard Moss
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: