Elasticsearch 7.8.1 on Openshift 4.5 - 3 Pods
Hi,
Can you please help on below error:
"message": "master not discovered yet, this node has not previously joined a bootstrapped (v7+) cluster, and [ ] is empty on this node: have discovered [{es-cluster-0}
elastic-app.yaml
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: es-cluster
namespace: infra
spec:
serviceName: elasticsearch
replicas: 3
selector:
matchLabels:
app: elasticsearch
template:
metadata:
labels:
app: elasticsearch
spec:
containers:
- name: elasticsearch
image: <image URL>/elasticsearch:7.8.1
resources:
limits:
cpu: 1000m
memory: 4Gi
requests:
cpu: 100m
memory: 1Gi
ports:
- containerPort: 9200
name: rest
protocol: TCP
targetPort: 9200
- containerPort: 9300
name: inter-node
protocol: TCP
volumeMounts:
- name: data
mountPath: /usr/share/elasticsearch/data
env:
- name: cluster.name
value: infra-efk
- name: node.name
valueFrom:
fieldRef:
fieldPath: metadata.name
#- name: discovery.zen.ping.unicast.hosts
# value: "es-cluster-0.elasticsearch,es-cluster-1.elasticsearch,es-cluster-2.elasticsearch"
- name: discovery.zen.ping_timeout
value: "60s"
- name: discovery.seed_hosts
value: "es-cluster-0.elasticsearch,es-cluster-1.elasticsearch,es-cluster-2.elasticsearch"
- name: discovery.zen.minimum_master_nodes
value: "3"
- name: cluster.initial_master_nodes
value: "es-cluster-0.elasticsearch,es-cluster-1.elasticsearch,es-cluster-2.elasticsearch"
- name: ES_JAVA_OPTS
value: "-Xms512m -Xmx512m"
# - name: logger.org.elasticsearch
# value: TRACE
- name: logger.org.elasticsearch.discovery
value: TRACE
volumeClaimTemplates:
- metadata:
name: data
labels:
app: elasticsearch
spec:
accessModes: [ "ReadWriteOnce" ]
storageClassName: px-block-replicated
resources:
requests:
storage: 10Gi
px-elastic-svc.yaml
kind: Service
apiVersion: v1
metadata:
name: elasticsearch
labels:
app: elasticsearch
spec:
selector:
app: elasticsearch
clusterIP: None
ports:
- port: 9200
name: rest
- port: 9300
name: inter-node
Here are the trace logs:
https://controlc.com/11f0dfed
-
curl on port 9200 is working fine with just elasticsearch version information.
-
curl on port 9200 is not working if cluster pretty print is asked giving error master node not found kind of exception. I don't have the exact exception with me.
-
telnet from one node to other node on port 9200 and 9300 is working fine as well. I have tested between multiple nodes.
Can you please help with the issue as the master node is not getting recognized at all?
Reference URL for the cluster: https://www.digitalocean.com/community/tutorials/how-to-set-up-an-elasticsearch-fluentd-and-kibana-efk-logging-stack-on-kubernetes