Hello everyone.
I intend to send the weather data collected by a raspberry pie on ec2 instances hosting elasticsearch to view the temperature graphs on kibana. My idea is to make a comparison between the internal temperature recorded periodically by the raspberry and the external one recorded via API to the weather site and draw the relative graphs. I currently have a master node to which I would like to add two data nodes. I have followed several guides but every time I restart the elasticsearch service with a different configuration than the initial one, elasticsearch crashes. Do you have any guides to recommend?
Which data shippers do you recommend to install on the raspberry pi?
Welcome to our community!
What version are you running?
Definitely Filebeat if you are using ARM64.
Thank you! I'm running Elastcisearch 7.10.0
"Elasticsearch crashes" could mean any of a number of different things, so it's hard to help you get past this. Can you be more precise? In particular, what does it log before "crashing"?
Sorry, I did not properly configure the elasticsearch.yml file
Now i am able to run elasticsearch service but i can't add a node in my cluster.
Below the configurations of the master node and the slave node, I hope someone can help me:
Both nodes are running on AWS, in the same VPC. They can ping each other and i can use
curl http://indirizzoIPv4:9200 to get information about master node on the slave node.
Master node configuration IP:172.31.36.3
cluster.name: my-cluster
node.name: master
network.host : "172.31.36.3"
http.port: 9200
discovery.seed_hosts: ["172.31.36.3", "172.31.32.226"]
cluster.initial_master_nodes: ["172.31.36.3"]
node.master: true
Slave node configuration IP:172.31.32.226
cluster.name: my-cluster
node.name: data1
network.host : "172.31.32.226"
http.port: 9200
discovery.seed_hosts: ["172.31.36.3", "172.31.32.226"]
cluster.initial_master_nodes: ["172.31.36.3"]
node.data: true
curl -X GET http://172.31.36.3:9200/_cluster/health?pretty and i got
{
"cluster_name" : "my-cluster",
"status" : "green",
"timed_out" : false,
"number_of_nodes" : 1,
"number_of_data_nodes" : 1,
"active_primary_shards" : 0,
"active_shards" : 0,
"relocating_shards" : 0,
"initializing_shards" : 0,
"unassigned_shards" : 0,
"delayed_unassigned_shards" : 0,
"number_of_pending_tasks" : 0,
"number_of_in_flight_fetch" : 0,
"task_max_waiting_in_queue_millis" : 0,
"active_shards_percent_as_number" : 100.0
}
Please don't call them "slave" nodes, that's not a meaningful word in terms of Elasticsearch and is a bit offensive.
What does GET /
return on each node? I.e. please share the output of both curl http://172.31.36.3:9200/
and curl http://172.31.32.226:9200/
.
Sorry, I won't call them that anymore
curl http://172.31.36.3:9200/
{
"name" : "master",
"cluster_name" : "my-cluster",
"cluster_uuid" : "PvDRqvxVTEyYBjbeJtULog",
"version" : {
"number" : "7.10.0",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "51e9d6f22758d0374a0f3f5c6e8f3a7997850f96",
"build_date" : "2020-11-09T21:30:33.964949Z",
"build_snapshot" : false,
"lucene_version" : "8.7.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
curl http://172.31.32.226:9200/
{
"name" : "data1",
"cluster_name" : "my-cluster",
"cluster_uuid" : "pWMAOOpQRY-vdDBTv7eOYA",
"version" : {
"number" : "7.10.0",
"build_flavor" : "default",
"build_type" : "rpm",
"build_hash" : "51e9d6f22758d0374a0f3f5c6e8f3a7997850f96",
"build_date" : "2020-11-09T21:30:33.964949Z",
"build_snapshot" : false,
"lucene_version" : "8.7.0",
"minimum_wire_compatibility_version" : "6.8.0",
"minimum_index_compatibility_version" : "6.0.0-beta1"
},
"tagline" : "You Know, for Search"
}
Thanks
The mismatched cluster UUIDs means you didn't set cluster.initial_master_nodes
before starting these nodes up for the first time, so you've generated two independent clusters. There's more details in the manual but the solution is to wipe both these nodes and start again from scratch with cluster.initial_master_nodes
set.
Also note that cluster.initial_master_nodes
should be the node.name
of the master, not its IP address.
I really thank you, without your help I would never have found the mistake. I did as you told me and created my first cluster on Elasticsearch!
Congratulations!
You are very welcome to experiment with all sorts of different cluster setups, but you might like to read the advice in the reference manual regarding two-node clusters. In particular:
If you have two nodes, we recommend they both be data nodes.
and
Because it’s not resilient to failures, we do not recommend deploying a two-node cluster in production.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.