problem
response
<response>
<lst name="responseHeader">
<int name="status">400</int>
<int name="QTime">17</int>
</lst>
<lst name="error">
<str name="msg">
Error CREATEing SolrCore 'new_core': Unable to create core: new_core Caused by: Can't find resource 'solrconfig.xml' in classpath or '/var/lib/tomcat7/solr/new_core/conf'
</str>
<int name="code">400</int>
</lst>
</response>
i have reffered link : https://wiki.apache.org/solr/CoreAdmin
solr.xml code
<solr persistent="false">
<cores adminPath="/admin/cores">
<core name="afeef" instanceDir="afeef" />
</cores>
</solr>
error:
SolrCore Initialization Failures
afeef: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load config file /var/lib/tomcat7/solr/afeef/solrconfig.xml
coreX: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load config file /var/lib/tomcat7/solr/path_to_instance_directory/config_file_name.xml
new_core: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load config file /var/lib/tomcat7/solr/new_core/solrconfig.xml
when i run this cmd
ps aux|grep java
tomcat7 23192 0.7 2.0 2579744 161852 ? Sl 16:22 0:11 /usr/lib/jvm/default-java/bin/java -Djava.util.logging.config.file=/var/lib/tomcat7/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -Djava.awt.headless=true -Xmx128m -XX:+UseConcMarkSweepGC -Djava.endorsed.dirs=/usr/share/tomcat7/endorsed -classpath /usr/share/tomcat7/bin/bootstrap.jar:/usr/share/tomcat7/bin/tomcat-juli.jar -Dcatalina.base=/var/lib/tomcat7 -Dcatalina.home=/usr/share/tomcat7 -Djava.io.tmpdir=/tmp/tomcat7-tomcat7-tmp org.apache.catalina.startup.Bootstrap start mohd 24047 0.0 0.0 15948 2276 pts/14 S+ 16:45 0:00 grep --color=auto java
it was working properly suddenly it throws error .
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.
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.
Any core. properties file in any directory of your Solr installation (or in a directory under where solr_home is defined) will be found by Solr and the defined properties will be used for the core named in the file. In standalone mode, solr. xml must reside in solr_home .
As it is mentionned in the wiki that you referenced in the link , instanceDir parameter in the http request is a required parameter. config, schema & dataDir parameters are optional. (Default is to look for solrconfig.xml/schema.xml inside instanceDir. Default place to look for dataDir depends on solrconfig.xml.) Example of Create Request
http://localhost:8983/solr/admin/cores?action=CREATE&name=coreX&instanceDir=path_to_instance_directory&
config=config_file_name.xml&schema=schema_file_name.xml&dataDir=data
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With