ruby on rails - Multiple Solr Instances - Second Solr Locked on Startup -


i've been trying figure out workflow minitest suite launch second solr instance feature tests if development instance running. however, i'm running issues getting servers start (i.e. when start them outside of testing).

to start servers i'm using:

rails_env=development bin/rake sunspot:solr:start rails_env=test bin/rake sunspot:solr:start 

however, whichever server starts second becomes locked. attempt access server in tests or in development yields error:

rsolr::error::http - 500 internal server error error:     {msg=solrcore 'test& 'is not available due init failure: index locked write core 'test'. solr longer supports forceful unlocking via 'unlockonstartup'. please verify locks manually!,trace=org.apache.solr.common.solrexception: solrcore 'test' not available due init failure: index locked write core 'test'. solr longer supports forceful unlocking via 'unlockonstartup'. please verify locks manually!     @ org.apache.solr.core.corecontainer.getcore(corecontainer.java:974)     @ org.apache.solr.servlet.httpsolrcall.init(httpsolrcall.java:250)     @ org.apache.solr.servlet.httpsolrcall.call(httpsolrcall.java:417)     @ org.apache.solr.servlet.solrdispatchfilter.dofilter(solrdispatchfilter.java:214)     @ org.apache.solr.servlet.solrdispatchfilter.dofilter(solrdispatchfilter.java:179)     @ org.eclipse.jetty.servlet.servlethandler$cachedchain.dofilter(servlethandler.java:1652)     @ org.eclipse.jetty.servlet.servlethandler.dohandle(servlethandler.java:585)     @ org.eclipse.jetty.server.handler.scopedhandler.handle(scopedhandler.java:143)     @ org.eclipse.jetty.security.securityhandler.handle(securityhandler.java:577)     @ org.eclipse.jetty.server.session.sessionhandler.dohandle(sessionhandler.java:223)  uri: http://localhost:8981/solr/test/update?wt=ruby request headers: {"content-type"=>"text/xml"} request data: "<?xml version=\"1.0\" encoding=\"utf-8\"?><add/>" 

i've searched around issues related locking can't find problem having 2 servers running. setup is:

rails (5.0.0.1) sunspot (2.2.5) sunspot_rails (2.2.5) sunspot_solr (2.2.5) ruby 2.3.1p112 

my sunspot.yml is:

production:   solr:     hostname: localhost     port: 8983     log_level: warning     path: /solr/production  development:   solr:     hostname: localhost     port: 8982     log_level: info     path: /solr/development  test:   solr:     hostname: localhost     port: 8981     log_level: warning     path: /solr/test 

and finally, solr.xml

<solr>    <solrcloud>      <str name="host">${host:}</str>     <int name="hostport">${jetty.port:8983}</int>     <str name="hostcontext">${hostcontext:solr}</str>      <bool name="genericcorenodenames">${genericcorenodenames:true}</bool>      <int name="zkclienttimeout">${zkclienttimeout:30000}</int>     <int name="distribupdatesotimeout">${distribupdatesotimeout:600000}</int>     <int name="distribupdateconntimeout">${distribupdateconntimeout:60000}</int>    </solrcloud>    <shardhandlerfactory name="shardhandlerfactory" class="httpshardhandlerfactory">     <int name="sockettimeout">${sockettimeout:600000}</int>     <int name="conntimeout">${conntimeout:60000}</int>   </shardhandlerfactory>  </solr> 

thank in advance!


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -