# Elasticsearch not working after Upgrading from version 7.17 to 8.5.1 (Using Helm Chart)

**URL:** <https://discuss.elastic.co/t/elasticsearch-not-working-after-upgrading-from-version-7-17-to-8-5-1-using-helm-chart/334639>\
**Category:** Elasticsearch\
**Tags:** docker\
**Created:** [May 30, 2023, 6:30am UTC](https://discuss.elastic.co/t/elasticsearch-not-working-after-upgrading-from-version-7-17-to-8-5-1-using-helm-chart/334639 "2023-05-30T06:30:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![devbrat9415](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/devbrat9415/32/121578_2.png) [@devbrat9415](https://discuss.elastic.co/u/devbrat9415)\
**Post date:** [May 30, 2023, 6:30am UTC](https://discuss.elastic.co/t/elasticsearch-not-working-after-upgrading-from-version-7-17-to-8-5-1-using-helm-chart/334639/1 "2023-05-30T06:30:46Z")

</div>

We are upgrading Elasticsearch version 7.17 to 8.5.1 to Kubernetes along with logstash and Kibana . We don't necessary want to remove **PVC** , because it will lead to a data loss. While upgrading we continuously getting ERROR in master nodes as below :

"log.level":"ERROR", "message":"fatal exception while booting Elasticsearch", "ecs.version": "1.2.0","service.name":"ES\_ECS","event.dataset":"elasticsearch.server","process.thread.name":"main","log.logger":"org.elasticsearch.bootstrap.Elasticsearch","elasticsearch.node.name":"elasticsearch-master-0","elasticsearch.cluster.name":"elasticsearch","error.type":"java.lang.IllegalStateException","error.message":"node does not have the data role but has shard data: [/usr/share/elasticsearch/data/indices/yl7n8CeDTqGmVBMRNMrCRQ/0, /usr/share/elasticsearch/data/indices/cnOc-7LRQeGXVF1gFdSAlw/0, /usr/share/elasticsearch/data/indices/sakNU1p-QbSnaJR5Q\_HqMQ/0, /usr/share/elasticsearch/data/indices/O91BqBguQtWgjUCHa1BPFg/0]. Use 'elasticsearch-node repurpose' tool to clean up","error.stack\_trace":"java.lang.IllegalStateException: node does not have the data role but has shard data: [/usr/share/elasticsearch/data/indices/yl7n8CeDTqGmVBMRNMrCRQ/0, /usr/share/elasticsearch/data/indices/cnOc-7LRQeGXVF1gFdSAlw/0, /usr/share/elasticsearch/data/indices/sakNU1p-QbSnaJR5Q\_HqMQ/0, /usr/share/elasticsearch/data/indices/O91BqBguQtWgjUCHa1BPFg/0]. Use 'elasticsearch-node repurpose' tool to clean up\n\tat org.elasticsearch.server@8.5.1/org.elasticsearch.env.NodeEnvironment.ensureNoShardData(NodeEnvironment.java:1296)\n\tat org.elasticsearch.server@8.5.1/org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:323)\n\tat org.elasticsearch.server@8.5.1/org.elasticsearch.node.Node.(Node.java:474)\n\tat org.elasticsearch.server@8.5.1/org.elasticsearch.node.Node.(Node.java:318)\n\tat org.elasticsearch.server@8.5.1/org.elasticsearch.bootstrap.Elasticsearch$2.(Elasticsearch.java:214)\n\tat org.elasticsearch.server@8.5.1/org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:214)\n\tat org.elasticsearch.server@8.5.1/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:67)\n"}

We have separate statefulsets for elasticsearch master and data , please find the details below :

clusterName: elasticsearch  
nodeGroup: master  
masterService: elasticsearch  
roles: master  
replicas: 3  
esConfig:  
elasticsearch.yml: \>  
network.host: 0.0.0.0  
transport.host: 0.0.0.0  
xpack.security.enabled: true  
xpack.monitoring.collection.enabled: true  
xpack.security.transport.ssl.enabled: true  
xpack.security.transport.ssl.verification\_mode: certificate  
xpack.security.transport.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12  
xpack.security.transport.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12  
xpack.security.http.ssl.enabled: true  
xpack.security.http.ssl.truststore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12  
xpack.security.http.ssl.keystore.path: /usr/share/elasticsearch/config/certs/elastic-certificates.p12  
action.auto\_create\_index: true  
action.destructive\_requires\_name: true  
esJvmOptions: {}  
envFrom:   
secretMounts:

- name: elastic-certificates-p12  
secretName: elastic-certificates-p12  
path: /usr/share/elasticsearch/config/certs  
hostAliases:   
image: [docker.elastic.co/elasticsearch/elasticsearch](http://docker.elastic.co/elasticsearch/elasticsearch)  
imageTag: 8.5.1  
imagePullPolicy: IfNotPresent  
podAnnotations:  
[traffic.sidecar.istio.io/excludeInboundPorts:](http://traffic.sidecar.istio.io/excludeInboundPorts:) "9300"  
[traffic.sidecar.istio.io/excludeOutboundPorts:](http://traffic.sidecar.istio.io/excludeOutboundPorts:) "9300"  
labels: {}  
esJavaOpts: ""  
serviceAccountAnnotations: {}  
serviceAccountName: ""  
automountToken: false  
podSecurityPolicy:  
create: false  
name: ""  
spec:  
privileged: true  
persistence:  
enabled: true  
labels:  
enabled: false  
annotations: {}  
antiAffinityTopologyKey: [kubernetes.io/hostname](http://kubernetes.io/hostname)  
antiAffinity: hard  
nodeAffinity: {}  
podManagementPolicy: Parallel  
enableServiceLinks: true  
protocol: https  
httpPort: 9200  
transportPort: 9300  
service:  
enabled: true  
labels: {}  
labelsHeadless: {}  
type: ClusterIP  
publishNotReadyAddresses: false  
nodePort: ""  
annotations: {}  
httpPortName: http  
transportPortName: transport  
loadBalancerIP: ""  
loadBalancerSourceRanges:   
externalTrafficPolicy: ""  
updateStrategy: RollingUpdate  
maxUnavailable: 1  
nodeSelector:  
env: dev-node  
tolerations:   
ingress:  
hosts:
  - host: chart-example.local  
paths:
    - path: /  
lifecycle: {}  
sysctlInitContainer:  
enabled: false  
networkPolicy:  
http:  
enabled: false  
transport:  
enabled: false  
tests:  
enabled: false

Do you have any idea why were are getting the Error while upgrading without PVC ?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [June 27, 2023, 6:31am UTC](https://discuss.elastic.co/t/elasticsearch-not-working-after-upgrading-from-version-7-17-to-8-5-1-using-helm-chart/334639/2 "2023-06-27T06:31:08Z")

</div>

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