Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to load solrconfig.xml

I am using Apache Solr on my drupal website. Tomcat 6 is installed and I have replaced schema.xml, solr-config.xml and protwords.txt files with the new files which was present in module installation directory.

When I run localhost:8983, I get this error.

Log4j (org.slf4j.impl.Log4jLoggerFactory)

2528 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer  – Failed to load file /opt/solr-4.5.1/example/solr/collection1/conf/solrconfig.xml

2529 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer  – Unable to create core: egitraining-dev.esc.rl.ac.uk
org.apache.solr.common.SolrException: Could not load config file /opt/solr-4.5.1/example/solr/collection1/conf/solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:490)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:557)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:247)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:239)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:679)
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or 'solr/collection1/conf/conf/', cwd=/opt/solr-4.5.1/example
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:322)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:287)
        at org.apache.solr.core.Config.<init>(Config.java:116)
        at org.apache.solr.core.Config.<init>(Config.java:86)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:129)
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:487)
        ... 11 more

2531 [coreLoadExecutor-3-thread-1] ERROR org.apache.solr.core.CoreContainer  – null:org.apache.solr.common.SolrException: Unable to create core: egitraining-dev.esc.rl.ac.uk
        at org.apache.solr.core.CoreContainer.recordAndThrow(CoreContainer.java:934)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:566)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:247)
        at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:239)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
        at java.util.concurrent.FutureTask.run(FutureTask.java:166)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:679)
Caused by: org.apache.solr.common.SolrException: Could not load config file /opt/solr-4.5.1/example/solr/collection1/conf/solrconfig.xml
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:490)
        at org.apache.solr.core.CoreContainer.create(CoreContainer.java:557)
        ... 10 more
Caused by: java.io.IOException: Can't find resource 'solrconfig.xml' in classpath or 'solr/collection1/conf/conf/', cwd=/opt/solr-4.5.1/example
        at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:322)
        at org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:287)
        at org.apache.solr.core.Config.<init>(Config.java:116)
        at org.apache.solr.core.Config.<init>(Config.java:86)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:129)
        at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:487)
        ... 11 more


2533 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  – user.dir=/opt/solr-4.5.1/example

2533 [main] INFO  org.apache.solr.servlet.SolrDispatchFilter  – SolrDispatchFilter.init() done

2576 [main] INFO  org.eclipse.jetty.server.AbstractConnector  – Started [email protected]:8983

Can anyone help Please?

Thanks

like image 717
user2798227 Avatar asked Oct 29 '13 11:10

user2798227


People also ask

What is Solrconfig xml?

The solrconfig. xml file is the configuration file with the most parameters affecting Solr itself. While configuring Solr, you'll work with solrconfig. xml often, either directly or via the Config API to create "configuration overlays" ( configoverlay. json ) to override the values in solrconfig.

Where is Solr schema xml?

The Solr schema. xml (typically found in the solr/conf/ directory) is where you tell Solr what types of fields you plan to support, how those types will be analyzed, and what fields you are going to make available for import and queries. Solr will then base its Lucene underbelly on what you define.

Where is Solr config file?

The solrconfig. xml file is located in the conf/ directory for each collection. Several well-commented example files can be found in the server/solr/configsets/ directories demonstrating best practices for many different types of installations.

What is Solr configuration?

Solr has several configuration files that you will interact with during your implementation. Many of these files are in XML format, although APIs that interact with configuration settings tend to accept JSON for programmatic access as needed.


1 Answers

This might have something to do with the default Solr config files provided by the Search API Solr module. Try to remove the next couple of lines from solrconfig.xml:

<useCompoundFile>false</useCompoundFile>
<ramBufferSizeMB>32</ramBufferSizeMB>
<mergeFactor>10</mergeFactor>

Patch found at https://drupal.org/comment/7945999#comment-7945999.

like image 81
lmeurs Avatar answered Oct 17 '22 15:10

lmeurs