Запуск Neo4j в HA возвращает ошибку сети

В настоящее время я пытаюсь запустить Neo4j 3.0.3 в нашем локальном облаке.

У меня есть 3 узла, чьи локальные IP-адреса:

  • 172.16.1.8
  • 172.16.1.74
  • 172.16.1.79

Файл neo4j.conf идентичен всем узлам, кроме ha.server_id Параметр :

# 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=1 # 2 or 3, depending on which server it's running

# 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=172.16.1.8:5001,172.16.1.74:5001,172.16.1.79:5001

# 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

Это точно такая же конфигурация, предложенная в документах . Я просто использую IP-адреса вместо имен хостов.

Затем я запускаю neo4j start и перехожу к журналам. Вот что я получаю:

2016-08-02 19:17:01.211+0000 ERROR Failed to start Neo4j: Starting Neo4j failed:
 Component 'org.neo4j.server.database.LifecycleManagingDatabase@25a55713' was su
ccessfully initialized, but failed to start. Please see attached cause exception
. Starting Neo4j failed: Component 'org.neo4j.server.database.LifecycleManagingD
atabase@25a55713' was successfully initialized, but failed to start. Please see
attached cause exception.
org.neo4j.server.ServerStartupException: Starting Neo4j failed: Component 'org.n
eo4j.server.database.LifecycleManagingDatabase@25a55713' was successfully initia
lized, but failed to start. Please see attached cause exception.

Исключения связаны до следующего:

Caused by: java.lang.RuntimeException: java.net.UnknownHostException: npc_cvalor_v1_db3-a923e8d7-0e02-4209-9bac-c5a55d7a09c6.arq.lab: npc_cvalor_v1_db3-a923e8d7-0e02-4209-9bac-c5a55d7a09c6.arq.lab: unknown error

Странно то, что оба узла могут видеть друг друга (проверено с помощью ping ), поэтому я не знаю, что может вызывает эту проблему, но я считаю, что это как-то связано с Java. Я использую RHEL 7 с Java 1.8.0 (дистрибутив IBM)

0
задан 2 August 2016 в 23:02
1 ответ

Я обнаружил проблему.

По некоторым причинам, которые я еще не знаю, компоненты java.net. * не смогли преобразовать имя хоста в IP-адрес сервер, на котором они работают.

Мне пришлось добавить запись в файл / etc / hosts , указывающую IP-адрес сервера на имя хоста:

# On Server 1
172.16.1.8 <full.hostname> <hostname>

# On Server 2
172.16.1.74 <full.hostname> <hostname>

# On Server 3
172.16.1.79 <full.hostname> <hostname>
0
ответ дан 24 November 2019 в 06:03

Теги

Похожие вопросы