com.atlassian.jira.web.util.AttachmentException: Cannot write to attachment directory. Check that the application server and JIRA have permissions to write to: /usr/local/jira/attachments/NOV/NOV-83753

Atlassian JIRA | Jeff Kirby | 7 years ago
  1. 0

    One of our projects now has over 32000 issues that each have attachments. When a user went to give the 32,001 issue an attachment, the file system refused it because it has a maximum of 32000 file handles per directory. The problem is that each issue gets its own sub-directory underneath the project key in the attachment path. There needs to be some sort of arbitrary middle directory between the project key and the issue directory, similar to how photos are stored on SIM cards. Maybe group issues in groups by the fourth power of ten? For example, instead of /usr/local/jira/attachments/JRA/JRA-123456 have /usr/local/jira/attachments/JRA/120000/JRA-123456 For now we've moved the 1,000 oldest attachments to another directory, effectively deleting them from the Jira web site. So we have a couple weeks to come up with some patch for this or we keep effectively archiving or deleting old attachments. I understand from our OS folks that it would be possible to recompile the kernel to have a higher maximum file handle setting. However, my management wants to pursue an application solution rather than risk the OS recompilation solution. Here is the error reported in the logs: 2009-11-23 10:15:37,371 TP-Processor94 ERROR [jira.issue.fields.AttachmentSystemField] Error occurred while creating attachment. com.atlassian.jira.web.util.AttachmentException: Cannot write to attachment directory. Check that the application server and JIRA have permissions to write to: /usr/local/jira/attachments/NOV/NOV-83753 at com.atlassian.jira.util.AttachmentUtils.checkValidAttachmentDirectory(AttachmentUtils.java:109) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:277) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:294) at com.atlassian.jira.issue.fields.AttachmentSystemField.addAttachment(AttachmentSystemField.java:162) at com.atlassian.jira.issue.fields.AttachmentSystemField.createValue(AttachmentSystemField.java:141) at com.atlassian.jira.workflow.function.issue.IssueCreateFunction.execute(IssueCreateFunction.java:85) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1265) at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:618) at com.atlassian.jira.workflow.SimpleWorkflowManager.createIssue(SimpleWorkflowManager.java:217) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:378) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:326) at sun.reflect.GeneratedMethodAccessor999.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy3.createIssue(Unknown Source) at com.atlassian.jira.web.action.issue.CreateIssueDetails.createIssue(CreateIssueDetails.java:141) at com.atlassian.jira.web.action.issue.CreateIssueDetails.doExecute(CreateIssueDetails.java:110) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:192) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:120) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)

    Atlassian JIRA | 7 years ago | Jeff Kirby
    com.atlassian.jira.web.util.AttachmentException: Cannot write to attachment directory. Check that the application server and JIRA have permissions to write to: /usr/local/jira/attachments/NOV/NOV-83753
  2. 0

    One of our projects now has over 32000 issues that each have attachments. When a user went to give the 32,001 issue an attachment, the file system refused it because it has a maximum of 32000 file handles per directory. The problem is that each issue gets its own sub-directory underneath the project key in the attachment path. There needs to be some sort of arbitrary middle directory between the project key and the issue directory, similar to how photos are stored on SIM cards. Maybe group issues in groups by the fourth power of ten? For example, instead of /usr/local/jira/attachments/JRA/JRA-123456 have /usr/local/jira/attachments/JRA/120000/JRA-123456 For now we've moved the 1,000 oldest attachments to another directory, effectively deleting them from the Jira web site. So we have a couple weeks to come up with some patch for this or we keep effectively archiving or deleting old attachments. I understand from our OS folks that it would be possible to recompile the kernel to have a higher maximum file handle setting. However, my management wants to pursue an application solution rather than risk the OS recompilation solution. Here is the error reported in the logs: {noformat} 2009-11-23 10:15:37,371 TP-Processor94 ERROR [jira.issue.fields.AttachmentSystemField] Error occurred while creating attachment. com.atlassian.jira.web.util.AttachmentException: Cannot write to attachment directory. Check that the application server and JIRA have permissions to write to: /usr/local/jira/attachments/NOV/NOV-83753 at com.atlassian.jira.util.AttachmentUtils.checkValidAttachmentDirectory(AttachmentUtils.java:109) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:277) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:294) at com.atlassian.jira.issue.fields.AttachmentSystemField.addAttachment(AttachmentSystemField.java:162) at com.atlassian.jira.issue.fields.AttachmentSystemField.createValue(AttachmentSystemField.java:141) at com.atlassian.jira.workflow.function.issue.IssueCreateFunction.execute(IssueCreateFunction.java:85) at com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869) at com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1265) at com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:618) at com.atlassian.jira.workflow.SimpleWorkflowManager.createIssue(SimpleWorkflowManager.java:217) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:378) at com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:326) at sun.reflect.GeneratedMethodAccessor999.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy3.createIssue(Unknown Source) at com.atlassian.jira.web.action.issue.CreateIssueDetails.createIssue(CreateIssueDetails.java:141) at com.atlassian.jira.web.action.issue.CreateIssueDetails.doExecute(CreateIssueDetails.java:110) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54) at webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132) at com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:178) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:73) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119) at com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55) at com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:192) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:120) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132) {noformat}

    Atlassian JIRA | 7 years ago | Jeff Kirby
    com.atlassian.jira.web.util.AttachmentException: Cannot write to attachment directory. Check that the application server and JIRA have permissions to write to: /usr/local/jira/attachments/NOV/NOV-83753
  3. 0

    When I try to import an issue with 2 attachments and when these 2 attachments have the same name, JSON importer fails whereas the import is successful with the CSV importer. Example of the attachment part in JSON: "attachments" : [{ "name" : "Doc1.docx", "attacher" : "zgraignic", "created" : "2014-04-30T13:51:11.400+0000", "uri" : "file://TeamPulse-attachment-598.docx" }, { "name" : "Doc1.docx", "attacher" : "zgraignic", "created" : "2014-07-22T06:55:37.253+0000", "uri" : "file://TeamPulse-attachment-707.docx" } ], Example of the attachment part in CSV: id;Type;Status;summary;attachment1;attachment2 1;Bug;CLOSED;Summary;"2014-04-30 13:51;zgraignic;Doc1.docx;file://TeamPulse-attachment-598.docx";"2014-05-30 13:51;zgraignic;Doc1.docx;file://TeamPulse-attachment-707.docx" The exception in the log is the following: 2014-07-23 14:36:09,204 ERROR - Failed to attach attachments to issue TODIMP-6 com.atlassian.jira.plugins.importer.external.ExternalException: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist at com.atlassian.jira.plugins.importer.imports.importer.impl.ExternalUtils.attachFile(ExternalUtils.java:354) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.createIssue(DefaultJiraDataImporter.java:1010) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.importIssues(DefaultJiraDataImporter.java:830) at com.atlassian.jira.plugins.importer.imports.importer.impl.DefaultJiraDataImporter.doImport(DefaultJiraDataImporter.java:400) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:26) at com.atlassian.jira.plugins.importer.imports.importer.impl.ImporterCallable.call(ImporterCallable.java:15) at com.atlassian.jira.task.TaskManagerImpl$TaskCallableDecorator.call(TaskManagerImpl.java:374) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at com.atlassian.jira.task.ForkedThreadExecutor$ForkedRunnableDecorator.run(ForkedThreadExecutor.java:250) at java.lang.Thread.run(Thread.java:744) Caused by: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk(DefaultAttachmentManager.java:524) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:459) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentBean(DefaultAttachmentManager.java:423) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:393) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:417) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:405) at sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at com.sun.proxy.$Proxy329.createAttachment(Unknown Source) at sun.reflect.GeneratedMethodAccessor1819.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy965.createAttachment(Unknown Source) at com.atlassian.jira.plugins.importer.imports.importer.impl.ExternalUtils.attachFile(ExternalUtils.java:338) When logging the java file activity, it appears that the JSON importer is using the same temporary file for both attachments whereas it uses different temporary files when the 2 attachments on the same issue have different names (i.e. Doc1.docx and Doc2.docx).

    Atlassian JIRA | 2 years ago | Zaƫl Graignic
    com.atlassian.jira.plugins.importer.external.ExternalException: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp to D:\Dev\apps\JIRA_HOME\data\attachments\TODIMP\TODIMP-6\12155: java.io.IOException: File C:\Users\zgraignic\Desktop\atlassian-jira-6.2.7\atlassian-jira-6.2.7-standalone\temp\temporary-jira-importer-attachment-copy-4851771988392712779.tmp does not exist
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    [JRA-11204] CreateOrCommentHandler: Attachment with invalid filename causes loop - Atlassian JIRA

    atlassian.com | 1 year ago
    com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect)
  6. 0

    Some emails contain strangely named attachements that causes the CreateOrCommentHandler to fail and retry consuming the email for ever, creating a new entry each time. The following stackfest unveil the drama in its full extent! Cheers, David ---------------------------- 09:58:12,299 INFO [MailUtils] Exception getting the content type of message - probably not of type 'String'javax.mail.internet.MimeMultipart 09:58:12,815 INFO [CreateIssueHandler] Issue SALXE-1272 created 09:58:12,893 WARN [DefaultAttachmentManager] Creating attachment without a file. Aborting 09:58:13,049 ERROR [DefaultAttachmentManager] Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect) java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect) at java.io.FileOutputStream.open(Native Method) at java.io.FileOutputStream.<init>(FileOutputStream.java:179) at java.io.FileOutputStream.<init>(FileOutputStream.java:131) at com.atlassian.core.util.FileUtils.copyFile(FileUtils.java:62) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk(DefaultAttachmentManager.java:230) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:205) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:214) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentWithPart(AbstractMessageHandler.java:297) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:253) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:202) at com.atlassian.jira.service.util.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:194) at com.atlassian.jira.service.util.handler.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:117) at com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:184) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516) 09:58:13,049 ERROR [AbstractMessageHandler] Exception while creating attachment for issue SALXE-1272: com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect) com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachmentOnDisk(DefaultAttachmentManager.java:240) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:205) at com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:214) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentWithPart(AbstractMessageHandler.java:297) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:253) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:202) at com.atlassian.jira.service.util.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:194) at com.atlassian.jira.service.util.handler.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:117) at com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:184) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516) 09:58:13,049 ERROR [CreateIssueHandler] Could not create issue! java.io.IOException: Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentWithPart(AbstractMessageHandler.java:312) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.handleMultipart(AbstractMessageHandler.java:253) at com.atlassian.jira.service.util.handler.AbstractMessageHandler.createAttachmentsForMessage(AbstractMessageHandler.java:202) at com.atlassian.jira.service.util.handler.CreateIssueHandler.handleMessage(CreateIssueHandler.java:194) at com.atlassian.jira.service.util.handler.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:117) at com.atlassian.jira.service.services.mail.MailFetcherService.run(MailFetcherService.java:184) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:67) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:48) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)

    Atlassian JIRA | 1 decade ago | David Dossot
    com.atlassian.jira.web.util.AttachmentException: Could not move (or copy) attachment from C:\WINDOWS\TEMP\tempattach39525dat to e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0: java.io.FileNotFoundException: e:\jira\data\attachment\SALXE\SALXE-1272\11507_mdsefc?a2125;MATT10CC18881P525527B525530S0 (The filename, directory name, or volume label syntax is incorrect)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.atlassian.jira.web.util.AttachmentException

      Cannot write to attachment directory. Check that the application server and JIRA have permissions to write to: /usr/local/jira/attachments/NOV/NOV-83753

      at com.atlassian.jira.util.AttachmentUtils.checkValidAttachmentDirectory()
    2. com.atlassian.jira
      IssueCreateFunction.execute
      1. com.atlassian.jira.util.AttachmentUtils.checkValidAttachmentDirectory(AttachmentUtils.java:109)
      2. com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:277)
      3. com.atlassian.jira.issue.managers.DefaultAttachmentManager.createAttachment(DefaultAttachmentManager.java:294)
      4. com.atlassian.jira.issue.fields.AttachmentSystemField.addAttachment(AttachmentSystemField.java:162)
      5. com.atlassian.jira.issue.fields.AttachmentSystemField.createValue(AttachmentSystemField.java:141)
      6. com.atlassian.jira.workflow.function.issue.IssueCreateFunction.execute(IssueCreateFunction.java:85)
      6 frames
    3. com.opensymphony.workflow
      AbstractWorkflow.initialize
      1. com.opensymphony.workflow.AbstractWorkflow.executeFunction(AbstractWorkflow.java:869)
      2. com.opensymphony.workflow.AbstractWorkflow.transitionWorkflow(AbstractWorkflow.java:1265)
      3. com.opensymphony.workflow.AbstractWorkflow.initialize(AbstractWorkflow.java:618)
      3 frames
    4. com.atlassian.jira
      DefaultIssueManager.createIssue
      1. com.atlassian.jira.workflow.SimpleWorkflowManager.createIssue(SimpleWorkflowManager.java:217)
      2. com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:378)
      3. com.atlassian.jira.issue.managers.DefaultIssueManager.createIssue(DefaultIssueManager.java:326)
      3 frames
    5. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor999.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    6. com.atlassian.util
      ObjectProfiler.profiledInvoke
      1. com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:71)
      1 frame
    7. com.atlassian.jira
      SwitchingInvocationHandler.invoke
      1. com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
      1 frame
    8. Unknown
      $Proxy3.createIssue
      1. $Proxy3.createIssue(Unknown Source)
      1 frame
    9. com.atlassian.jira
      CreateIssueDetails.doExecute
      1. com.atlassian.jira.web.action.issue.CreateIssueDetails.createIssue(CreateIssueDetails.java:141)
      2. com.atlassian.jira.web.action.issue.CreateIssueDetails.doExecute(CreateIssueDetails.java:110)
      2 frames
    10. webwork.action
      ActionSupport.execute
      1. webwork.action.ActionSupport.execute(ActionSupport.java:153)
      1 frame
    11. com.atlassian.jira
      JiraActionSupport.execute
      1. com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54)
      1 frame
    12. webwork.dispatcher
      GenericDispatcher.executeAction
      1. webwork.dispatcher.GenericDispatcher.executeAction(GenericDispatcher.java:132)
      1 frame
    13. com.atlassian.jira
      JiraServletDispatcher.service
      1. com.atlassian.jira.web.dispatcher.JiraServletDispatcher.service(JiraServletDispatcher.java:178)
      1 frame
    14. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      1 frame
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    16. com.atlassian.jira
      AccessLogFilter.doFilter
      1. com.atlassian.jira.web.filters.AccessLogFilter.doFilter(AccessLogFilter.java:73)
      1 frame
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    18. Sitemesh
      PageFilter.doFilter
      1. com.opensymphony.module.sitemesh.filter.PageFilter.parsePage(PageFilter.java:119)
      2. com.opensymphony.module.sitemesh.filter.PageFilter.doFilter(PageFilter.java:55)
      2 frames
    19. com.atlassian.jira
      SitemeshExcludePathFilter.doFilter
      1. com.atlassian.jira.web.filters.SitemeshExcludePathFilter.doFilter(SitemeshExcludePathFilter.java:38)
      1 frame
    20. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    21. com.atlassian.seraph
      SecurityFilter.doFilter
      1. com.atlassian.seraph.filter.SecurityFilter.doFilter(SecurityFilter.java:192)
      1 frame
    22. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    23. com.atlassian.seraph
      TrustedApplicationsFilter.doFilter
      1. com.atlassian.seraph.filter.TrustedApplicationsFilter.doFilter(TrustedApplicationsFilter.java:120)
      1 frame
    24. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    25. com.atlassian.seraph
      BaseLoginFilter.doFilter
      1. com.atlassian.seraph.filter.BaseLoginFilter.doFilter(BaseLoginFilter.java:125)
      1 frame
    26. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
      2 frames
    27. com.atlassian.util
      ProfilingFilter.doFilter
      1. com.atlassian.util.profiling.filters.ProfilingFilter.doFilter(ProfilingFilter.java:132)
      1 frame