[ https://issues.apache.org/jira/browse/JAMES-3247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17139477#comment-17139477 ]
Gautier DI FOLCO commented on JAMES-3247: ----------------------------------------- This PR contributed to it: [https://github.com/linagora/james-project/pull/3453] > Do not throw in StoreMessageManager.appendMessage close > ------------------------------------------------------- > > Key: JAMES-3247 > URL: https://issues.apache.org/jira/browse/JAMES-3247 > Project: James Server > Issue Type: Improvement > Reporter: Gautier DI FOLCO > Priority: Trivial > > From time to time, StoreMessageManager.appendMessage throws when the closes > happen, when the temporary file disappears: > > {code:java} > org.apache.james.mailbox.exception.MailboxException: Unable to parse message > at > org.apache.james.mailbox.store.StoreMessageManager.appendMessage(StoreMessageManager.java:344) > at > org.apache.james.imap.processor.AppendProcessor.appendToMailbox(AppendProcessor.java:130) > at > org.apache.james.imap.processor.AppendProcessor.processRequest(AppendProcessor.java:75) > at > org.apache.james.imap.processor.AppendProcessor.processRequest(AppendProcessor.java:55) > at > org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:100) > at > org.apache.james.imap.processor.AbstractMailboxProcessor.doProcess(AbstractMailboxProcessor.java:77) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:58) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imap.processor.base.AbstractChainedProcessor.process(AbstractChainedProcessor.java:67) > at > org.apache.james.imapserver.netty.ImapChannelUpstreamHandler.messageReceived(ImapChannelUpstreamHandler.java:198) > at > org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) > at > org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) > at > org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) > at > org.jboss.netty.channel.Channels.fireMessageReceived(Channels.java:296) > at > org.jboss.netty.handler.codec.frame.FrameDecoder.unfoldAndFireMessageReceived(FrameDecoder.java:462) > at > org.jboss.netty.handler.codec.frame.FrameDecoder.callDecode(FrameDecoder.java:443) > at > org.jboss.netty.handler.codec.frame.FrameDecoder.messageReceived(FrameDecoder.java:303) > at > org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) > at > org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) > at > org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) > at > org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) > at > org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) > at > org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314) > at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown > Source) > at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown > Source) > at java.base/java.lang.Thread.run(Unknown Source) > Caused by: java.io.IOException: Stream Closed > at java.base/java.io.FileInputStream.readBytes(Native Method) > at java.base/java.io.FileInputStream.read(Unknown Source) > at > com.google.common.io.ByteStreams$LimitedInputStream.read(ByteStreams.java:723) > at > org.apache.james.imap.utils.EolInputStream.read(EolInputStream.java:52) > at > org.apache.commons.io.input.ProxyInputStream.read(ProxyInputStream.java:99) > at > org.apache.commons.io.input.TeeInputStream.read(TeeInputStream.java:129) > at java.base/java.io.BufferedInputStream.fill(Unknown Source) > at java.base/java.io.BufferedInputStream.read(Unknown Source) > at java.base/java.io.FilterInputStream.read(Unknown Source) > at java.base/java.io.PushbackInputStream.read(Unknown Source) > at > org.apache.james.util.io.BodyOffsetInputStream.read(BodyOffsetInputStream.java:45) > at java.base/java.io.InputStream.read(Unknown Source) > at > org.apache.james.util.io.BodyOffsetInputStream.read(BodyOffsetInputStream.java:73) > at > org.apache.james.mime4j.io.BufferedLineReaderInputStream.fillBuffer(BufferedLineReaderInputStream.java:111) > at > org.apache.james.mime4j.io.BufferedLineReaderInputStream.readLine(BufferedLineReaderInputStream.java:199) > at > org.apache.james.mime4j.io.LineReaderInputStreamAdaptor.readLine(LineReaderInputStreamAdaptor.java:78) > at > org.apache.james.mime4j.stream.MimeEntity.readRawField(MimeEntity.java:215) > at > org.apache.james.mime4j.stream.MimeEntity.nextField(MimeEntity.java:258) > at > org.apache.james.mime4j.stream.MimeEntity.advance(MimeEntity.java:296) > at > org.apache.james.mime4j.stream.MimeTokenStream.next(MimeTokenStream.java:374) > at > org.apache.james.mailbox.store.StoreMessageManager.readHeader(StoreMessageManager.java:382) > at > org.apache.james.mailbox.store.StoreMessageManager.appendMessage(StoreMessageManager.java:328) > ... 47 common frames omitted > Suppressed: java.io.FileNotFoundException: File does not exist: > /tmp/imap-literal12691606409098571807.tmp > at > org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2396) > at > org.apache.james.imapserver.netty.ImapRequestFrameDecoder$1.close(ImapRequestFrameDecoder.java:145) > at java.base/java.io.FilterInputStream.close(Unknown Source) > at java.base/java.io.FilterInputStream.close(Unknown Source) > at > org.apache.commons.io.input.ProxyInputStream.close(ProxyInputStream.java:146) > at > org.apache.commons.io.input.TeeInputStream.close(TeeInputStream.java:93) > at java.base/java.io.BufferedInputStream.close(Unknown Source) > at java.base/java.io.PushbackInputStream.close(Unknown Source) > at > org.apache.james.util.io.BodyOffsetInputStream.close(BodyOffsetInputStream.java:103) > at > org.apache.james.mailbox.store.StoreMessageManager.appendMessage(StoreMessageManager.java:320) > ... 47 common frames omitted > {code} > A simple warning line in logs would be enough. -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org For additional commands, e-mail: server-dev-h...@james.apache.org