Hello, Which operating system are you running James on?
-- Best regards, Benoit TELLIER General manager of Linagora VIETNAM. Product owner for Team-Mail product. Chairman of the Apache James project. Mail: btell...@linagora.com Tel: (0033) 6 77 26 04 58 (WhatsApp, Signal) Le juil. 19, 2023 11:25 AM, de Mihai Zamfira Hi, on apache james JPA with external database which runs on Java 11 version we face the below error. This problem appears after the server runs for a period of time and leads to desynchronization of lucene indexes. I'm not a Java developer, but from my searches I understand that there is a problem encountered when using NIOFSDirectory to interact with Lucenes in Java 11 Any advice is helpful, thanks 6:58:04.607 [ERROR] o.a.j.e.d.InVmEventDelivery - Error while processing listener java.nio.channels.ClosedChannelException: null at java.base/sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:150) at java.base/sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:790) at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:162) ... 67 common frames omitted Wrapped by: java.io.IOException: null: NIOFSIndexInput(path="/opt/james38_jpa/_251y.cfs") at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:180) at org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:156) at org.apache.lucene.index.CompoundFileReader$CSIndexInput.readInternal(CompoundFileReader.java:275) at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:270) at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:40) at org.apache.lucene.store.DataInput.readVInt(DataInput.java:107) at org.apache.lucene.store.BufferedIndexInput.readVInt(BufferedIndexInput.java:217) at org.apache.lucene.index.TermBuffer.read(TermBuffer.java:64) at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:133) at org.apache.lucene.index.SegmentTermEnum.scanTo(SegmentTermEnum.java:174) at org.apache.lucene.index.TermInfosReader.get(TermInfosReader.java:202) at org.apache.lucene.index.TermInfosReader.terms(TermInfosReader.java:304) at org.apache.lucene.index.SegmentReader.terms(SegmentReader.java:473) at org.apache.lucene.search.NumericRangeQuery$NumericRangeTermEnum.next(NumericRangeQuery.java:566) at org.apache.lucene.search.NumericRangeQuery$NumericRangeTermEnum.(NumericRangeQuery.java:508) at org.apache.lucene.search.NumericRangeQuery.getEnum(NumericRangeQuery.java:313) at org.apache.lucene.search.MultiTermQuery$RewriteMethod.getTermsEnum(MultiTermQuery.java:74) at org.apache.lucene.search.TermCollectingRewrite.collectTerms(TermCollectingRewrite.java:34) at org.apache.lucene.search.ConstantScoreAutoRewrite.rewrite(ConstantScoreAutoRewrite.java:87) at org.apache.lucene.search.MultiTermQuery.rewrite(MultiTermQuery.java:312) at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:378) at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:592) at org.apache.lucene.search.Searcher.createNormalizedWeight(Searcher.java:167) at org.apache.lucene.search.IndexSearcher.createNormalizedWeight(IndexSearcher.java:664) at org.apache.lucene.search.QueryWrapperFilter.getDocIdSet(QueryWrapperFilter.java:47) at org.apache.lucene.index.BufferedDeletesStream.applyQueryDeletes(BufferedDeletesStream.java:379) at org.apache.lucene.index.BufferedDeletesStream.applyDeletes(BufferedDeletesStream.java:249) at org.apache.lucene.index.IndexWriter.doFlush(IndexWriter.java:3615) at org.apache.lucene.index.IndexWriter.flush(IndexWriter.java:3552) at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:450) at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:399) at org.apache.lucene.index.IndexReader.open(IndexReader.java:296) at org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.update(LuceneMessageSearchIndex.java:1259) at org.apache.james.mailbox.lucene.search.LuceneMessageSearchIndex.lambda$update$4(LuceneMessageSearchIndex.java:1253) at com.github.fge.lambdas.runnable.RunnableChainer.doRun(RunnableChainer.java:18) at com.github.fge.lambdas.runnable.ThrowingRunnable.run(ThrowingRunnable.java:16) ... 32 common frames omitted Wrapped by: com.github.fge.lambdas.ThrownByLambdaException: java.io.IOException: null: NIOFSIndexInput(path="/opt/james38_jpa/_251y.cfs") at com.github.fge.lambdas.runnable.ThrowingRunnable.run(ThrowingRunnable.java:20) at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:73) at reactor.core.publisher.MonoRunnable.call(MonoRunnable.java:32) at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:252) at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) at reactor.core.publisher.MonoUsing.subscribe(MonoUsing.java:109) at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:53) at reactor.core.publisher.Mono.subscribe(Mono.java:4495) at reactor.core.publisher.MonoIgnorePublisher.subscribe(MonoIgnorePublisher.java:57) at reactor.core.publisher.FluxRetryWhen$RetryWhenMainSubscriber.resubscribe(FluxRetryWhen.java:216) at reactor.core.publisher.FluxRetryWhen$RetryWhenOtherSubscriber.onNext(FluxRetryWhen.java:269) at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) at reactor.core.publisher.FluxConcatMapNoPrefetch$FluxConcatMapNoPrefetchSubscriber.innerNext(FluxConcatMapNoPrefetch.java:258) at reactor.core.publisher.FluxConcatMap$ConcatMapInner.onNext(FluxConcatMap.java:863) at reactor.core.publisher.FluxContextWrite$ContextWriteSubscriber.onNext(FluxContextWrite.java:107) at reactor.core.publisher.MonoFlatMap$FlatMapMain.secondComplete(MonoFlatMap.java:245) at reactor.core.publisher.MonoFlatMap$FlatMapInner.onNext(MonoFlatMap.java:305) at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.complete(MonoIgnoreThen.java:292) at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onNext(MonoIgnoreThen.java:187) at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.subscribeNext(MonoIgnoreThen.java:236) at reactor.core.publisher.MonoIgnoreThen.subscribe(MonoIgnoreThen.java:51) at reactor.core.publisher.MonoFlatMap$FlatMapMain.onNext(MonoFlatMap.java:165) at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.complete(MonoIgnoreThen.java:292) at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onNext(MonoIgnoreThen.java:187) at reactor.core.publisher.MonoDelay$MonoDelayRunnable.propagateDelay(MonoDelay.java:271) at reactor.core.publisher.MonoDelay$MonoDelayRunnable.run(MonoDelay.java:286) at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68) at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) at java.base/java.lang.Thread.run(Thread.java:834) --------------------------------------------------------------------- To unsubscribe, e-mail: server-user-unsubscr...@james.apache.org For additional commands, e-mail: server-user-h...@james.apache.org