Failed to obtain node locks, tried [/usr/share/elasticsearch/data]

Hello Team,
I have installed ECK Operator(v2.11.1). Installation of the operator is successful. If I am creating Elasticsearch cluster via an operator, pods are getting crashed with following error:

{"@timestamp":"2024-02-12T20:52:58.133Z", "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":"quickstart-es-default-0","elasticsearch.cluster.name":"quickstart","error.type":"java.lang.IllegalStateException","error.message":"failed to obtain node locks, tried [/usr/share/elasticsearch/data]; maybe these locations are not writable or multiple nodes were started on the same data path?","error.stack_trace":"java.lang.IllegalStateException: failed to obtain node locks, tried [/usr/share/elasticsearch/data]; maybe these locations are not writable or multiple nodes were started on the same data path?\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:296)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.node.NodeConstruction.validateSettings(NodeConstruction.java:484)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.node.NodeConstruction.prepareConstruction(NodeConstruction.java:246)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.node.Node.(Node.java:181)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.bootstrap.Elasticsearch$2.(Elasticsearch.java:236)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.bootstrap.Elasticsearch.initPhase3(Elasticsearch.java:236)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:73)\nCaused by: java.io.IOException: failed to obtain lock on /usr/share/elasticsearch/data\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:241)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:209)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:288)\n\t... 6 more\nCaused by: java.nio.file.NoSuchFileException: /usr/share/elasticsearch/data/node.lock\n\tat java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)\n\tat java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)\n\tat java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)\n\tat java.base/sun.nio.fs.UnixPath.toRealPath(UnixPath.java:834)\n\tat org.apache.lucene.core@9.9.2/org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:94)\n\tat org.apache.lucene.core@9.9.2/org.apache.lucene.store.FSLockFactory.obtainLock(FSLockFactory.java:43)\n\tat org.apache.lucene.core@9.9.2/org.apache.lucene.store.BaseDirectory.obtainLock(BaseDirectory.java:44)\n\tat org.elasticsearch.server@8.12.1/org.elasticsearch.env.NodeEnvironment$NodeLock.(NodeEnvironment.java:234)\n\t... 8 more\n\tSuppressed: java.nio.file.AccessDeniedException: /usr/share/elasticsearch/data/node.lock\n\t\tat java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:90)\n\t\tat java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106)\n\t\tat java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)\n\t\tat java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:261)\n\t\tat java.base/java.nio.file.Files.newByteChannel(Files.java:379)\n\t\tat java.base/java.nio.file.Files.createFile(Files.java:657)\n\t\tat org.apache.lucene.core@9.9.2/org.apache.lucene.store.NativeFSLockFactory.obtainFSLock(NativeFSLockFactory.java:84)\n\t\t... 11 more\n"}

What did you expect to see?
Should be able to install Elasticsearch cluster
What did you see instead? Under which circumstances?
Elasticsearch pod enters crash loop and the error provided is generated.
Environment

  • ECK version:
    2.11.1
  • Kubernetes information
    • MicroK8s 1.28.3