Adding a second node

Hello,

I have a problem connecting my 2 nodes with the same cluster. I have one VM with ES v5.3.1 and the other one v5.3.0. This my two files config :

cluster.name: "tsdb"
node.name: "node-2"
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
network.host: 10.60.74.38
discovery.zen.ping.unicast.hosts: ["mastervm"]
discovery.zen.minimum_master_nodes: 2
discovery.zen.ping_timeout: 5s
node.master: false
node.data: false
transport.tcp.port: 9300
http.port: 9200
http.enabled: true
gateway.recover_after_nodes: 1
gateway.recover_after_time: 5m
gateway.expected_nodes: 2
http.host: 10.60.74.38
bootstrap.system_call_filter: false

and the config for the master node :

cluster.name: "tsdb"
node.name: "node-1"
path.data: /var/lib/elasticsearch
path.logs: /var/log/elasticsearch
discovery.zen.ping.unicast.hosts: ["slavevm"]
discovery.zen.minimum_master_nodes: 1
discovery.zen.ping_timeout: 5s
node.master: true
node.data: true
transport.tcp.port: 9300
network.host: 10.50.0.222
http.port: 9200
http.enabled: true
gateway.recover_after_nodes: 1
gateway.recover_after_time: 5m
gateway.expected_nodes: 2
http.host: 0.0.0.0
cluster.routing.allocation.disk.threshold_enabled: false

Both of them are running but not connected. Concerning the logs , I have this :

[2017-04-28T13:07:08,423][WARN ][o.e.d.z.ZenDiscovery     ] [node-2] failed to connect to master [{node-1}{kOu4qBYtQFOdBDn7JQ1qKg}{km6VaD8HQ5iPmHuf_8zi-g}{10.50.0.222}{10.50.0.222:9300}], retrying...
org.elasticsearch.transport.ConnectTransportException: [node-1][10.50.0.222:9300] connect_timeout[30s]
	at org.elasticsearch.transport.netty4.Netty4Transport.connectToChannels(Netty4Transport.java:359) ~[?:?]
	at org.elasticsearch.transport.TcpTransport.openConnection(TcpTransport.java:495) ~[elasticsearch-5.3.1.jar:5.3.1]
	at org.elasticsearch.transport.TcpTransport.connectToNode(TcpTransport.java:460) ~[elasticsearch-5.3.1.jar:5.3.1]
	at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:314) ~[elasticsearch-5.3.1.jar:5.3.1]
	at org.elasticsearch.transport.TransportService.connectToNode(TransportService.java:301) ~[elasticsearch-5.3.1.jar:5.3.1]
	at org.elasticsearch.discovery.zen.ZenDiscovery.joinElectedMaster(ZenDiscovery.java:464) [elasticsearch-5.3.1.jar:5.3.1]
	at org.elasticsearch.discovery.zen.ZenDiscovery.innerJoinCluster(ZenDiscovery.java:416) [elasticsearch-5.3.1.jar:5.3.1]
	at org.elasticsearch.discovery.zen.ZenDiscovery.access$3800(ZenDiscovery.java:81) [elasticsearch-5.3.1.jar:5.3.1]
	at org.elasticsearch.discovery.zen.ZenDiscovery$JoinThreadControl$1.run(ZenDiscovery.java:1190) [elasticsearch-5.3.1.jar:5.3.1]
	at org.elasticsearch.common.util.concurrent.ThreadContext$ContextPreservingRunnable.run(ThreadContext.java:569) [elasticsearch-5.3.1.jar:5.3.1]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_121]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_121]
	at java.lang.Thread.run(Thread.java:745) [?:1.8.0_121]
Caused by: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: 10.50.0.222/10.50.0.222:9300
	at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[?:?]
	at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[?:?]
	at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:346) ~[?:?]
	at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:340) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:630) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysPlain(NioEventLoop.java:527) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:481) ~[?:?]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:441) ~[?:?]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) ~[?:?]

Anyone can help me please.
Thanks.

Can you ping and telnet between the hosts?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.