HI All,

Please help me. I am stuck in solr core creation. I have created Solr
war file followed process as mentioned in
https://gist.github.com/fschiettecatte/836d13be0c95f1fd159e45d3af861952
 as I want to run Solr as standalone application through my specific
version of jetty server.

# After creating war file I started solr through jetty successfully by
running below command:

$ java -Djetty.home=/var/solr -Djetty.base=/var/solr
-Dsolr.solr.home=/var/solr/solr -Dsolr.log.dir=/var/solr/solr
-Dbootstrap_confdir=/var/solr/solr/conf -Dcollection.configName=conf
-DzkRun -Djava.util.logging.config.file=/var/solr/solr/solr-log.properties
-jar /var/solr/start.jar

2021-08-20 07:49:40.869:INFO::main: Logging initialized @155ms to
org.eclipse.jetty.util.log.StdErrLog
2021-08-20 07:49:41.021:INFO:oejs.Server:main: jetty-9.4.18.v20190429;
built: 2019-05-10T18:03:12.512Z; git:
7ef7435fd940d3eb73c256b765d93aff5849c6e8; jvm 11.0.5+10
2021-08-20 07:49:41.029:INFO:oejdp.ScanningAppProvider:main:
Deployment monitor [file:///data/git/runtime/solr/webapps/] at
interval 1
2021-08-20 07:49:41.568:INFO:oejw.StandardDescriptorProcessor:main: NO
JSP Support for /solr, did not find
org.apache.jasper.servlet.JspServlet
2021-08-20 07:49:41.572:INFO:oejs.session:main:
DefaultSessionIdManager workerName=node0
2021-08-20 07:49:41.573:INFO:oejs.session:main: No SessionScavenger
set, using defaults
2021-08-20 07:49:41.573:INFO:oejs.session:main: node0 Scavenging every 600000ms
2021-08-20 07:49:41.575:WARN:oejs.SecurityHandler:main:
ServletContext@o.e.j.w.WebAppContext@294425a7{solr,/solr,file:///tmp/jetty-0.0.0.0-8983-solr.war-_solr-any-17126331786779836602.dir/webapp/,STARTING}{/solr.war}
has uncovered http methods for path: /
ERROR StatusLogger No Log4j 2 configuration file found. Using default
configuration (logging only errors to the console), or user
programmatically provided configurations. Set system property
'log4j2.debug' to show Log4j 2 internal initialization logging. See
https://logging.apache.org/log4j/2.x/manual/configuration.html for
instructions on how to configure Log4j 2
2021-08-20 07:49:43.647:INFO:oejsh.ContextHandler:main: Started
o.e.j.w.WebAppContext@294425a7{solr,/solr,file:///tmp/jetty-0.0.0.0-8983-solr.war-_solr-any-17126331786779836602.dir/webapp/,AVAILABLE}{/solr.war}
2021-08-20 07:49:43.652:INFO:oejs.AbstractConnector:main: Started
ServerConnector@6da9dc6{HTTP/1.1,[http/1.1]}{0.0.0.0:8983}
2021-08-20 07:49:43.653:INFO:oejs.Server:main: Started @2939ms

# My solr is working just fine I run few command to verify:
$ curl "http://0.0.0.0:8983/solr/admin/collections?action=clusterstatus&wt=xml";
<?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
  <int name="status">0</int>
  <int name="QTime">19</int>
</lst>
<lst name="cluster">
  <lst name="collections"/>
  <arr name="live_nodes">
    <str>192.168.1.2:8983_solr</str>
  </arr>
</lst>
</response>

# When I tried to create core it was failing with below error, before
running this command I created folder name “a10” under solr home
directory “/var/solr/solr/cores”

$ curl 
"http://0.0.0.0:8983/solr/admin/cores?action=CREATE&name=a10&instanceDir=cores/a10&shard=shard10&collection=conf1&coreNodeName=a10&wt=xml";

              <?xml version="1.0" encoding="UTF-8"?>
<response>
<lst name="responseHeader">
 <int name="status">400</int>
 <int name="QTime">10067</int>
</lst>
<lst name="error">
 <lst name="metadata">
<str name="error-class">org.apache.solr.common.SolrException</str>
<str 
name="root-error-class">org.apache.solr.cloud.ZkController$NotInClusterStateException</str>
 </lst>
 <str name="msg">Error CREATEing SolrCore 'a10': coreNodeName a10 does
not exist in shard shard10, ignore the exception if the replica was
deleted</str>
 <int name="code">400</int>
</lst>
</response>

Thanks
-Ravi

Reply via email to