I can't set up a Neo4j cluster -


i have neo4j server works fine but, when tried set cluster can't figure out why not work.

in order make cluster work, seems need uncoment following lines:

ha.server_id = 3 ha.initial_hosts =192.168.1.93:5001,192.168.1.91:5001 dbms.mode=ha 

but when so, got error in logs file db load.

this neo4j.conf file

#***************************************************************** # neo4j configuration #*****************************************************************  # name of database mount dbms.active_database=graph.db  # paths of directories in installation. dbms.directories.data=/var/lib/neo4j/data dbms.directories.plugins=/var/lib/neo4j/plugins #dbms.directories.certificates=certificates  # setting constrains `load csv` import files under `import` directory. remove or uncomment # allow files loaded anywhere in filesystem; introduces possible security problems. see `load csv` # section of manual details. dbms.directories.import=import  # whether requests neo4j authenticated. # disable authentication, uncomment line #dbms.security.auth_enabled=false  # enable able upgrade store older version. #dbms.allow_format_migration=true  # amount of memory use mapping store files, in bytes (or # kilobytes 'k' suffix, megabytes 'm' , gigabytes 'g'). # if neo4j running on dedicated server, recommended # leave 2-4 gigabytes operating system, give jvm enough # heap hold transaction state , query context, , leave # rest page cache. # default page cache memory assumes machine dedicated running # neo4j, , heuristically set 50% of ram minus max java heap size. #dbms.memory.pagecache.size=10g # enable online backups taken database. #dbms.backup.enabled=true  # allow remote backups, uncomment line: #dbms.backup.address=0.0.0.0:6362  #***************************************************************** # network connector configuration #*****************************************************************  # bolt connector dbms.connector.bolt.type=bolt dbms.connector.bolt.enabled=true dbms.connector.bolt.tls_level=optional # have bolt accept non-local connections, uncomment line # dbms.connector.bolt.address=0.0.0.0:7687  # http connector dbms.connector.http.type=http dbms.connector.http.enabled=true #dbms.connector.http.encryption=none # have http accept non-local connections, uncomment line dbms.connector.http.address=0.0.0.0:7474  # https connector dbms.connector.https.type=http dbms.connector.https.enabled=true dbms.connector.https.encryption=tls dbms.connector.https.address=localhost:7473  # number of neo4j worker threads. #dbms.threads.worker_count=  #***************************************************************** # ha configuration #*****************************************************************  # uncomment , specify these lines running neo4j in high availability mode. # see high availability setup tutorial more details on these settings # http://neo4j.com/docs/operations-manual/current/#tutorials  # database mode # allowed values: # ha - high availability # single - single mode, default. # run in high availability mode uncomment line: #dbms.mode=ha  # ha.server_id number of each instance in ha cluster. should # integer (e.g. 1), , should unique each cluster instance. ha.server_id=5  # ha.initial_hosts comma-separated list (without spaces) of host:port # ha.host.coordination of instances listening. typically # same cluster instances. ha.initial_hosts=192.168.1.93:5001,192.168.1.91:5001  # ip , port instance listen on, communicating cluster status # information iwth other instances (also see ha.initial_hosts). ip # must configured ip address 1 of local interfaces. ha.host.coordination=127.0.0.1:5001  # ip , port instance listen on, communicating transaction # data other instances (also see ha.initial_hosts). ip # must configured ip address 1 of local interfaces. ha.host.data=127.0.0.1:6001  ha.pull_interval=10  # amount of slaves master try push transaction upon commit # (default 1). master optimistically continue , not fail # transaction if fails reach push factor. setting 0 # increase write performance when writing through master potentially # lead branched data (or loss of transaction) if master goes down. #ha.tx_push_factor=1  # strategy master use when pushing data slaves (if push factor # greater 0). there 3 options available "fixed_ascending" (default), # "fixed_descending" or "round_robin". fixed strategies start pushing # slaves ordered server id (accordingly qualifier) , useful when # planning stable fail-over based on ids. #ha.tx_push_strategy=fixed_ascending  # policy how handle branched data. #ha.branched_data_policy=keep_all  # how heartbeat messages should sent. defaults ha.default_timeout. #ha.heartbeat_interval=5s  # timeout heartbeats between cluster members. should @ least twice of ha.heartbeat_interval. #ha.heartbeat_timeout=11s  # if using load-balancer doesn't support http auth, may need turn off authentication # ha http status endpoint uncommenting following line. #dbms.security.ha_status_auth_enabled=false  # whether instance should participate slave in cluster. if set # true, never elected master. #ha.slave_only=false 

thank you

first of all, if error on startup, least quote here, otherwise there's not can it.

regarding configuration, there's @ least 1 mistake: participate in cluster other hosts using ip addresses such 192.168.1.93 , 192.168.1.91, need set host communicate on same network, not on loopback (i.e. 127.0.0.1) other hosts cannot connect to.

if host has e.g. 192.168.1.93, that's need use:

ha.initial_hosts=192.168.1.93:5001,192.168.1.91:5001 ha.host.coordination=192.168.1.93:5001 ha.host.data=192.168.1.93:6001 

however, if host has 192.168.1.92, need add ha.initial_hosts (which same on hosts, noted in comment, , not list of other hosts):

ha.initial_hosts=192.168.1.93:5001,192.168.1.92:5001,192.168.1.91:5001 ha.host.coordination=192.168.1.92:5001 ha.host.data=192.168.1.92:6001 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -