本文主要是介绍启动项目solr服务器,突然发现打印java.io.EOFException,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
一、异常日志如下:
java.io.EOFException
at org.apache.solr.common.util.FastInputStream.readUnsignedByte(FastInputStream.java:72)
at org.apache.solr.common.util.FastInputStream.readInt(FastInputStream.java:230)
at org.apache.solr.update.TransactionLog$FSReverseReader.next(TransactionLog.java:850)
at org.apache.solr.update.UpdateLog$RecentUpdates.update(UpdateLog.java:1410)
at org.apache.solr.update.UpdateLog$RecentUpdates.<init>(UpdateLog.java:1340)
at org.apache.solr.update.UpdateLog.getRecentUpdates(UpdateLog.java:1513)
at org.apache.solr.update.UpdateLog.seedBucketsWithHighestVersion(UpdateLog.java:2025)
at org.apache.solr.update.UpdateLog.seedBucketsWithHighestVersion(UpdateLog.java:2053)
at org.apache.solr.core.SolrCore.seedVersionBuckets(SolrCore.java:1029)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:1011)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:844)
at org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1029)
at org.apache.solr.core.CoreContainer.lambda$load$13(CoreContainer.java:642)
at com.codahale.metrics.InstrumentedExecutorService$InstrumentedCallable.call(InstrumentedExecutorService.java:197)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:188)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
二、解决步骤
根据EOFException和异常日志,判定初始化索引文件造成的 - 应该是索引文件坏蛋了(之前重建索引为完成就终止服务或索引被部分删除等),
1. 直接删除索引文件(如将路径../solr-md/subject/data下的index和tlog文件都删除)
2. 重启solr服务,不再报错
3. 重建索引
这篇关于启动项目solr服务器,突然发现打印java.io.EOFException的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!