[英]What is the cause of Solr to hanging creating a core on a Linux OS?
Can anyone help identify the cause of Solr hanging when it tries to create a core. 在尝试创建核心时,任何人都可以帮助确定Solr挂起的原因。 This happens on a Red Hat Linux machine when Solr tries to create the core on startup and when it is specifically requested to create a core.
当Solr尝试在启动时创建内核并且明确要求创建内核时,这会在Red Hat Linux机器上发生。 It does create the data directory for the Lucene index and 'write.lock' file but then the process halts.
它确实为Lucene索引和'write.lock'文件创建了数据目录,但随后该过程停止了。 Solr is still responsive but the core is stuck in the loading phase.
Solr仍然响应,但核心停留在加载阶段。
I've picked this out from the thread dump: 我是从线程转储中挑选出来的:
coreLoadExecutor-6-thread-1 (25)
sun.nio.fs.UnixNativeDispatcher.stat0(Native Method)
sun.nio.fs.UnixNativeDispatcher.stat(UnixNativeDispatcher.java:286)
sun.nio.fs.UnixFileAttributes.get(UnixFileAttributes.java:70)
sun.nio.fs.UnixFileStore.devFor(UnixFileStore.java:55)
sun.nio.fs.UnixFileStore.<init>(UnixFileStore.java:70)
sun.nio.fs.LinuxFileStore.<init>(LinuxFileStore.java:48)
sun.nio.fs.LinuxFileSystem.getFileStore(LinuxFileSystem.java:112)
sun.nio.fs.UnixFileSystem$FileStoreIterator.readNext(UnixFileSystem.java:213)
sun.nio.fs.UnixFileSystem$FileStoreIterator.hasNext(UnixFileSystem.java:224)
org.apache.lucene.util.IOUtils.getFileStore(IOUtils.java:543)
org.apache.lucene.util.IOUtils.spinsLinux(IOUtils.java:487)
org.apache.lucene.util.IOUtils.spins(IOUtils.java:476)
org.apache.lucene.util.IOUtils.spins(IOUtils.java:451)
org.apache.lucene.index.ConcurrentMergeScheduler.initDynamicDefaults(ConcurrentMergeScheduler.java:376)
org.apache.lucene.index.ConcurrentMergeScheduler.merge(ConcurrentMergeScheduler.java:464)
org.apache.lucene.index.IndexWriter.waitForMerges(IndexWriter.java:2425)
org.apache.lucene.index.IndexWriter.shutdown(IndexWriter.java:1118)
org.apache.lucene.index.IndexWriter.close(IndexWriter.java:1162)
org.apache.solr.update.SolrIndexWriter.close(SolrIndexWriter.java:142)
org.apache.solr.core.SolrCore.initIndex(SolrCore.java:588)
org.apache.solr.core.SolrCore.<init>(SolrCore.java:762)
org.apache.solr.core.SolrCore.<init>(SolrCore.java:688)
org.apache.solr.core.CoreContainer.create(CoreContainer.java:838)
org.apache.solr.core.CoreContainer.lambda$load$0(CoreContainer.java:494)
org.apache.solr.core.CoreContainer$$Lambda$25/1297978429.call(Unknown Source)
java.util.concurrent.FutureTask.run(FutureTask.java:266)
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:229)
org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$$Lambda$26/348984985.run(Unknown Source)
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
java.lang.Thread.run(Thread.java:745)
This is the longest running thread along with, rather ominously, 'DestroyJavaVM (28)' 这是运行时间最长的线程,同时还带有'DestroyJavaVM(28)'
I have checked the permissions and tried various indexing configurations in the solrconfig. 我检查了权限,并尝试了solrconfig中的各种索引配置。 The same install / configuration of Solr works fine on other machines.
Solr的相同安装/配置在其他计算机上也可以正常工作。 I think this is most likely file system or OS related.
我认为这很可能与文件系统或OS有关。
So this did turn out to be a bad disk of some sort. 因此,事实证明这确实是一张坏磁盘。 I still haven't got to the bottom of what was wrong with it.
我仍然不了解问题的根源。 On the face of it there was space on the drive and no obvious problems with it.
从表面上看,驱动器上有空间,并且没有明显的问题。 Changing the Solr home to another mounted drive fixed the problem.
将Solr更换为另一个已安装的驱动器可解决此问题。 I've never seen this behavior before, the stat call never came back even after being left for several days.
我以前从未见过这种行为,即使被搁置了几天,stat调用也再也不会回来。
So if you have this problem and any alternative drives are available - it can't hurt to give them a try. 因此,如果您有此问题,并且有其他可用的驱动器可用,那么尝试一下它们不会有什么坏处。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.