lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JesseBuesking <>
Subject solrcloud setup using tomcat, single machine
Date Fri, 07 Sep 2012 01:04:23 GMT
Hey guys!

I've been attempting to get solrcloud set up on a ubuntu vm, but I believe
I'm stuck.

I've got tomcat setup, the solr war file in place, and when I browser to
localhost:port/solr, I can see solr.  CHECK

I've set the zoo.cfg to use port 5200.  I can start it up and see it's
running (ls / shows me [zookeeper]). CHECK

*Issues I'm running into*
1. I'm trying to get it so that the example in solr
(example/solr/collection1/conf) will load up, however it doesn't look like
it's working (from posts online, it looks like I should see a *Cloud* tab
under localhost:port/solr, but it's not appearing.
2. Sometimes it looks like things are still trying to run on port 2181
(default zookeeper port).
3. Some commands I run look like they're trying to use jetty still, even
though I think I have tomcat set up correctly.

I must admit that my background is in C#, so calling java jars passing -D
everywhere is a bit new to me.

What I'd like to do is start up a solr node using zookeeper through tomcat,
but it seems like most guide use jetty and I'm having issues trying to
convert to tomcat.

I don't know what you might need to know to help me out, so I'm going to
give you as much info on my setup as I can.

For reference, the folder structure I've adopted (feel free to make
recommendations) is as follows:
  /usr/solr/data/conf # conf files
  /usr/solr/solr4.0.0-BETA # extraction from the tar.gz
  /usr/tomcat/tomcat7.0.30 #where tomcat lives
  /usr/tomcat/tomcat7.0.30/data/solr.war # war file from the extracted
  /usr/tomcat/tomcat7.0.30/conf/Catalina/localhost/solr.xml # contains the

<Context docBase="/usr/tomcat/tomcat7.0.30/data/solr.war" debug="0"
        <Environment name="solr/home" type="java.lang.String"
value="/usr/solr/data/conf" override="true" />

  /usr/zookeeper/zookeeper3.3.6 # zookeeper extraction
  /usr/zookeeper/zookeeper3.3.6/data # where the data will be stored
  /usr/zookeeper/zookeeper3.3.6/conf/zoo.cfg # contains the following

# The number of milliseconds of each tick
# The number of ticks that the initial
# synchronization phase can take
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
# the directory where the snapshot is stored.
# the port at which the clients will connect

I've created the file /etc/init.d/tomcat (it contains the following):

# Tomcat auto-start
# description: Auto-starts tomcat
# processname: tomcat
# pidfile: /var/run/

export JAVA_HOME=/opt/java/64/jre1.7.0_07

case $1 in
       /export JAVA_OPTS="$JAVA_OPTS -DnumShards=1
0 -DhostPort=8080" #might not be useful?/
       sh /usr/tomcat/tomcat7.0.30/bin/
        sh /usr/tomcat/tomcat7.0.30/bin/
        sh /usr/tomcat/tomcat7.0.30/bin/
        sh /usr/tomcat/tomcat7.0.30/bin/
exit 0

I've been using some of these posts as references throughout the day (I've
been at this for several hours):
... more, but I don't wanna make this any longer than it needs to be

*End goal for testing*
On a single box (for testing), get this to happen:
1. a single zookeeper instance running on port 5200
2. a single tomcat instance running on port 8080
3. a single solr node running, using configs stored in zookeeper

*Eventual production goal*
1. a 3-piece zookeeper ensemble, running on ports 5200,5201,5202
2. one of the following
    a. 4 solr nodes, running replicated (to allow 1 failure)
    b. 4 solr nodes, running replicated (to allow up to 2 failures)
    *. both choices should allow for querying across 2-3 nodes for higher
volume, with potentially several shards per node in case data grows to big
for a single box (entire index doesn't fit on 1 node)

I know this is a lot to digest in a single post, but I'm trying to post what
I've done, what issues I've ran into, and where I'm going with this so that
you have enough information to base suggestions/answers on.

- Jesse

View this message in context:
Sent from the Solr - User mailing list archive at

View raw message