Adding node locally for dev on macos

I'm trying to run a local dev cluster with two nodes. I know ideally three is recommended but I'm troubleshooting the network errors that I'm getting. I may be confusing myself with the transport ssl certs for the cluster. However, I copied the master cert-stack and shared it to data node that I'm adding to the cluster. In the docs states you could create cert per node but in a cluster, master node provisions the security for cluster of nodes. Hence, security xpack would then be false and perhaps isn't a best security practice to share the master-cert-stack with data node in production. There error that I'm getting is (master node)

[node-ma] failed to validate incoming join request from node [{node-1-dev}{_tMuNjv3RA2pOxhDe6ykjQ}{g0-XxZVUQx-dYNm_YF1kpQ}{localhost}{}{xpack.installed=true}]
org.elasticsearch.transport.NodeNotConnectedException: [node-1-dev][] Node not connected
 at org.elasticsearch.transport.ConnectionManager.getConnection( ~[elasticsearch-7.1.1.jar:7.1.1]
 at org.elasticsearch.transport.TransportService.getConnection( ~[elasticsearch-7.1.1.jar:7.1.1]
 at org.elasticsearch.transport.TransportService.sendRequest( [elasticsearch-7.1.1.jar:7.1.1]

data node error logs

 [2019-06-10T16:19:36,789][INFO ][o.e.c.c.JoinHelper] [node-1-dev] failed to join {node-ma}{1D9FZ5aoQF2qnxEUtiikLw}{1dvQIpVtRTiwA2xoMnOl-w}{localhost}{}
{ml.machine_memory=17179869184, ml.max_open_jobs=20, xpack.installed=true} with JoinRequest{sourceNode={node-1-dev}{_tMuNjv3RA2pOxhDe6ykjQ}{g0-XxZVUQx-dYNm_YF1kpQ}{localhost}{}
{xpack.installed=true}, optionalJoin=Optional[Join{term=818, lastAcceptedTerm=2, lastAcceptedVersion=18, sourceNode={node-1-dev}
{xpack.installed=true}, targetNode={node-ma}{1D9FZ5aoQF2qnxEUtiikLw{1dvQIpVtRTiwA2xoMnOl-w}{localhost}{}{ml.machine_memory=17179869184, ml.max_open_jobs=20, xpack.installed=true}}]}

master node elasticsearch.yml local-dev
 node.master: true true
 node.ingest: false false localhost
 transport.tcp.port: 9300 ["localhost:9301"]
 discovery.zen.minimum_master_nodes: 1 true true certificate elastic-certificates.p12 elastic-certificates.p12    

data node elastisearch.yml local-dev node-1-dev
 node.master: false true
 node.ingest: false false localhost
 transport.tcp.port: 9301 ["localhost:9300"] 
 discovery.zen.minimum_master_nodes: 1 true true certificate elastic-stack-certificates-master.p12 elastic-stack-certificates-master.p12

Ok I have fixed this. The problem was that I did not add to the elasticsearch.yml _local_ 
  cluster.initial_master_nodes: ["node-ma"]["localhost"] true

and cp cert from master to data-node

for the master node I removed the discovery and changed network_host: local , commented out transport.tcp.port, discovery.zen.minimum_master_nodes: 1 didn't need it for a two node anything 3 nodes or bigger will need this settings
for local dev discovery is local by default

This was for testing purposes to keep the cost of dev to a bare minimum while learning. The dev was local.

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