问题一:Kibaba 启动失败

问题描述

在启动 Kibana 时,日志如下:


./kibana

log [06:40:49.881] [info][plugins-service] Plugin "case" is disabled.

log [06:40:55.314] [info][plugins-system] Setting up [37] plugins: [taskManager,siem,licensing,infra,encryptedSavedObjects,code,usageCollection,metrics,canvas,timelion,features,security,apm_oss,translations,reporting,uiActions,data,navigation,share,status_page,inspector,expressions,visualizations,embeddable,advancedUiActions,dashboard_embeddable_container,newsfeed,kibana_legacy,management,dev_tools,home,spaces,cloud,apm,graph,eui_utils,bfetch]

log [06:40:55.316] [info][plugins][taskManager] Setting up plugin

log [06:40:55.332] [info][plugins][siem] Setting up plugin

log [06:40:55.332] [info][licensing][plugins] Setting up plugin

log [06:40:55.335] [info][infra][plugins] Setting up plugin

log [06:40:55.335] [info][encryptedSavedObjects][plugins] Setting up plugin

log [06:40:55.336] [warning][config][encryptedSavedObjects][plugins] Generating a random key for xpack.encryptedSavedObjects.encryptionKey. To be able to decrypt encrypted saved objects attributes after restart, please set xpack.encryptedSavedObjects.encryptionKey in kibana.yml

log [06:40:55.340] [info][code][plugins] Setting up plugin

log [06:40:55.341] [info][plugins][usageCollection] Setting up plugin

log [06:40:55.342] [info][metrics][plugins] Setting up plugin

log [06:40:55.343] [info][canvas][plugins] Setting up plugin

log [06:40:55.349] [info][plugins][timelion] Setting up plugin

log [06:40:55.350] [info][features][plugins] Setting up plugin

log [06:40:55.351] [info][plugins][security] Setting up plugin

log [06:40:55.352] [warning][config][plugins][security] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in kibana.yml

log [06:40:55.353] [warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.

log [06:40:55.371] [info][apm_oss][plugins] Setting up plugin

log [06:40:55.371] [info][plugins][translations] Setting up plugin

log [06:40:55.372] [info][data][plugins] Setting up plugin

log [06:40:55.378] [info][plugins][share] Setting up plugin

log [06:40:55.379] [info][home][plugins] Setting up plugin

log [06:40:55.383] [info][plugins][spaces] Setting up plugin

log [06:40:55.387] [info][cloud][plugins] Setting up plugin

log [06:40:55.387] [info][apm][plugins] Setting up plugin

log [06:40:55.391] [info][graph][plugins] Setting up plugin

log [06:40:55.395] [info][bfetch][plugins] Setting up plugin

log [06:40:55.404] [info][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...

log [06:40:55.423] [info][savedobjects-service] Starting saved objects migrations

log [06:40:55.455] [info][savedobjects-service] Creating index .kibana_2.

log [06:40:55.463] [warning][savedobjects-service] Unable to connect to Elasticsearch. Error: [resource_already_exists_exception] index [.kibana_2/kFVxpf8ERHa37HcqryX9FA] already exists, with { index_uuid="kFVxpf8ERHa37HcqryX9FA" & index=".kibana_2" }

log [06:40:55.464] [warning][savedobjects-service] Another Kibana instance appears to be migrating the index. Waiting for that migration to complete. If no other Kibana instance is attempting migrations, you can get past this message by deleting index .kibana_2 and restarting Kibana.

此时打开 http://localhost:5601/,报如下错误信息,


Kibana server is not ready yet

解决方案

网上有各种各样的解决方案,但是都不太适用。查看一下错误日志,发现有如下错误日志:


log [06:40:55.464] [warning][savedobjects-service] Another Kibana instance appears to be migrating the index. Waiting for that migration to complete. If no other Kibana instance is attempting migrations, you can get past this message by deleting index .kibana_2 and restarting Kibana.

利用 elasticsearch-head 插件去查看一下索引,发现果然有 .kibana_2 索引,并且还有其他以 .kibana 开头的索引,将这些索引都删除了。

重新执行启动命令 ./kibana

Kibana 正常运行。

小结

导致上述问题的原因可能千奇百怪,各种方法都验证一下,直到找到自己的解决方案。

本作品采用《CC 协议》,转载必须注明作者和本文链接
讨论数量: 0
(= ̄ω ̄=)··· 暂无内容!

请勿发布不友善或者负能量的内容。与人为善,比聪明更重要!