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
  /usr/solr/data/conf # conf files
  /usr/solr/solr4.0.0-BETA # extraction from the tar.gz
/usr/tomcat
  /usr/tomcat/tomcat7.0.30 #where tomcat lives
  /usr/tomcat/tomcat7.0.30/data/solr.war # war file from the extracted
tar.gz
  /usr/tomcat/tomcat7.0.30/conf/Catalina/localhost/solr.xml # contains the
following

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

/usr/zookeeper
  /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
tickTime=2000
# The number of ticks that the initial
# synchronization phase can take
initLimit=10
# The number of ticks that can pass between
# sending a request and getting an acknowledgement
syncLimit=5
# the directory where the snapshot is stored.
dataDir=/usr/zookeeper/data
# the port at which the clients will connect
clientPort=5200

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/tomcat.pid

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

case $1 in
start)
       /export JAVA_OPTS="$JAVA_OPTS -DnumShards=1
-Dbootstrap_confdir=/usr/solr/example/solr/collection1/conf
-DzkHost=localhost:520
0 -DhostPort=8080" #might not be useful?/
       sh /usr/tomcat/tomcat7.0.30/bin/startup.sh
        ;;
stop)
        sh /usr/tomcat/tomcat7.0.30/bin/shutdown.sh
        ;;
restart)
        sh /usr/tomcat/tomcat7.0.30/bin/shutdown.sh
        sh /usr/tomcat/tomcat7.0.30/bin/startup.sh
        ;;
esac
exit 0

I've been using some of these posts as references throughout the day (I've
been at this for several hours):
http://outerthought.org/blog/491-ot.html
http://blog.jesjobom.com/2012/08/configurando-solr-cloud-beta-tomcat-zookeeper-externo/
http://www.slideshare.net/lucenerevolution/how-solrcloud-changes-the-user-experience-in-a-sharded-environment
http://techspry.com/how-to/how-to-install-tomcat-7-and-solr-on-centos-5-5/
http://stackoverflow.com/questions/10026014/apache-solr-configuration-with-tomcat-6-0
... 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.

Thanks!
- Jesse



--
View this message in context: 
http://lucene.472066.n3.nabble.com/solrcloud-setup-using-tomcat-single-machine-tp4006041.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to