HA setup using an existing DB

35 views
Skip to first unread message

j2d3

unread,
Sep 28, 2012, 7:25:04 PM9/28/12
to ne...@googlegroups.com
 I have set up HA (3 separate servers) with blank databases. I can start the 3 coordinators and the databases, then I can go and add some test data to any instance and it gets replicated. Works great.

However, when I try to start the master from an existing datastore (a backup of a "single" db's graph.db directory), I can't get it to start up. 

What is the process to set up HA when you have existing data? 

Peter Neubauer

unread,
Sep 29, 2012, 12:25:56 AM9/29/12
to ne...@googlegroups.com

Hi there,
In order to let an existing database be the master of a cluster you need to have keep_logical_logs=true iirc, which isn't enabled in the non-clustered default settings. Could you please check that?

/peter

Send from mobile device.

--
 
 

John Durkin

unread,
Sep 29, 2012, 1:25:53 AM9/29/12
to ne...@googlegroups.com

this is currently set to true in my configuration.  anything else? what is the order in which I should turn each thing on?

--
 
 

Peter Neubauer

unread,
Sep 29, 2012, 2:59:24 AM9/29/12
to ne...@googlegroups.com
Well,
- first, you should start the coordinator cluster
- start the master with the current database
- start the empty slaves

Does that not work? Got your DB somewhere?


Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Wanna learn something new? Come to http://graphconnect.com
> --
>
>

John Durkin

unread,
Sep 29, 2012, 2:40:16 PM9/29/12
to ne...@googlegroups.com

yeah that is the order I'd been trying. i'm going to give out a try again later and I'll try to gather specific error messages about it

--


Peter Neubauer

unread,
Sep 29, 2012, 5:12:44 PM9/29/12
to ne...@googlegroups.com
Great,
thanks. you can get things running by cloning a sample project,
https://github.com/neo4j/neo4j-enterprise-local-qa and run

rake

And maybe put your own data into machine1?

Cheers,

/peter neubauer

G: neubauer.peter
S: peter.neubauer
P: +46 704 106975
L: http://www.linkedin.com/in/neubauer
T: @peterneubauer

Wanna learn something new? Come to http://graphconnect.com


> --
>
>

John Durkin

unread,
Oct 1, 2012, 2:07:57 PM10/1/12
to ne...@googlegroups.com
Hi! So - I'm still stuck trying to get my HA cluster up with real data (from a non-HA setup). When I try to switch out the blank database with the real one and start neo4j up again, it fails to start, and an error shows in the console.log:

Caused by: org.neo4j.kernel.ha.zookeeper.ZooKeeperException: StoreId in database doesn't match that of the ZK cluster

So - what I've done first is set up 3 different instances, each running the cluster manager, each with neo4j running starting from blank / empty store. I checked the HA page in the webadmin area and it correctly lists the first one as master as well as 2 others that are the slaves. I tested that data added on a slave appears on all 3 right away, so things seem to be working fine at this stage.

Then, I stop neo4j on the master, do a live backup to get the db store I want from the non-HA cluster, put it into place, and restart neo4j. I didn't stop the cluster or neo4j on either slave. 

When I try to restart neo4j on the master server after replacing the store, I get the error. Any advice?

Best,
JD

--



Mattias Persson

unread,
Oct 1, 2012, 3:27:17 PM10/1/12
to ne...@googlegroups.com
Shut down the coordinators, delete data/coordinator/version-2 directories and start them again. The problem is that you start your cluster (defaults to name "neo4j.ha") with one db and then you try to start another db for that cluster, and it detects that and prevents it.

2012/10/1 John Durkin <john....@gmail.com>
--
 
 



--
Mattias Persson, [mat...@neotechnology.com]
Hacker, Neo Technology
www.neotechnology.com

John Durkin

unread,
Oct 1, 2012, 4:31:08 PM10/1/12
to ne...@googlegroups.com

thank you, that worked great :)

--
 
 
Reply all
Reply to author
Forward
0 new messages