Note that there are some explanatory texts on larger screens.

plurals
  1. POTroubles while running neo4j & rails in HA (part 2)
    primarykey
    data
    text
    <p>I have configured an HA cluster with 3 nodes. The first is a Rails server, the second a Rail console, and the last a Neo4j server</p> <p>I started the Rails s and the Rails c, then I started the other instance, with the error below.</p> <p>Here is the config for the three machines:</p> <p>Rails server and console: </p> <hr> <p>module Neo4j</p> <pre><code> module Rails module HaConsole class Railtie &lt; Object::Rails::Railtie console do Neo4j.config.use do |conf| server_id = 2 conf['ha.server_id'] = server_id conf['ha.server'] = "localhost:600#{server_id}" conf['ha.cluster_server'] = "localhost:500#{server_id}" conf['storage_path'] = File.expand_path("db/ha_neo_#{server_id}", Object::Rails.root) puts "Re-Config HA cluster, ha.server_id: #{conf['ha.server_id']}, db: #{conf['storage_path']}" end end config.before_configuration do server_id = 1 config.neo4j['enable_ha'] = true config.neo4j['ha.server_id'] = server_id config.neo4j['ha.server'] = "localhost:600#{server_id}" config.neo4j['ha.pull_interval'] = '500ms' config.neo4j['ha.discovery.enabled'] = false config.neo4j['ha.initial_hosts'] = [1,2,3].map{|id| "localhost:500#{id}"}.join(',') config.neo4j['ha.cluster_server'] = "localhost:500#{server_id}" config.neo4j.storage_path = File.expand_path("db/ha_neo_#{server_id}", Object::Rails.root) puts "Config HA cluster, ha.server_id: #{config.neo4j['ha.server_id']}, db: #{config.neo4j.storage_path}" end end end end end </code></pre> <hr> <p>the latter is: </p> <pre><code>online_backup_enabled=true online_backup_server=localhost:6362 ha.server_id=3 ha.initial_hosts=localhost:5001,localhost:5002,localhost:5003 ha.server=localhost:6003 ha.cluster_server=localhost:5003 ha.pull_interval=1 </code></pre> <hr> <p>There is also a timeout from the server (id=3), and, when the port 7474 became available, ther is no sync with the other 2 cluster elements. Moreover, a red banner sometimes appera on top of the 7474 console, sayng 'Lost connection with Neo4j. Please check the plug".</p> <p>Has anyone an idea?</p> <p>Paolo</p> <hr> <p>2013-11-21 23:48:57.473+0000 INFO [Cluster] Attempting to join cluster of [127.0.0.1:5001, 127.0.0.1:5002, 127.0.0.1:5003] 2013-11-21 23:49:02.568+0000 INFO [Cluster] Joined cluster:Name:neo4j.ha Nodes:{1=cluster://127.0.0.1:5001, 3=cluster://127.0.0.1:5003} Roles:{coordinator=1} 2013-11-21 23:49:02.582+0000 INFO [Cluster] Instance 3 (this server) joined the cluster 2013-11-21 23:49:06.845+0000 INFO [Cluster] Instance 1 was elected as coordinator java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2598) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1318) at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:1990) at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1915) at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1798) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1350) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:370) at org.neo4j.cluster.member.paxos.PaxosClusterMemberEvents$HighAvailabilitySnapshotProvider.setState(PaxosClusterMemberEvents.java:179) at org.neo4j.cluster.protocol.snapshot.SnapshotMessage$SnapshotState.setState(SnapshotMessage.java:91) at org.neo4j.cluster.protocol.snapshot.SnapshotState$2.handle(SnapshotState.java:105) at org.neo4j.cluster.protocol.snapshot.SnapshotState$2.handle(SnapshotState.java:89) at org.neo4j.cluster.statemachine.StateMachine.handle(StateMachine.java:88) at org.neo4j.cluster.StateMachines$1.run(StateMachines.java:135) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744)</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload