Neo4j 3.1.4:在三个不同的主机上定义核心时,可以启动临时群集

时间:2017-06-21 11:19:18

标签: neo4j

我尝试在三个不同的主机上形成并运行因果群集,但它不起作用:服务器无法相互连接。因此,任何帮助/任何评论将不胜感激。

    **neo4jlog:**

 ======== Neo4j 3.1.4 ========

INFO  Starting...

INFO  Bolt enabled on 0.0.0.0:7687.

INFO  Initiating metrics...

INFO  My connection info: [
    Discovery:   listen=172.16.140.10:5000, advertised=localhost:5000,

    Transaction: listen=127.0.0.1:6000, advertised=localhost:6000, 

    Raft:        listen=127.0.0.1:7000, advertised=localhost:7000, 

    Client Connector Addresses:

        bolt://localhost:7687,

        http://localhost:7474,

        https://localhost:6476]

 INFO  Discovering cluster with initial members: [
172.16.140.10:5000, 
172.16.140.11:5001, 
10.4.4.8:5000
]
INFO  Attempting to connect to the other cluster members before continuing...

after some minutes:

ERROR Failed to start Neo4j...

neo4j.conf(1):


dbms.connector.bolt.enabled=true

dbms.connector.bolt.listen_address=0.0.0.0:7687

dbms.connector.http.enabled=true

dbms.connector.http.listen_address=0.0.0.0:7474

dbms.connector.https.enabled=true
dbms.connector.https.listen_address=0.0.0.0:6476

causal_clustering.expected_core_cluster_size=3
causal_clustering.initial_discovery_members=
172.16.140.10:5000,
172.16.140.11:5001,
10.4.4.8:5000

causal_clustering.discovery_listen_address=172.16.140.10:5000
causal_clustering.transaction_listen_address=127.0.0.1:6000
causal_clustering.raft_listen_address=127.0.0.1:7000

other things are default

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

neo4j.conf (2):

dbms.connector.bolt.enabled=true
dbms.connector.bolt.listen_address=0.0.0.0:7689

dbms.connector.http.enabled=true
dbms.connector.http.listen_address=0.0.0.0:7474

dbms.connector.https.enabled=true
dbms.connector.https.listen_address=0.0.0.0:6476


dbms.mode=CORE
causal_clustering.expected_core_cluster_size=3
causal_clustering.initial_discovery_members=172.16.140.10:5000,172.16.140.11:5001,10.4.4.8:5000
causal_clustering.discovery_listen_address=172.16.140.11:5001
causal_clustering.transaction_listen_address=127.0.0.1:6000
causal_clustering.raft_listen_address=127.0.0.1:7000

other things are default
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    neo4j.conf(3)

    dbms.connector.bolt.enabled=true
   dbms.connector.bolt.listen_address=0.0.0.0:7687

dbms.connector.http.enabled=true
dbms.connector.http.listen_address=0.0.0.0:7474

dbms.connector.https.enabled=true
dbms.connector.https.listen_address=0.0.0.0:7473

dbms.mode=CORE
causal_clustering.expected_core_cluster_size=3
causal_clustering.initial_discovery_members=172.16.140.10:5000,172.16.140.11:5001,10.4.4.8:5000
causal_clustering.discovery_listen_address=10.4.4.8:5000
causal_clustering.transaction_listen_address=127.0.0.1:6000
causal_clustering.raft_listen_address=127.0.0.1:7000

other things are default
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

When I started servers, I checked 
netstat -apn on each station:
I see that port 5000 is open and LISTEN for each of them.

I even test if port 5000 for each one of them is reachable by another one:

cat < /dev/tcp/172.16.140.11/5000 from 172.16.140.10 and from 10.4.4.8

cat < /dev/tcp/172.16.140.10/5000 from 172.16.140.11 and from 10.4.4.8

cat < /dev/tcp/10.4.4.8/5000 from 172.16.140.10 and from 172.16.140.11`

并且没关系:端口已启动且可访问。 无论如何,集群可以升级。 系统: Neo4j 3.1.4; Centos 7

谢谢你。

1 个答案:

答案 0 :(得分:0)

您也应该能够从其他机器到达6000和7000端口。 您应该在transaction_listen_address和raft_listen_address属性中设置真实IP地址。或者使用0.0.0.0 如果侦听器位于环回接口(127.0.0.1)上,则其他集群成员无法访问它。