一、各个工作负载日志都提示许可过期

具体报错提示如下:

{"type":"server",","timestamp":"2025-02-07T09:41:30,472+08:00",","level":"ERROR
",","component":"o.e.x.s.a.f.SecurityActionListener",","cluster.name":"es-k8sprod-
cluster",","node.name":"es-data-03",","message":"blocking [cluster:monitor]node/stats]
 operation due to expired license. Cluster health, cluster stats and indices stats 
operations are blocked on licenses expiration. All data operations (read and write) 
continue to work. \nIf you have a new license, please update it. Otherwise, please 
reach out to your support contact.",
"cluster.uuid":"g64pcWKDR0Gv2pI_VrZh8w","node.id":"PUm2OCiZRVeb0FHhHmPhTw"}

{"type":"server",","timestamp":"2025-02-07T09:41:30,472+08:00",","level":"ERROR
",","component":"o.e.x.m.c.n.NodeStatsCollector",","cluster.name":"es-k8sprod-
cluster","node.name":"es-data-03",","message":"[cluster:node_stats] failed to 
collect data",","cluster.uuid":"g64pcWKDR0Gv2pI_VrZh8w","node.id":"PUm2OCiZRVeb0FHhHmPhTw"}

这就奇怪了,这个ES集群服务用了很久都没有提示过需要更新许可证,最初下载的时候是使用basic免费版的:

然后查阅相关资料后发现,应该是人误操作点了trial试用版。trial试用版仅提供30天的使用权限,在试用期内提供所有高级功能,试用结束后需要购买正式许可证。

许可过期了,kibana页面是访问不了的,提示网络服务错误:

可以先在任意工作负载的pod上查看当前集群的许可证信息:

[elasticsearch@es-data-01 ~]$ curl -X GET "http://localhost:9200/_license?pretty"

或

curl -X GET http://localhost:9200/_xpack/license

发现type为“trial”,可见当前ES是使用试用版许可证,已过了30天试用期:

 二、修改type

开启basic license(ES如没启用认证则删除 -u 往后的字符串):

curl -H "Content-type:application/json" -X POST http://localhost:9200/_xpack/license/start_basic?acknowledge=true -u username:password

再次查看集群的许可证信息,type已变为basic。

但是,打开kibana前端界面还是有异常提示“An internal server error occurred”,查看kibana的日志,报错提示kibana有部分的索引加载不了:

[plugins][usageCollection] Error: Saved object [index-pattern/index-pattern:] not found

三、重置kibana的索引

在任意工作负载的pod上查看kibana索引:

curl -X GET "http://localhost:9200/_alias/.kibana"

删除kibana索引:

curl -X DELETE "http://localhost:9200/.kibana_7.12.1_001"

删除后重启kibana服务,kibana就会自动重新创建 .kibana 索引了,kibana界面也能正常访问。

Logo

火山引擎开发者社区是火山引擎打造的AI技术生态平台,聚焦Agent与大模型开发,提供豆包系列模型(图像/视频/视觉)、智能分析与会话工具,并配套评测集、动手实验室及行业案例库。社区通过技术沙龙、挑战赛等活动促进开发者成长,新用户可领50万Tokens权益,助力构建智能应用。

更多推荐