# Crashback loop off in ECK when using PVC elasticsearch-data

**URL:** <https://discuss.elastic.co/t/crashback-loop-off-in-eck-when-using-pvc-elasticsearch-data/246879>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [August 30, 2020, 12:40pm UTC](https://discuss.elastic.co/t/crashback-loop-off-in-eck-when-using-pvc-elasticsearch-data/246879 "2020-08-30T12:40:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![amanjain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amanjain/32/46385_2.png) [@amanjain](https://discuss.elastic.co/u/amanjain)\
**Post date:** [August 30, 2020, 12:40pm UTC](https://discuss.elastic.co/t/crashback-loop-off-in-eck-when-using-pvc-elasticsearch-data/246879/1 "2020-08-30T12:40:06Z")

</div>

Hello

I am trying to use PVC as given in documentation [here](https://www.elastic.co/guide/en/cloud-on-k8s/master/k8s-volume-claim-templates.html). But it seems to throw the below error.  
Error

```auto
2020-08-30 12:32:59,896 main ERROR No Log4j 2 configuration file found. Using default configuration (logging only errors to the console), or user programmatically provided configurations. Set system property 'log4j2.debug' to show Log4j 2 internal initialization logging. See https://logging.apache.org/log4j/2.x/manual/configuration.html for instructions on how to configure Log4j 2
Exception in thread "main" SettingsException[Failed to load settings from [elasticsearch.yml]]; nested: IllegalStateException[only value lists are allowed in serialized settings];
	at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1139)
	at org.elasticsearch.common.settings.Settings$Builder.loadFromPath(Settings.java:1112)
	at org.elasticsearch.node.InternalSettingsPreparer.prepareEnvironment(InternalSettingsPreparer.java:100)
	at org.elasticsearch.cli.EnvironmentAwareCommand.createEnv(EnvironmentAwareCommand.java:95)
	at org.elasticsearch.cli.EnvironmentAwareCommand.execute(EnvironmentAwareCommand.java:86)
	at org.elasticsearch.cli.Command.mainWithoutErrorHandling(Command.java:124)
	at org.elasticsearch.cli.Command.main(Command.java:90)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:116)
	at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:93)
Caused by: java.lang.IllegalStateException: only value lists are allowed in serialized settings
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:692)
	at org.elasticsearch.common.settings.Settings.fromXContent(Settings.java:650)
	at org.elasticsearch.common.settings.Settings.access$500(Settings.java:82)
	at org.elasticsearch.common.settings.Settings$Builder.loadFromStream(Settings.java:1135)
	... 8 more

```

My elasticsearch yaml looks like this.

```auto
nodeSets:
  - name: masters-zone-a
    count: 3
    config:
      node.master: true
      node.data: false
      node.ingest: false
      volumeClaimTemplates:
      - metadata:
          name: elasticsearch-data
        spec:
          accessModes:
          - ReadWriteOnce
          resources:
            requests:
              storage: 5Gi
          storageClassName: standard
    podTemplate:
      spec:
        initContainers:
        - name: sysctl
          securityContext:
            privileged: true
          command: ['sh', '-c', 'sysctl -w vm.max_map_count=262144']
        containers:
        - name: elasticsearch
          env:
          - name: PROCESSORS
            valueFrom:
              resourceFieldRef:
                divisor: "0"
                resource: limits.cpu
          - name: ES_JAVA_OPTS
            value: '-Djava.net.preferIPv4Stack=true -Xms512m -Xmx512m '
          - name: MINIMUM_MASTER_NODES
            value: "2"
          resources:
            requests:
              cpu: 200m
              memory: 3Gi
            limits:
              cpu: 500m
              memory: 3Gi
          volumeMounts:
          - mountPath: /usr/share/elasticsearch/config/jvm.options
            name: config
            subPath: jvm.options
          - mountPath: /usr/share/elasticsearch/config/log4j2.properties
            name: config
            subPath: log4j2.properties
        volumes:
        - configMap:
            name: elasticsearch-config
          name: config

```

I have already applied my elasticsearch-config as configmap but still this error is happening. Can anyone please help me understand the error.

---

<div class="post-metadata">

**Author:** ![pebrc](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pebrc/32/101790_2.png) [@pebrc](https://discuss.elastic.co/u/pebrc)\
**Post date:** [August 31, 2020, 7:19am UTC](https://discuss.elastic.co/t/crashback-loop-off-in-eck-when-using-pvc-elasticsearch-data/246879/2 "2020-08-31T07:19:23Z")

</div>

The `config` attribute must only contain configuration that goes into `elasticsearch.yml` you also put the `volumeClaimTemplate` in there which is a Kubernetes thing, so it needs to go one level up:

```auto
nodeSets:
  - name: masters-zone-a
    count: 3
    config:
      node.master: true
      node.data: false
      node.ingest: false
    volumeClaimTemplates:
    - metadata:
         name: elasticsearch-data
      spec:
        accessModes:
        - ReadWriteOnce
        resources:
          requests
            storage: 5Gi
        storageClassName: standard

```

---

<div class="post-metadata">

**Author:** ![amanjain](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amanjain/32/46385_2.png) [@amanjain](https://discuss.elastic.co/u/amanjain)\
**Post date:** [August 31, 2020, 7:46am UTC](https://discuss.elastic.co/t/crashback-loop-off-in-eck-when-using-pvc-elasticsearch-data/246879/3 "2020-08-31T07:46:58Z")

</div>

Thanks @pebrc  
It was indentation typo.

---

<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:** [September 28, 2020, 7:47am UTC](https://discuss.elastic.co/t/crashback-loop-off-in-eck-when-using-pvc-elasticsearch-data/246879/4 "2020-09-28T07:47:08Z")

</div>

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