我试图在Solr Cloud 7.7.1上创建一个集合,但是遇到问题。
采取的步骤:
尝试通过URL
创建集合时我得到以下输出。
{
"responseHeader":{
"status":0,
"QTime":2317},
"failure":{
"192.168.56.1:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at http://192.168.56.1:8983/solr: Expected mime type application/octet-stream but got text/html. <html>\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\"/>\n<title>Error 500 Server Error</title>\n</head>\n<body><h2>HTTP ERROR 500</h2>\n<p>Problem accessing /solr/admin/cores. Reason:\n<pre> Server Error</pre></p><h3>Caused by:</h3><pre>java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/TokenizerFactory\r\n\tat java.lang.ClassLoader.defineClass1(Native Method)\r\n\tat java.lang.ClassLoader.defineClass(ClassLoader.java:763)\r\n\tat java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)\r\n\tat java.net.URLClassLoader.defineClass(URLClassLoader.java:468)\r\n\tat java.net.URLClassLoader.access$100(URLClassLoader.java:74)\r\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:369)\r\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:363)\r\n\tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:362)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n\tat org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:556)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:411)\r\n\tat java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:411)\r\n\tat java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n\tat java.lang.Class.forName0(Native Method)\r\n\tat java.lang.Class.forName(Class.java:348)\r\n\tat org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:541)\r\n\tat org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:626)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader$2.create(FieldTypePluginLoader.java:356)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader$2.create(FieldTypePluginLoader.java:349)\r\n\tat org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:376)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:95)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:53)\r\n\tat org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)\r\n\tat org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:481)\r\n\tat org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:180)\r\n\tat org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:56)\r\n\tat org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:75)\r\n\tat org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:119)\r\n\tat org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:92)\r\n\tat org.apache.solr.core.CoreContainer.getConfigSet(CoreContainer.java:1227)\r\n\tat org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1174)\r\n\tat org.apache.solr.core.CoreContainer.create(CoreContainer.java:1088)\r\n\tat org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$0(CoreAdminOperation.java:92)\r\n\tat org.apache.solr.handler.admin.CoreAdminOperation.execute(CoreAdminOperation.java:360)\r\n\tat org.apache.solr.handler.admin.CoreAdminHandler$CallInfo.call(CoreAdminHandler.java:395)\r\n\tat org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:180)\r\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)\r\n\tat org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:735)\r\n\tat org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:716)\r\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:496)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:395)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:341)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)\r\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)\r\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)\r\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:502)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)\r\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)\r\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\r\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)\r\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)\r\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)\r\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)\r\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)\r\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\nCaused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.util.TokenizerFactory\r\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:382)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n\t... 81 more\r\n</pre>\n<h3>Caused by:</h3><pre>java.lang.ClassNotFoundException: org.apache.lucene.analysis.util.TokenizerFactory\r\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:382)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n\tat java.lang.ClassLoader.defineClass1(Native Method)\r\n\tat java.lang.ClassLoader.defineClass(ClassLoader.java:763)\r\n\tat java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)\r\n\tat java.net.URLClassLoader.defineClass(URLClassLoader.java:468)\r\n\tat java.net.URLClassLoader.access$100(URLClassLoader.java:74)\r\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:369)\r\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:363)\r\n\tat java.security.AccessController.doPrivileged(Native Method)\r\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:362)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:424)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n\tat org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:556)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:411)\r\n\tat java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:411)\r\n\tat java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:817)\r\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:357)\r\n\tat java.lang.Class.forName0(Native Method)\r\n\tat java.lang.Class.forName(Class.java:348)\r\n\tat org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:541)\r\n\tat org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:626)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader$2.create(FieldTypePluginLoader.java:356)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader$2.create(FieldTypePluginLoader.java:349)\r\n\tat org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader.readAnalyzer(FieldTypePluginLoader.java:376)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:95)\r\n\tat org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:53)\r\n\tat org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)\r\n\tat org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:481)\r\n\tat org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:180)\r\n\tat org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:56)\r\n\tat org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:75)\r\n\tat org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:119)\r\n\tat org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:92)\r\n\tat org.apache.solr.core.CoreContainer.getConfigSet(CoreContainer.java:1227)\r\n\tat org.apache.solr.core.CoreContainer.createFromDescriptor(CoreContainer.java:1174)\r\n\tat org.apache.solr.core.CoreContainer.create(CoreContainer.java:1088)\r\n\tat org.apache.solr.handler.admin.CoreAdminOperation.lambda$static$0(CoreAdminOperation.java:92)\r\n\tat org.apache.solr.handler.admin.CoreAdminOperation.execute(CoreAdminOperation.java:360)\r\n\tat org.apache.solr.handler.admin.CoreAdminHandler$CallInfo.call(CoreAdminHandler.java:395)\r\n\tat org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:180)\r\n\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:199)\r\n\tat org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:735)\r\n\tat org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:716)\r\n\tat org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:496)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:395)\r\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:341)\r\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1602)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:540)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:146)\r\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:257)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1588)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1345)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)\r\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)\r\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1557)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)\r\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1247)\r\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)\r\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:220)\r\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:126)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n\tat org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\r\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)\r\n\tat org.eclipse.jetty.server.Server.handle(Server.java:502)\r\n\tat org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:364)\r\n\tat org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:260)\r\n\tat org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)\r\n\tat org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)\r\n\tat org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:118)\r\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:333)\r\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:310)\r\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:168)\r\n\tat org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:126)\r\n\tat org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:366)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:765)\r\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:683)\r\n\tat java.lang.Thread.run(Thread.java:748)\r\n</pre>\n\n</body>\n</html>\n"
}
}
不确定是什么原因。非常感谢您的帮助。
答案 0 :(得分:0)
报告的java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/TokenizerFactory
被视为运行时环境无法在类路径中找到TokenizerFactory
类。通常,TokenizerFactory.class
文件将位于lucene-analyzers-common-<verion>.jar
目录下的contrib//prometheus-exporter/lucene-libs/
中。
您可以确保这样的jar存在于上述目录下,并检查solrconfig.xml
是否包含lib标记以将目录/ jar添加到类路径。
例如
$ grep lucene-libs solrconfig.xml
<lib dir="${solr.install.dir:../../../..}/contrib/prometheus-exporter/lucene-libs" regex=".*\.jar" />
答案 1 :(得分:0)
该问题与我在计算机上安装的多个Solr有关,它试图从其他Solr安装中加载Jar。删除本地计算机上的所有其他Solr应用程序,现在可以正常运行。
感谢您的帮助。