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のdata/index
にdata
および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
にサブディクショナリーになった後、それは機能しました。
このフォルダーは、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
SOLR-3753問題を引用:
「solr.xmlファイルがない場合、現在の4.0の動作はCoreContainer.Javaで宣言されたデフォルトを使用することです。これは文書化する必要があります。おそらくsolr.xmlおよび/またはCoreAdminページにあります。(CoreAdminの94行目を参照してください。デフォルト名「collection1」が宣言されているJava。このドキュメントがないと、ユーザーは「collection1」コア名がどこから来ているのか混乱する可能性があります(私はその1つです)。
したがって、簡単な解決策は、$ SOLR_HOME/examples/solr /の下にsolr.xmlファイルを作成することです。
リファレンス SOLR-375
許可を確認し、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グループに追加しましたが、権限を機能させてセキュリティを維持する方法は他にもたくさんあります。また、solr.xml
に/etc/Tomcat7/Catalina/localhost
ファイルを作成し、Tomcat7の所有権で次の行を作成する必要がありました。
<?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を停止および開始します。お役に立てれば!
フォルダーexamples/collectionsのすべてのコンテンツをコピーして、Tomcat/solrに移動します。次に、solr.xmlファイルをsolrフォルダーにコピーします。 Tomcat7を再起動します。
SolrのUIにアクセスすると、すべて問題ないはずです。 Tomcat7で実行されているSolr ver 4.xの場合。
Spring tcサーバーでデプロイされたSOLR 4.7.1を使用したところ、同じエラーが発生しました。 「collection1」はどこかにハードコードされており、このディレクトリを検索し、見つからない場合は失敗します。これを機能させるために、「collection1」をexamplesディレクトリーからsolr-homeにコピーし、サーバーを起動することができました。後でそれを必要としなかったので、後でcollection1をアンロードしました。