概述
1.在使用时查看到报以下错误信息:
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.springframework.data.solr.UncategorizedSolrException: Error from server at http://192.168.1.95:8088/solr/product: Expected mime type application/octet-stream but got text/html. <!DOCTYPE html><html><head><title>Apache Tomcat/8.0.30 - Error report</title><style type="text/css">H1 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:22px;} H2 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:16px;} H3 {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;font-size:14px;} BODY {font-family:Tahoma,Arial,sans-serif;color:black;background-color:white;} B {font-family:Tahoma,Arial,sans-serif;color:white;background-color:#525D76;} P {font-family:Tahoma,Arial,sans-serif;background:white;color:black;font-size:12px;}A {color : black;}A.name {color : black;}.line {height: 1px; background-color: #525D76; border: none;}</style> </head><body><h1>HTTP Status 500 - {metadata={error-class=org.apache.solr.common.SolrException,root-error-class=java.nio.file.FileSystemException},msg=SolrCore 'product' is not available due to init failure: Error opening new searcher,trace=org.apache.solr.common.SolrException: SolrCore 'product' is not available due to init failure: Error opening new searcher at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1071) at org.apache.solr.servlet.HttpSolrCall.init(HttpSolrCall.java:252) at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:414) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:257) at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:208) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:212) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:521) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1096) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:674) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1500) at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1456) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) Caused by: org.apache.solr.common.SolrException: Error opening new searcher at org.apache.solr.core.SolrCore.<init>(SolrCore.java:820) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:658) at org.apache.solr.core.CoreContainer.create(CoreContainer.java:820) at org.apache.solr.core.CoreContainer.access$000(CoreContainer.java:90) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:473) at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:464) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor$1.run(ExecutorUtil.java:231) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ... 1 more Caused by: org.apache.solr.common.SolrException: Error opening new searcher at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1696) at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1807) at org.apache.solr.core.SolrCore.initSearcher(SolrCore.java:914) at org.apache.solr.core.SolrCore.<init>(SolrCore.java:793) ... 10 more Caused by: java.nio.file.FileSystemException: /usr/local/solr/solr_home/product/data/index/write.lock: Too many open files at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) at sun.nio.fs.UnixFileSystemProvider.newFileChannel(UnixFileSystemProvider.java:177) at java.nio.channels.FileChannel.open(FileChannel.java:287) at java.nio.channels.FileChannel.open(FileChannel.java:335) at org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:113) at org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:41) at org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:45) at org.apache.lucene.store.FilterDirectory.obtainLock(FilterDirectory.java:94) at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:776) at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:78) at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:65) at org.apache.solr.update.DefaultSolrCoreState.createMainIndexWriter(DefaultSolrCoreState.java:237) at org.apache.solr.update.DefaultSolrCoreState.getIndexWriter(DefaultSolrCoreState.java:111) at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1657) ... 13 more
2.管理界面报错信息
3.点进Core Admin界面
提示 Error loading solr config from /usr/local/solr/solr_home/new_core/conf/solrconfig.xml
只显示让添加 并没有显示已存在的,默认添加的表单上name,instanceDir 填写的是new_core这里要根据你自己的目录名称来填写例如我的是/usr/local/solr/solr_home/product/conf/solrconfig.xml 我的名字为product 这里两个参数填写product
确认添加
添加完成之后它提示已经存在,Core with name 'product' already exists. 是因为之前肯定已创建过
然后再次点击一下 Core Admin
此时页面正常显示 如此操作一下 才可以 具体的原因还没确定 后续再次遇到 查出原因再来补充。
===============================================
补充当时为什么遇到此问题
solr打印日志级别设置过低 导致日志文件太大 Physical Memory 占用高达98% 修改了日志级别 切割日志后 遇到此问题
最后
以上就是神勇水壶为你收集整理的Solr报错Error opening new searcher && write.lock: Too many open files1.在使用时查看到报以下错误信息:2.管理界面报错信息3.点进Core Admin界面的全部内容,希望文章能够帮你解决Solr报错Error opening new searcher && write.lock: Too many open files1.在使用时查看到报以下错误信息:2.管理界面报错信息3.点进Core Admin界面所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复