2016-07-06 19 views
0

Neo4jサーバはうまく動作しますが、クラスタを設定しようとしたときに、なぜ動作しないのか分かりません。Neo4jクラスタを設定できません

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

が、私はそうするとき、私は、DBの負荷についてのログファイルにエラーが発生しました:クラスタ仕事をするためには、私は次の行をuncomentする必要が

です

これはそう多くはありません、

#***************************************************************** 
# Neo4j configuration 
#***************************************************************** 

# The name of the database to mount 
dbms.active_database=graph.db 

# Paths of directories in the installation. 
dbms.directories.data=/var/lib/neo4j/data 
dbms.directories.plugins=/var/lib/neo4j/plugins 
#dbms.directories.certificates=certificates 

# This setting constrains all `LOAD CSV` import files to be under the `import` directory. Remove or uncomment it to 
# allow files to be loaded from anywhere in filesystem; this introduces possible security problems. See the `LOAD CSV` 
# section of the manual for details. 
dbms.directories.import=import 

# Whether requests to Neo4j are authenticated. 
# To disable authentication, uncomment this line 
#dbms.security.auth_enabled=false 

# Enable this to be able to upgrade a store from an older version. 
#dbms.allow_format_migration=true 

# The amount of memory to use for mapping the store files, in bytes (or 
# kilobytes with the 'k' suffix, megabytes with 'm' and gigabytes with 'g'). 
# If Neo4j is running on a dedicated server, then it is generally recommended 
# to leave about 2-4 gigabytes for the operating system, give the JVM enough 
# heap to hold all your transaction state and query context, and then leave the 
# rest for the page cache. 
# The default page cache memory assumes the machine is dedicated to running 
# Neo4j, and is heuristically set to 50% of RAM minus the max Java heap size. 
#dbms.memory.pagecache.size=10g 
# Enable online backups to be taken from this database. 
#dbms.backup.enabled=true 

# To allow remote backups, uncomment this 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 
# To have Bolt accept non-local connections, uncomment this 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 
# To have HTTP accept non-local connections, uncomment this 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 and specify these lines for running Neo4j in High Availability mode. 
# See the High availability setup tutorial for more details on these settings 
# http://neo4j.com/docs/operations-manual/current/#tutorials 

# Database mode 
# Allowed values: 
# HA - High Availability 
# SINGLE - Single mode, default. 
# To run in High Availability mode uncomment this line: 
#dbms.mode=HA 

# ha.server_id is the number of each instance in the HA cluster. It should be 
# an integer (e.g. 1), and should be unique for each cluster instance. 
ha.server_id=5 

# ha.initial_hosts is a comma-separated list (without spaces) of the host:port 
# where the ha.host.coordination of all instances will be listening. Typically 
# this will be the same for all cluster instances. 
ha.initial_hosts=192.168.1.93:5001,192.168.1.91:5001 

# IP and port for this instance to listen on, for communicating cluster status 
# information iwth other instances (also see ha.initial_hosts). The IP 
# must be the configured IP address for one of the local interfaces. 
ha.host.coordination=127.0.0.1:5001 

# IP and port for this instance to listen on, for communicating transaction 
# data with other instances (also see ha.initial_hosts). The IP 
# must be the configured IP address for one of the local interfaces. 
ha.host.data=127.0.0.1:6001 

ha.pull_interval=10 

# Amount of slaves the master will try to push a transaction to upon commit 
# (default is 1). The master will optimistically continue and not fail the 
# transaction even if it fails to reach the push factor. Setting this to 0 will 
# increase write performance when writing through master but could potentially 
# lead to branched data (or loss of transaction) if the master goes down. 
#ha.tx_push_factor=1 

# Strategy the master will use when pushing data to slaves (if the push factor 
# is greater than 0). There are three options available "fixed_ascending" (default), 
# "fixed_descending" or "round_robin". Fixed strategies will start by pushing to 
# slaves ordered by server id (accordingly with qualifier) and are useful when 
# planning for a stable fail-over based on ids. 
#ha.tx_push_strategy=fixed_ascending 

# Policy for how to handle branched data. 
#ha.branched_data_policy=keep_all 

# How often heartbeat messages should be sent. Defaults to ha.default_timeout. 
#ha.heartbeat_interval=5s 

# Timeout for heartbeats between cluster members. Should be at least twice that of ha.heartbeat_interval. 
#ha.heartbeat_timeout=11s 

# If you are using a load-balancer that doesn't support HTTP Auth, you may need to turn off authentication for the 
# HA HTTP status endpoint by uncommenting the following line. 
#dbms.security.ha_status_auth_enabled=false 

# Whether this instance should only participate as slave in cluster. If set to 
# true, it will never be elected as master. 
#ha.slave_only=false 

は、すべての

答えて

1

まずありがとう、あなたが起動時にエラーが出る場合は、あなたができる少なくともここに引用それである私のneo4j.confファイルです誰でもそれについて行うことができます。

少なくとも1つの間違いがあります。192.168.1.93と192.168.1.91などのIPアドレスを使用して他のホストとクラスタに参加するには、このホストを同じネットワーク上で通信するように設定する必要があります。他のホストが接続できないループバック(つまり127.0.0.1)ではありません。

192.168.1.93は、それはあなたが使用するために必要なものです:あなたのホストは192.168.1.92を持っている場合

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 

しかし、あなたがコメントで述べたように、すべてのホストで同じである(ha.initial_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 
関連する問題