Note that there are some explanatory texts on larger screens.

plurals
  1. PONeo4j.rb 1.9 HA in development working intermittently, then giving errors
    primarykey
    data
    text
    <p>Hullo,</p> <p>We are attempting to set up an Neo4j HA cluster in our Rails dev environment, much like what is explained here: <a href="https://github.com/andreasronge/neo4j/wiki/Neo4j%3A%3ARails-Config" rel="nofollow">https://github.com/andreasronge/neo4j/wiki/Neo4j%3A%3ARails-Config</a> </p> <p>We have two instances in the cluster. Server 1 is the app, Server 2 is the Rails console. They both start fine, but eventually one of them will fall over. Usually, it's one of the following:</p> <p>1) java.io.FileNotFound: /server_1_path/path/to/some/RailsModel_exact/_2.fxm file. Somehow, the indexes expect a file to exist that does not exist. Sometimes, the file does not exist in EITHER server directory, and the only thing that helps is to make both sets of index files identical by copying one to the other.</p> <p>2) Orphaned index.lock files. The error here will say that a certain index is locked, and removing the specific <code>.lock</code> file fixes the issue. Annoying.(maybe <a href="https://jira.atlassian.com/browse/FE-3483" rel="nofollow">similar issue</a>)</p> <p>3) Add data in one instance, never shows up in the other instance. In this case, I create a node in the Rails console, and it never shows up in the app, or vice versa. In this case, it seems that both instances start up as master and will never sync. Usually have to delete one of the dbs and restart to get them working again.</p> <p>I am not sure if the new 1.9 HA stuff isn't ready for prime time or we are being too nonchalant with how we quit the app/console and Neo4j is not shutting down cleanly. </p> <p>This is a highly frustrating issue. We'd appreciate any help/pointers to get it working right.</p> <p>We are using the 1.9 M03 version of the gem, and here is our config:</p> <pre><code>server_id = ((defined? Rails::Console)) ? 2 : 1 config.neo4j['enable_ha'] = true config.neo4j['enable_remote_shell'] = "port=133#{server_id}" config.neo4j['ha.server_id'] = server_id config.neo4j['ha.server'] = "localhost:600#{server_id}" config.neo4j['ha.pull_interval'] = '1s' config.neo4j['ha.discovery.enabled'] = false config.neo4j['ha.initial_hosts'] = [1,2,3].map{|id| ":500#{id}"}.join(',') config.neo4j['ha.cluster_server'] = ":5001-5099" #"#{server_id}" config.neo4j.storage_path = File.expand_path("db/ha_neo_#{server_id}", Object::Rails.root) config.neo4j['online_backup_server']= "localhost:636#{server_id}" config.neo4j['ha.cluster_server'] = "localhost:500#{server_id}" config.neo4j['webserver.port'] = "747#{server_id}" config.neo4j['webserver.https.port'] = "748#{server_id}" config.neo4j['enable_remote_shell'] = "port=933#{server_id}" config.neo4j['use_adaptive_cache'] = false puts "Config HA cluster, ha.server_id: #{config.neo4j['ha.server_id']}, db: #{config.neo4j.storage_path}" </code></pre> <p>Thanks for any/all help/advice.</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.
 

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