13

我在 Ubuntu 13.10 中使用 tomcat 7 安装 solr 4.5.1。

我总是遇到错误:

org.apache.solr.core.CoreContainer; Unable to create core: collection1
org.apache.solr.common.SolrException: Cannot create directory: /opt/solr/example/solr/collection1/data

当我为 Solr创建datadata/index文件夹时,它给了我错误:collection1

org.apache.solr.common.SolrException: Lock obtain timed out: NativeFSLock@/opt/solr/example/solr/collection1/data/index/write.lock: java.io.FileNotFoundException: /opt/solr/example/solr/collection1/data/index/write.lock (Permission denied)

我在同一个字典中尝试过码头模式,效果很好。

以下是solrconfig.xml

<?xml version="1.0" encoding="UTF-8" ?>
<config>
<luceneMatchVersion>4.5</luceneMatchVersion>
<lib dir="../../../contrib/extraction/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-cell-\d.*\.jar" />
<lib dir="../../../contrib/clustering/lib/" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-clustering-\d.*\.jar" />
<lib dir="../../../contrib/langid/lib/" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-langid-\d.*\.jar" />
<lib dir="../../../contrib/velocity/lib" regex=".*\.jar" />
<lib dir="../../../dist/" regex="solr-velocity-\d.*\.jar" />
<dataDir>${solr.data.dir:}</dataDir>
...

solrconfig.xml 文件与 solr 创建的文件相同。

以下是中的消息solr.log

INFO  - 2013-11-06 11:12:59.479; org.apache.solr.servlet.SolrDispatchFilter;      SolrDispatchFilter.init()
INFO  - 2013-11-06 11:12:59.506; org.apache.solr.core.SolrResourceLoader; Using JNDI solr.home: /opt/solr/example/solr
INFO  - 2013-11-06 11:12:59.508; org.apache.solr.core.SolrResourceLoader; new SolrResourceLoader for directory: '/opt/solr/example/solr/'
INFO  - 2013-11-06 11:12:59.791; org.apache.solr.core.ConfigSolr; Loading container configuration from /opt/solr/example/solr/solr.xml
INFO  - 2013-11-06 11:13:00.180; org.apache.solr.core.ConfigSolrXml; Config-defined core root directory: 
INFO  - 2013-11-06 11:13:00.200; org.apache.solr.core.CoreContainer; New CoreContainer 2105334598
INFO  - 2013-11-06 11:13:00.200; org.apache.solr.core.CoreContainer; Loading cores into CoreContainer [instanceDir=/opt/solr/example/solr/]
INFO  - 2013-11-06 11:13:00.263; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting socketTimeout to: 0
INFO  - 2013-11-06 11:13:00.264; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting urlScheme to: http://
INFO  - 2013-11-06 11:13:00.264; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting connTimeout to: 0
INFO  - 2013-11-06 11:13:00.264; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting maxConnectionsPerHost to: 20
INFO  - 2013-11-06 11:13:00.264; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting corePoolSize to: 0
INFO  - 2013-11-06 11:13:00.265; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting maximumPoolSize to: 2147483647
INFO  - 2013-11-06 11:13:00.265; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting maxThreadIdleTime to: 5
INFO  - 2013-11-06 11:13:00.265; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting sizeOfQueue to: -1
INFO  - 2013-11-06 11:13:00.265; org.apache.solr.handler.component.HttpShardHandlerFactory; Setting fairnessPolicy to: false
INFO  - 2013-11-06 11:13:00.283; org.apache.solr.client.solrj.impl.HttpClientUtil; Creating new http client, config:maxConnectionsPerHost=20&maxConnections=10000&socketTimeout=0&connTimeout=0&retry=false
INFO  - 2013-11-06 11:13:00.744; org.apache.solr.logging.LogWatcher; SLF4J impl is org.slf4j.impl.Log4jLoggerFactory
INFO  - 2013-11-06 11:13:00.745; org.apache.solr.logging.LogWatcher; Registering Log Listener [Log4j (org.slf4j.impl.Log4jLoggerFactory)]
INFO  - 2013-11-06 11:13:00.839; org.apache.solr.core.CorePropertiesLocator; Looking for core definitions underneath /opt/solr/example/solr
INFO  - 2013-11-06 11:13:00.920; org.apache.solr.core.CorePropertiesLocator; Found core collection1 in /opt/solr/example/solr/collection1/
INFO  - 2013-11-06 11:13:00.921; org.apache.solr.core.CorePropertiesLocator; Found 1 core definitions
INFO  - 2013-11-06 11:13:00.929; org.apache.solr.core.CoreContainer; Creating SolrCore 'collection1' using instanceDir: /opt/solr/example/solr/collection1
INFO  - 2013-11-06 11:13:00.941; org.apache.solr.core.SolrResourceLoader; new SolrResourceLoader for directory: '/opt/solr/example/solr/collection1/'
INFO  - 2013-11-06 11:13:01.082; org.apache.solr.core.SolrConfig; Adding specified lib dirs to ClassLoader
INFO  - 2013-11-06 11:13:01.087; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/fontbox-1.8.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.087; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/poi-scratchpad-3.9.jar' to classloader
INFO  - 2013-11-06 11:13:01.087; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/netcdf-4.2-min.jar' to classloader
INFO  - 2013-11-06 11:13:01.087; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/xz-1.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.087; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/metadata-extractor-2.6.2.jar' to classloader
INFO  - 2013-11-06 11:13:01.088; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/bcprov-jdk15-1.45.jar' to classloader
INFO  - 2013-11-06 11:13:01.088; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/jempbox-1.8.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.088; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/poi-ooxml-3.9.jar' to classloader
INFO  - 2013-11-06 11:13:01.088; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/tika-parsers-1.4.jar' to classloader
INFO  - 2013-11-06 11:13:01.089; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/commons-compress-1.4.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.089; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/isoparser-1.0-RC-1.jar' to classloader
INFO  - 2013-11-06 11:13:01.089; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/apache-mime4j-core-0.7.2.jar' to classloader
INFO  - 2013-11-06 11:13:01.089; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/juniversalchardet-1.0.3.jar' to classloader
INFO  - 2013-11-06 11:13:01.090; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/icu4j-49.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.090; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/dom4j-1.6.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.090; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/tagsoup-1.2.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.090; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/pdfbox-1.8.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.090; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/xmlbeans-2.3.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.091; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/poi-3.9.jar' to classloader
INFO  - 2013-11-06 11:13:01.091; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/tika-core-1.4.jar' to classloader
INFO  - 2013-11-06 11:13:01.091; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/boilerpipe-1.1.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.091; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/poi-ooxml-schemas-3.9.jar' to classloader
INFO  - 2013-11-06 11:13:01.091; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/xercesImpl-2.9.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.091; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/vorbis-java-core-0.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.092; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/vorbis-java-tika-0.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.092; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/rome-0.9.jar' to classloader
INFO  - 2013-11-06 11:13:01.092; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/jdom-1.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.092; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/bcmail-jdk15-1.45.jar' to classloader
INFO  - 2013-11-06 11:13:01.093; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/extraction/lib/apache-mime4j-dom-0.7.2.jar' to classloader
INFO  - 2013-11-06 11:13:01.125; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/dist/solr-cell-4.5.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.129; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/clustering/lib/jackson-mapper-asl-1.7.4.jar' to classloader
INFO  - 2013-11-06 11:13:01.129; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/clustering/lib/carrot2-mini-3.8.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.129; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/clustering/lib/jackson-core-asl-1.7.4.jar' to classloader
INFO  - 2013-11-06 11:13:01.130; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/clustering/lib/hppc-0.5.2.jar' to classloader
INFO  - 2013-11-06 11:13:01.130; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/clustering/lib/mahout-collections-1.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.130; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/clustering/lib/mahout-math-0.6.jar' to classloader
INFO  - 2013-11-06 11:13:01.130; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/clustering/lib/attributes-binder-1.2.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.130; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/clustering/lib/simple-xml-2.7.jar' to classloader
INFO  - 2013-11-06 11:13:01.131; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/dist/solr-clustering-4.5.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.133; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/langid/lib/jsonic-1.2.7.jar' to classloader
INFO  - 2013-11-06 11:13:01.133; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/langid/lib/langdetect-1.1-20120112.jar' to classloader
INFO  - 2013-11-06 11:13:01.134; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/dist/solr-langid-4.5.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.135; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/velocity/lib/commons-beanutils-1.7.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.136; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/velocity/lib/velocity-tools-2.0.jar' to classloader
INFO  - 2013-11-06 11:13:01.137; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/velocity/lib/commons-collections-3.2.1.jar' to classloader
INFO  - 2013-11-06 11:13:01.137; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/contrib/velocity/lib/velocity-1.7.jar' to classloader
INFO  - 2013-11-06 11:13:01.137; org.apache.solr.core.SolrResourceLoader; Adding 'file:/opt/solr/dist/solr-velocity-4.5.1.jar' to classloader
INFO  - 2013-11-06 11:13:02.100; org.apache.solr.update.SolrIndexConfig; IndexWriter infoStream solr logging is enabled
INFO  - 2013-11-06 11:13:02.107; org.apache.solr.core.SolrConfig; Using Lucene MatchVersion: LUCENE_45
INFO  - 2013-11-06 11:13:02.421; org.apache.solr.core.SolrConfig; Loaded SolrConfig: solrconfig.xml
INFO  - 2013-11-06 11:13:02.429; org.apache.solr.schema.IndexSchema; Reading Solr Schema from schema.xml
INFO  - 2013-11-06 11:13:02.648; org.apache.solr.schema.IndexSchema; [collection1] Schema name=example
INFO  - 2013-11-06 11:13:03.770; org.apache.solr.schema.IndexSchema; unique key field: id
INFO  - 2013-11-06 11:13:03.977; org.apache.solr.schema.FileExchangeRateProvider; Reloading exchange rates from file currency.xml
INFO  - 2013-11-06 11:13:03.996; org.apache.solr.schema.FileExchangeRateProvider; Reloading exchange rates from file currency.xml
INFO  - 2013-11-06 11:13:04.302; org.apache.solr.core.SolrCore; solr.NRTCachingDirectoryFactory
INFO  - 2013-11-06 11:13:04.313; org.apache.solr.core.SolrCore; [collection1] Opening new SolrCore at /opt/solr/example/solr/collection1/, dataDir=/opt/solr/example/solr/collection1/data/
INFO  - 2013-11-06 11:13:04.314; org.apache.solr.core.JmxMonitoredMap; JMX monitoring is enabled. Adding Solr mbeans to JMX Server: com.sun.jmx.mbeanserver.JmxMBeanServer@3527c4a
INFO  - 2013-11-06 11:13:04.350; org.apache.solr.core.SolrCore; [collection1] Added SolrEventListener for newSearcher: org.apache.solr.core.QuerySenderListener{queries=[]}
INFO  - 2013-11-06 11:13:04.351; org.apache.solr.core.SolrCore; [collection1] Added SolrEventListener for firstSearcher: org.apache.solr.core.QuerySenderListener{queries=[{q=static firstSearcher warming in solrconfig.xml}]}
INFO  - 2013-11-06 11:13:04.392; org.apache.solr.core.CachingDirectoryFactory; return new directory for /opt/solr/example/solr/collection1/data
INFO  - 2013-11-06 11:13:04.392; org.apache.solr.core.SolrCore; New index directory detected: old=null new=/opt/solr/example/solr/collection1/data/index/
WARN  - 2013-11-06 11:13:04.393; org.apache.solr.core.SolrCore; [collection1] Solr index directory '/opt/solr/example/solr/collection1/data/index' doesn't exist. Creating new index...
INFO  - 2013-11-06 11:13:04.407; org.apache.solr.core.CachingDirectoryFactory; return new directory for /opt/solr/example/solr/collection1/data/index
INFO  - 2013-11-06 11:13:04.435; org.apache.solr.core.CachingDirectoryFactory; looking to close /opt/solr/example/solr/collection1/data/index [CachedDir<<refCount=0;path=/opt/solr/example/solr/collection1/data/index;done=true>>]
INFO  - 2013-11-06 11:13:04.441; org.apache.solr.core.CachingDirectoryFactory; Closing directory: /opt/solr/example/solr/collection1/data/index
INFO  - 2013-11-06 11:13:04.441; org.apache.solr.core.SolrCore; [collection1]  CLOSING SolrCore org.apache.solr.core.SolrCore@1cb4ab3e
INFO  - 2013-11-06 11:13:04.442; org.apache.solr.update.SolrCoreState; Closing SolrCoreState
INFO  - 2013-11-06 11:13:04.442; org.apache.solr.update.DefaultSolrCoreState; SolrCoreState ref count has reached 0 - closing IndexWriter
INFO  - 2013-11-06 11:13:04.443; org.apache.solr.core.SolrCore; [collection1] Closing main searcher on request.
INFO  - 2013-11-06 11:13:04.443; org.apache.solr.core.CachingDirectoryFactory; Closing NRTCachingDirectoryFactory - 1 directories currently being tracked
INFO  - 2013-11-06 11:13:04.443; org.apache.solr.core.CachingDirectoryFactory; looking to close /opt/solr/example/solr/collection1/data [CachedDir<<refCount=0;path=/opt/solr/example/solr/collection1/data;done=false>>]
INFO  - 2013-11-06 11:13:04.444; org.apache.solr.core.CachingDirectoryFactory; Closing directory: /opt/solr/example/solr/collection1/data
ERROR - 2013-11-06 11:13:04.445; org.apache.solr.core.CoreContainer; Unable to create core: collection1
org.apache.solr.common.SolrException: Cannot create       directory: /opt/solr/example/solr/collection1/data/index
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:834)
 Caused by: java.io.IOException: Cannot create  directory: /opt/solr/example/solr/collection1/data/index
at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:171)
at org.apache.lucene.store.Lock.obtain(Lock.java:72)
at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:695)
at org.apache.solr.update.SolrIndexWriter.<init>(SolrIndexWriter.java:77)
at org.apache.solr.update.SolrIndexWriter.create(SolrIndexWriter.java:64)
at org.apache.solr.core.SolrCore.initIndex(SolrCore.java:506)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:755)
... 11 more
  ERROR - 2013-11-06 11:13:04.448; org.apache.solr.common.SolrException; null:org.apache.solr.common.SolrException: Unable to create core: collection1
at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:934)
Caused by: org.apache.solr.common.SolrException: Cannot create directory: /opt/solr/example/solr/collection1/data/index
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:834)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:625)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:522)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:557)
... 8 more
Caused by: java.io.IOException: Cannot create directory: /opt/solr/example/solr/collection1/data/index
at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:171)
... 11 more

 INFO  - 2013-11-06 11:13:04.451; org.apache.solr.servlet.SolrDispatchFilter; user.dir=/var/lib/tomcat7
INFO  - 2013-11-06 11:13:04.451; org.apache.solr.servlet.SolrDispatchFilter; SolrDispatchFilter.init() done
ERROR - 2013-11-06 11:13:05.373; org.apache.solr.update.SolrIndexWriter; SolrIndexWriter was not closed prior to finalize(), indicates a bug -- POSSIBLE RESOURCE LEAK!!!
ERROR - 2013-11-06 11:13:05.400; org.apache.solr.update.SolrIndexWriter; Error closing IndexWriter, trying rollback

有人有想法吗?谢谢

我发现问题是因为文件夹的特权。在我将所有者更改为$SOLR_HOME并且它的子目录tomcat7之后,它起作用了。

4

5 回答 5

12

对于运行 Solr 的服务器,该文件夹必须是可写的。

所以检查/opt/solr/example/solr/collection1/

文件夹权限并启用写入,例如:

sudo chmod a+w /opt/solr/example/solr/collection1/ -R

或更改文件夹所有者:

sudo chown tomcat7. /opt/solr/example/solr/collection1/ -R
于 2013-12-03T12:11:06.900 回答
5

引用 SOLR-3753 问题:

“在没有 solr.xml 文件的情况下,当前 4.0 的行为是使用 CoreContainer.java 中声明的默认值。这需要记录在案;可能在 solr.xml 和/或 CoreAdmin 页面上。(参见 CoreAdmin 的第 94 行。 java,其中声明了默认名称“collection1”。如果没有此文档,用户可能会对“collection1”核心名称的来源感到困惑。(我就是其中之一)。

因此,一个简单的解决方案是在 $SOLR_HOME/examples/solr/ 下创建一个 solr.xml 文件

参考 SOLR-3753

于 2014-05-14T08:31:09.203 回答
2

检查权限,确保solr主目录和子目录对tomcat7可读可写。然后在您在上面发布的 solrconfig.xml 文件中,查看以下行: <dataDir>${solr.data.dir:}</dataDir>

替换${solr.data.dir:}为您还必须创建并确保读/写权限的数据目录的路径,如下所示:

<dataDir>${solr.data.dir:/home/solr/solr-4.6.0/example/solr/collection1/data}</dataDir>

然后保存,并在 Tomcat 管理器中重新启动 solr 应用程序,或者只是:#sudo service tomcat7 restart`

这些是我使用 Tomcat 7 和 Solr 4.6 设置的命令和路径,因此您的可能会有所不同。我创建了一个 solr 用户并将他添加到 tomcat 7 组,但是还有许多其他方法可以使权限工作并维护安全性。我还必须创建一个具有 tomcat7 所有权的solr.xml文件,该文件具有以下几行:/etc/tomcat7/Catalina/localhost

<?xml version="1.0" encoding="utf-8"?>
<Context docBase="/home/solr/solr-4.6.0/dist/solr-4.6.0.war" debug="0" crossContext="true">
<Environment name="solr/home" type="java.lang.String" value="/home/solr/solr-4.6.0/example/solr" override="true"/>
</Context>

同样,在 Tomcat 管理器 GUI 中停止并启动 solr。希望这可以帮助!

于 2013-12-09T06:11:53.650 回答
0

I used SOLR 4.7.1 deployed with spring tc server and encountered the same error. "collection1" is hard coded somewhere and it looks up for this directory and fails if it doesn't find one. To make it work I copied the "collection1" from examples directory to my solr-home and was able to bring the server up. Later I unloaded collection1, since I did not need that.

于 2014-05-13T20:28:29.757 回答
0

复制文件夹examples/collections的所有内容并将其移动到您的tomcat/solr。然后将文件 solr.xml 复制到您的 solr 文件夹中。重启你的tomcat7。

访问您的 solr ui,一切都应该没问题。对于在 tomcat7 下运行的 Solr 版本 4.x。

于 2016-10-04T23:11:14.847 回答