Could you also get the /home/ubuntu/db/messages.log of each of the 3 instances to see if there are any issues with the HA communication?
Thanks so much, Michael Am 28.09.2011 um 18:11 schrieb Toby O'Rourke: > Hi, > > I'm not quite sure which property files you're talking about. The > configuration passed to HighlyAvailableGraphDatabase comes from the map > specified as a constructor argument directly in the spring Context. > database.path, server.id, ha.server.port, and zookeeper.servers are set by > system properties when tomcat is started so for each server: > > # VM1 > export JAVA_OPTS="-Dserver.id=1 -Dha.server.port=6001 > -Ddatabase.path=/home/ubuntu/db > -Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181" > # VM2 > export JAVA_OPTS="-Dserver.id=2 -Dha.server.port=6001 > -Ddatabase.path=/home/ubuntu/db > -Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181" > # VM3 > export JAVA_OPTS="-Dserver.id=3 -Dha.server.port=6001 > -Ddatabase.path=/home/ubuntu/db > -Dzookeeper.servers=zoo1:2181,zoo2:2181,zoo3:2181" > > Written as a properties file, for one server, they would look like this: > > ha.machine_id=1 > ha.server=zoo1:6001 > ha.zoo_keeper_servers=zoo1:2181,zoo2:2181,zoo3:2181 > enable_remote_shell=port=1331 > pull_interval=1 > > But looking at the sample code on the wiki, I'm just short cutting it a > bit by doing it in the Spring Context rather than parsing a properties > file in a main method? In terms of the zookeeper config, zoo.cfg looks > like this: > > tickTime=2000 > dataDir=/var/lib/zookeeper > clientPort=2181 > initLimit=5 > syncLimit=2 > server.1=zoo1:2888:3888 > server.2=zoo2:2888:3888 > server.3=zoo3:2888:3888 > > > Should I be including some other config? > > Thanks, > > Toby. > > > On 28/09/2011 15:53, "Michael Hunger" <[email protected]> > wrote: > >> Could you also share the property files of the 3 vm's ? >> >> Thanks >> >> Michael >> >> Am 28.09.2011 um 15:59 schrieb Toby O'Rourke: >> >>> Hi, >>> >>> I'm trying to do a POC using neo4j and spring-data-graph. I have >>> configured 3 VMs running zookeeper and deployed a simple webapp to >>> tomcat on each instance. I've run into a bit of a problem with >>> replication though. I can only see data being replicated when I restart >>> each tomcat instance which is obviously no good. >>> >>> I have the following in my application context: >>> >>> <bean id="graphDatabaseService" >>> class="org.neo4j.kernel.HighlyAvailableGraphDatabase" >>> destroy-method="shutdown" >>> scope="singleton"> >>> <constructor-arg index="0" value="${database.path}"/> >>> <constructor-arg index="1"> >>> <map> >>> <entry key="ha.machine_id" value="${server.id}" /> >>> <entry key="ha.server" value="zoo1:${ha.server.port}" /> >>> <entry key="ha.zoo_keeper_servers" >>> value="${zookeeper.servers}" /> >>> <entry key="enable_remote_shell" value="port=1331" /> >>> <entry key="pull_interval" value="1" /> >>> </map> >>> </constructor-arg> >>> </bean> >>> >>> I am starting "zoo1" first so that it becomes the master. Server.id is >>> allocated at runtime from a system property set on each machine >>> Dserver.id=x in the tomcat startup script. From what I understand the >>> pull_interval=1 setting means that data should be synchronized once per >>> second, yet I am only seeing it happen when the servers are bounced. Am >>> I missing something? >>> >>> Thanks, >>> >>> Toby. >>> >>> _______________________________________________ >>> Neo4j mailing list >>> [email protected] >>> https://lists.neo4j.org/mailman/listinfo/user >> >> _______________________________________________ >> Neo4j mailing list >> [email protected] >> https://lists.neo4j.org/mailman/listinfo/user > > _______________________________________________ > Neo4j mailing list > [email protected] > https://lists.neo4j.org/mailman/listinfo/user _______________________________________________ Neo4j mailing list [email protected] https://lists.neo4j.org/mailman/listinfo/user

