k8s部署es, 容器一直重启, 报错提示“Back-off restarting failed container“(1)

      claimName: es-pvc
  - name: es-config
    configMap:
      name: es

2. 重新部署, 容器不再退出, deployment状态保持green, 但es服务不可用(预料中, 因为改了command, 所以ES服务压根儿就没启), `kubectl exec -it <pod_name> -c <container_name> /bin/bash`进入容器, 手动执行`bash /usr/share/elasticsearch/bin/elasticsearch`命令启动ES服务, 查看到报错信息如下:



{
“@timestamp”: “2023-04-06T10:06:47.648Z”,
“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”: “node-1”,
“elasticsearch.cluster.name”: “my-cluster”,
“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.6.2/org.elasticsearch.env.NodeEnvironment.(NodeEnvironment.java:285)\n\tat org.elasticsearch.server@8.6.2/org.elasticsearch.node.Node.(Node.java:478)\n\tat org.elasticsearch.server@8.6.2/org.elasticsearch.node.Node.(Node.java:322)\n\tat org.elasticsearch.server@8.6.2/org.elasticsearch.bootstrap.ElasticsearchKaTeX parse error: Undefined control sequence: \n at position 33: …earch.java:214)\̲n̲\tat org.elasti…NodeLock.(NodeEnvironment.java:230)\n\tat org.elasticsearch.server@8.6.2/org.elasticsearch.env.NodeEnvironmentKaTeX parse error: Undefined control sequence: \n at position 42: …nment.java:198)\̲n̲\tat org.elasti…NodeLock.(NodeEnvironment.java:223)\n\t… 7 more\n”
}


挂载的路径`/usr/share/e
  • 17
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值