Support.zip file generation fails with No such file or directory error

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問


問題

When generation Support.zip file, the following appears in the catalina.out log file:

2019-02-01 10:42:15,375 ajp-nio-8009-exec-3 ERROR asouiba 642x87624x1 12ov8lg 10.70.89.222 /rest/troubleshooting/latest/support-zip/status/task/9dd61142-e244-424a-bedf-143b5cd9b912 [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Error getting zip file name
java.lang.RuntimeException: Error getting zip file name
        at com.atlassian.troubleshooting.stp.zip.CreateSupportZipMonitor.getAttributes(CreateSupportZipMonitor.java:35)
        at com.atlassian.troubleshooting.stp.rest.dto.LocalSupportZipTaskInfoDto.localSupportZipTaskInfo(LocalSupportZipTaskInfoDto.java:71)
        at java.util.Optional.map(Optional.java:215)
        at com.atlassian.troubleshooting.stp.rest.SupportZipResource.getSupportZipStatus(SupportZipResource.java:137)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        ... 2 filtered
        at java.lang.reflect.Method.invoke(Method.java:498)
        ... 19 filtered
        at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
        ... 1 filtered
        at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
        ... 41 filtered
        at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
        ... 53 filtered
        at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
        ... 1 filtered
        at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
        ... 16 filtered
        at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
        ... 19 filtered
        at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
        ... 5 filtered
        at com.idalko.jira.plugins.igrid.servicedesk.ServletRequestContextFilter.doFilter(ServletRequestContextFilter.java:23)
        ... 8 filtered
        at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
        ... 4 filtered
        at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
        ... 26 filtered
        at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
        ... 25 filtered
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.io.IOException: No such file or directory
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:192)
        at com.atlassian.troubleshooting.stp.task.DefaultTaskMonitor.get(DefaultTaskMonitor.java:108)
        at com.atlassian.troubleshooting.stp.zip.CreateSupportZipMonitor.getAttributes(CreateSupportZipMonitor.java:33)
        ... 240 more
        at com.atlassian.troubleshooting.stp.zip.ZipFileAppender.processInnerItem(ZipFileAppender.java:137)
        at com.atlassian.troubleshooting.stp.zip.ZipFileAppender.processInnerItem(ZipFileAppender.java:39)
        at com.atlassian.troubleshooting.stp.zip.NestedProgressTracker.process(NestedProgressTracker.java:48)
        at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.addSupportFilesToZip(CreateSupportZipTask.java:133)
        at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.lambda$null$0(CreateSupportZipTask.java:79)
        at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.writeSupportZipFile(CreateSupportZipTask.java:112)
        at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.lambda$call$1(CreateSupportZipTask.java:77)
        at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.call(CreateSupportZipTask.java:88)
        at com.atlassian.troubleshooting.stp.zip.CreateSupportZipTask.call(CreateSupportZipTask.java:35)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        ... 1 more
Caused by: java.io.IOException: No such file or directory
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createTempFile(File.java:2024)
        at java.io.File.createTempFile(File.java:2070)
        at com.atlassian.troubleshooting.stp.request.FileSanitizer.sanitize(FileSanitizer.java:65)
        at com.atlassian.troubleshooting.stp.zip.ZipFileAppender.processInnerItem(ZipFileAppender.java:135)

Also, the below warning message will be shown on the JIRA UI:

原因

Jira writes logs for Support.zip file generations under $JIRA_INSTALL/temp directory. If temp directory is missing under $JIRA_INSTALL, then the error above will be thrown.

ソリューション

Create temp directory under  $JIRA_INSTALL path and grant read/write permission to the directory owner. The commands below should be executed by Jira process owner:

mkdir -p $JIRA_INSTALL/temp
cd $JIRA_INSTALL
chmod u+rw temp
最終更新日: 2019 年 2 月 4 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.