Set cluster

I had some problem in setting cluster.

I need some help.

this is my log
[2018-07-29T17:02:10,672][INFO ][o.e.n.Node ] [node-1] initializing ... [2018-07-29T17:02:10,755][INFO ][o.e.e.NodeEnvironment ] [node-1] using [1] data paths, mounts [[/ (rootfs)]], net usable_space [45.8gb], net total_space [47.9gb], types [rootfs] [2018-07-29T17:02:10,755][INFO ][o.e.e.NodeEnvironment ] [node-1] heap size [1007.3mb], compressed ordinary object pointers [true] [2018-07-29T17:02:10,756][INFO ][o.e.n.Node ] [node-1] node name [node-1], node ID [EEtGnAh9SL-dtsL3DMu4cg] [2018-07-29T17:02:10,757][INFO ][o.e.n.Node ] [node-1] version[6.0.0], pid[11915], build[8f0685b/2017-11-10T18:41:22.859Z], OS[Linux/3.10.0-514.2.2.el7.x86_64/amd64], JVM[Oracle Corporation/OpenJDK 64-Bit Server VM/1.8.0_181/25.181-b13] [2018-07-29T17:02:10,757][INFO ][o.e.n.Node ] [node-1] JVM arguments [-Xms1g, -Xmx1g, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=/var/lib/elasticsearch, -Des.path.home=/usr/share/elasticsearch, -Des.path.conf=/etc/elasticsearch] [2018-07-29T17:02:11,720][INFO ][o.e.p.PluginsService ] [node-1] loaded module [aggs-matrix-stats] [2018-07-29T17:02:11,720][INFO ][o.e.p.PluginsService ] [node-1] loaded module [analysis-common] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [ingest-common] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-expression] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-mustache] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [lang-painless] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [parent-join] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [percolator] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [reindex] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [repository-url] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [transport-netty4] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] loaded module [tribe] [2018-07-29T17:02:11,721][INFO ][o.e.p.PluginsService ] [node-1] no plugins loaded [2018-07-29T17:02:13,644][INFO ][o.e.d.DiscoveryModule ] [node-1] using discovery type [zen] [2018-07-29T17:02:14,343][INFO ][o.e.n.Node ] [node-1] initialized [2018-07-29T17:02:14,343][INFO ][o.e.n.Node ] [node-1] starting ... [2018-07-29T17:02:14,494][INFO ][o.e.t.TransportService ] [node-1] publish_address {}, bound_addresses {} [2018-07-29T17:02:14,526][INFO ][o.e.b.BootstrapChecks ] [node-1] bound or publishing to a non-loopback or non-link-local address, enforcing bootstrap checks [2018-07-29T17:02:14,561][WARN ][o.e.d.z.UnicastZenPing ] [node-1] failed to resolve host [test002:9301] test002: Name or service not known at Method) ~[?:1.8.0_181] at$2.lookupAllHostAddr( ~[?:1.8.0_181] at ~[?:1.8.0_181] at ~[?:1.8.0_181] at ~[?:1.8.0_181] at ~[?:1.8.0_181] at org.elasticsearch.transport.TcpTransport.parse( ~[elasticsearch-6.0.0.jar:6.0.0] at org.elasticsearch.transport.TcpTransport.addressesFromString( ~[elasticsearch-6.0.0.jar:6.0.0] at org.elasticsearch.transport.TransportService.addressesFromString( ~[elasticsearch-6.0.0.jar:6.0.0] at org.elasticsearch.discovery.zen.UnicastZenPing.lambda$null$0( ~[elasticsearch-6.0.0.jar:6.0.0] at ~[?:1.8.0_181] at org.elasticsearch.common.util.concurrent.ThreadContext$ [elasticsearch-6.0.0.jar:6.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker( [?:1.8.0_181] at java.util.concurrent.ThreadPoolExecutor$ [?:1.8.0_181] at [?:1.8.0_181] [2018-07-29T17:02:17,590][INFO ][o.e.c.s.MasterService ] [node-1] zen-disco-elected-as-master ([0] nodes joined), reason: new_master {node-1}{EEtGnAh9SL-dtsL3DMu4cg}{H2QpeTcfRdisOMuOP5_ahw}{}{} [2018-07-29T17:02:17,595][INFO ][o.e.c.s.ClusterApplierService] [node-1] new_master {node-1}{EEtGnAh9SL-dtsL3DMu4cg}{H2QpeTcfRdisOMuOP5_ahw}{}{}, reason: apply cluster state (from master [master {node-1}{EEtGnAh9SL-dtsL3DMu4cg}{H2QpeTcfRdisOMuOP5_ahw}{}{} committed version [1] source [zen-disco-elected-as-master ([0] nodes joined)]]) [2018-07-29T17:02:17,642][INFO ][o.e.h.n.Netty4HttpServerTransport] [node-1] publish_address {}, bound_addresses {} [2018-07-29T17:02:17,642][INFO ][o.e.n.Node ] [node-1] started [2018-07-29T17:02:17,974][INFO ][o.e.g.GatewayService ] [node-1] recovered [0] indices into cluster_state
and this is my configfile

CONFIG1 mycluster node-1 9200 ["test001:9300", "test002:9301"]

CONFIG2 mycluster node-2 9201 ["test001:9300", "test002:9301"]

I'd check your name resolution.

I checked using hostname command so it gave that name.
but in doesn't work. any solutions?

If the nodes are deployed on different hosts, I would expect them to both listen to the default port 9300, not 9301.

From host1, can you do:

ping host2


So, I will change http.port: 9200, http.port: 9201 to http.port: 9300 right?

I did ping (private ip)
and result was fine.

That's not what I said.
I asked to ping host2 not its private IP.

Otherwise use the private IP instead host1 and host2 in elasticsearch configuration.

No. Ideally leave the ports to the default values.

If the nodes are running on different hosts, this should be: ["test001", "test002"]

ping host2 is not working.
so i changed host1 and host2 to private IP.
but it has different errors.

[2018-07-30T23:12:50,901][ERROR][o.e.b.Bootstrap          ] [node-1] Exception
org.elasticsearch.http.BindHttpException: Failed to bind to [9300]
Caused by: Address already in use
Caused by: org.elasticsearch.http.BindHttpException: Failed to bind to [9300]
Caused by: Address already in use
[2018-0`Preformatted text`7-30T23:12:50,952][WARN ][o.e.c.NodeConnectionsService] 
[node-1] failed to connect to node {node-2}{ol2uRDR6SUWzroPlwMnAaw}
{W0aR1bR0SBikxDHgnVCeJw}{}{} (tried [1] times)
 org.elasticsearch.transport.ConnectTransportException: [node-2][] connect_timeout[30s]
Caused by:$AnnotatedConnectException: Connection refused:
Caused by: Connection refused

Thanks your advice.

So, I changed ["test001", "test002"]
but it doesn't work. I changed private ip instead.
but it has Failed to bind to [9300]error.
and ports number is default.

Please format your code, logs or configuration files using </> icon as explained in this guide and not the citation button. It will make your post more readable.

Or use markdown style like:


This is the icon to use if you are not using markdown format:

There's a live preview panel for exactly this reasons.

Lots of people read these forums, and many of them will simply skip over a post that is difficult to read, because it's just too large an investment of their time to try and follow a wall of badly formatted text.
If your goal is to get an answer to your questions, it's in your interest to make it as easy to read and understand as possible.
Please update your post.

Here it sounds like you already have an elasticsearch running on port 9300.

My advice: start from scratch again. Just change settings which are absolutely needed like and

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