On 9/3/2013 4:13 AM, maephisto wrote:
> I've setup a ZK instance and also deployed Solr in Tomcat7 on a different
> instance in Amazon EC2.
> Afterwards I tried starting tomcat specifying the ZK host IP, like so:
> 
> sudo service tomcat7 start -DzkHost=<<zk ip>>:2181 -DnumShards=3
> -Dcollection.configName=myconf
> -Dbootstrap_confdir=/usr/share/solr/example/solr/collection1/conf
> 
> Solr loads fine, but is not in the cloud. 

The tomcat init script likely does not pay attention to anything that
you put on the commandline other than a command (like start/stop/status)
for the service.  The java command is buried in that script.

It works with jetty because you are running java directly, not a script.

Helping you with tomcat is outside the scope of this mailing list, but
you may be able to modify the JAVA_OPTS environment variable in a file
with a name like one of the following:

/etc/default/tomcat7
/etc/sysconfig/tomcat7

Many init scripts for packaged software will load environment
information from a central user-modifiable config file.  If this
information is not directly usable to you, please consult a tomcat
mailing list, IRC channel, or other support avenue.

Although Solr does usually work with tomcat, there is no official
testing.  Solr is only tested using the Jetty that is bundled with it.

Side note: I hope you realize that if you're only connecting to one
zookeeper instance, then SolrCloud will not function if that zookeeper
instance goes down.  You need three instances minimum (running on
separate hardware) for robust operation, and Solr must know about all of
them.

Thanks,
Shawn

Reply via email to