lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Al Wold <>
Subject Solr cloud: zkHost in solr.xml gets wiped out
Date Fri, 14 Jun 2013 22:15:49 GMT
I'm working on setting up a solr cloud test environment, and the target environment I need
to put it in has multiple webapps per tomcat instance. With that in mind, I wanted/had to
avoid putting any configs in system properties. I tried putting the zkHost in solr.xml, like

> <?xml version="1.0" encoding="UTF-8" ?>
> <solr persistent="true" sharedLib="lib" zkHost="">
>   <!-- this 8080 might need to change in production -->
>   <cores adminPath="/admin/cores" zkClientTimeout="20000" hostPort="8080" hostContext="/"/>
> </solr>

Everything works fine when I first start things up, create collections, upload docs, search,
etc. Creating the collection, however, modifies the solr.xml file, and doesn't keep the zkHost

> <?xml version="1.0" encoding="UTF-8" ?>
> <solr persistent="true" sharedLib="lib">
>   <cores adminPath="/admin/cores" zkClientTimeout="20000" hostPort="8080" hostContext="/">
>     <core loadOnStartup="true" shard="shard2" instanceDir="directory_shard2_replica1/"
transient="false" name="directory_shard2_replica1" collection="directory"/>
>     <core loadOnStartup="true" shard="shard1" instanceDir="directory_shard1_replica1/"
transient="false" name="directory_shard1_replica1" collection="directory"/>
>   </cores>
> </solr>

With that in mind, once I restart tomcat, it no longer knows it's supposed to be talking to
zookeeper, so it looks for local configs and blows up. 

I traced this back to the code in, in the method persistFile(), where it
seems to contain no code to write out the zkHost when it updates solr.xml. I upped the logging
on my solr instance to verify this code is executing, so I'm pretty sure it's the right spot.

Is anyone else using zkHost in their solr.xml successfully? I can't see how it would work
given this problem.

Does this seem like a bug? If so, I can probably file a report and submit a patch. It seems
like this problem may become a non-issue in 5.0, based on comments in the code and some of
the discussion in JIRA, but I'm not sure how far off that is.


-Al Wold

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message