Kibana无法启动 kibana_task_manager search_phase_execution_exception 问题解决

news/2024/12/29 5:11:29/

今天服务器重启以后,发现无法启动Kibana服务了,在网上也是把错误搜索了半天,尝试了那些命令,但是执行删除命令时居然报错了。后来,仔细观察后,发现是删除方式不太正确,需要改一下删除命令才能正确执行,在这里就记录一下解决办法。

环境信息:

ES版本:8.1.2
Kibana版本:8.1.2

问题现象
  • 启动时异常信息如下:(主要看那几行 ERROR 类型的)
[2023-10-30T18:05:45.132+08:00][INFO ][plugins-service] Plugin "metricsEntities" is disabled.
[2023-10-30T18:05:45.565+08:00][INFO ][http.server.Preboot] http server running at http://192.168.24.215:5601
[2023-10-30T18:05:46.012+08:00][INFO ][plugins-system.preboot] Setting up [1] plugins: [interactiveSetup]
[2023-10-30T18:05:46.021+08:00][INFO ][preboot] "interactiveSetup" plugin is holding setup: Validating Elasticsearch connection configuration…
[2023-10-30T18:05:46.076+08:00][INFO ][root] Holding setup until preboot stage is completed.
[2023-10-30T18:05:46.129+08:00][WARN ][config.deprecation] The default mechanism for Reporting privileges will work differently in future versions, which will affect the behavior of this cluster. Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.
[2023-10-30T18:05:46.896+08:00][INFO ][plugins-system.standard] Setting up [112] plugins: [translations,licensing,globalSearch,globalSearchProviders,features,mapsEms,licenseApiGuard,usageCollection,taskManager,telemetryCollectionManager,telemetryCollectionXpack,kibanaUsageCollection,sharedUX,share,embeddable,uiActionsEnhanced,screenshotMode,screenshotting,banners,telemetry,newsfeed,fieldFormats,expressions,dataViews,charts,esUiShared,bfetch,data,savedObjects,presentationUtil,expressionShape,expressionRevealImage,expressionRepeatImage,expressionMetric,expressionImage,customIntegrations,home,searchprofiler,painlessLab,grokdebugger,management,watcher,licenseManagement,advancedSettings,spaces,security,savedObjectsTagging,reporting,lists,fileUpload,ingestPipelines,encryptedSavedObjects,dataEnhanced,cloud,snapshotRestore,eventLog,actions,alerting,triggersActionsUi,transform,stackAlerts,ruleRegistry,savedObjectsManagement,console,controls,graph,fleet,indexManagement,remoteClusters,crossClusterReplication,indexLifecycleManagement,visualizations,canvas,visTypeXy,visTypeVislib,visTypeVega,visTypeTimeseries,rollup,visTypeTimelion,visTypeTagcloud,visTypeTable,visTypeMetric,visTypeHeatmap,visTypeMarkdown,dashboard,maps,dashboardEnhanced,expressionTagcloud,expressionPie,visTypePie,expressionMetricVis,expressionHeatmap,expressionGauge,dataViewFieldEditor,lens,cases,timelines,discover,osquery,observability,discoverEnhanced,dataVisualizer,ml,uptime,securitySolution,infra,upgradeAssistant,monitoring,logstash,enterpriseSearch,apm,dataViewManagement]
[2023-10-30T18:05:46.934+08:00][INFO ][plugins.taskManager] TaskManager is identified by the Kibana UUID: 1acef6b9-4d10-41ef-a740-f83d68d1a73c
[2023-10-30T18:05:47.282+08:00][WARN ][plugins.security.config] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
[2023-10-30T18:05:47.283+08:00][WARN ][plugins.security.config] Session cookies will be transmitted over insecure connections. This is not recommended.
[2023-10-30T18:05:47.321+08:00][WARN ][plugins.security.config] Generating a random key for xpack.security.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.security.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
[2023-10-30T18:05:47.322+08:00][WARN ][plugins.security.config] Session cookies will be transmitted over insecure connections. This is not recommended.
[2023-10-30T18:05:47.345+08:00][WARN ][plugins.reporting.config] Generating a random key for xpack.reporting.encryptionKey. To prevent sessions from being invalidated on restart, please set xpack.reporting.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
[2023-10-30T18:05:47.366+08:00][WARN ][plugins.encryptedSavedObjects] Saved objects encryption key is not set. This will severely limit Kibana functionality. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
[2023-10-30T18:05:47.387+08:00][WARN ][plugins.actions] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
[2023-10-30T18:05:47.409+08:00][WARN ][plugins.alerting] APIs are disabled because the Encrypted Saved Objects plugin is missing encryption key. Please set xpack.encryptedSavedObjects.encryptionKey in the kibana.yml or use the bin/kibana-encryption-keys command.
[2023-10-30T18:05:47.435+08:00][INFO ][plugins.ruleRegistry] Installing common resources shared between all indices
[2023-10-30T18:05:48.379+08:00][INFO ][plugins.screenshotting.config] Chromium sandbox provides an additional layer of protection, and is supported for Linux Ubuntu 20.04 OS. Automatically enabling Chromium sandbox.
[2023-10-30T18:05:49.630+08:00][INFO ][savedobjects-service] Waiting until all Elasticsearch nodes are compatible with Kibana before starting saved objects migrations...
[2023-10-30T18:05:49.630+08:00][INFO ][savedobjects-service] Starting saved objects migrations
[2023-10-30T18:05:50.673+08:00][INFO ][savedobjects-service] [.kibana] INIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 986ms.
[2023-10-30T18:05:51.616+08:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_READ. took: 943ms.
[2023-10-30T18:05:52.158+08:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_READ -> OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT. took: 542ms.
[2023-10-30T18:05:52.163+08:00][INFO ][savedobjects-service] [.kibana_task_manager] INIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 2471ms.
[2023-10-30T18:05:52.467+08:00][INFO ][savedobjects-service] [.kibana] OUTDATED_DOCUMENTS_SEARCH_CLOSE_PIT -> UPDATE_TARGET_MAPPINGS. took: 309ms.
[2023-10-30T18:05:52.844+08:00][INFO ][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS -> UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK. took: 377ms.
[2023-10-30T18:05:52.879+08:00][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'search_phase_execution_exception: '. Retrying attempt 1 in 2 seconds.
[2023-10-30T18:05:52.880+08:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 716ms.
[2023-10-30T18:05:53.918+08:00][INFO ][savedobjects-service] [.kibana] UPDATE_TARGET_MAPPINGS_WAIT_FOR_TASK -> DONE. took: 1074ms.
[2023-10-30T18:05:53.919+08:00][INFO ][savedobjects-service] [.kibana] Migration completed after 4232ms
[2023-10-30T18:05:55.140+08:00][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'search_phase_execution_exception: '. Retrying attempt 2 in 4 seconds.
[2023-10-30T18:05:55.141+08:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 2261ms.
[2023-10-30T18:05:55.384+08:00][INFO ][plugins.screenshotting.chromium] Browser executable: /kibana-8.1.2/x-pack/plugins/screenshotting/chromium/headless_shell-linux_x64/headless_shell
[2023-10-30T18:05:59.177+08:00][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'search_phase_execution_exception: '. Retrying attempt 3 in 8 seconds.
[2023-10-30T18:05:59.178+08:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 4037ms.
[2023-10-30T18:06:07.214+08:00][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'search_phase_execution_exception: '. Retrying attempt 4 in 16 seconds.
[2023-10-30T18:06:07.214+08:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 8036ms.
[2023-10-30T18:06:23.249+08:00][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'search_phase_execution_exception: '. Retrying attempt 5 in 32 seconds.
[2023-10-30T18:06:23.249+08:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 16036ms.
[2023-10-30T18:06:55.288+08:00][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'search_phase_execution_exception: '. Retrying attempt 6 in 64 seconds.
[2023-10-30T18:06:55.290+08:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 32039ms.
[2023-10-30T18:07:59.695+08:00][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'search_phase_execution_exception: '. Retrying attempt 7 in 64 seconds.
[2023-10-30T18:07:59.696+08:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 64407ms.
[2023-10-30T18:09:03.910+08:00][ERROR][savedobjects-service] [.kibana_task_manager] Action failed with 'search_phase_execution_exception: '. Retrying attempt 8 in 64 seconds.
[2023-10-30T18:09:03.911+08:00][INFO ][savedobjects-service] [.kibana_task_manager] OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT -> OUTDATED_DOCUMENTS_SEARCH_OPEN_PIT. took: 64215ms.
排查与解决
  1. 查看当前ES aliases 中是否存在 .kibana 开头的数据
curl http://localhost:9200/_cat/aliases | grep kibana

结果示例:

.kibana                    .kibana_8.1.2_001                      - - - -
.kibana_8.1.2              .kibana_8.1.2_001                      - - - -
.kibana_task_manager       .kibana_task_manager_8.1.2_001         - - - -
.kibana_task_manager_8.1.2 .kibana_task_manager_8.1.2_001         - - - -

有的博文写的直接用这个命令来删除 aliases ,其实是会报错的。

curl -X DELETE http://localhost:9200/.kibana*

错误信息一般这个样子:

{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"The provided expression [.kibana] matches an alias, specify the corresponding concrete indices instead."}],"type":"illegal_argument_exception","reason":"The provided expression [.kibana] matches an alias, specify the corresponding concrete indices instead."},"status":400}

其实上面已经解释的比较明确了,需要我们删除具体的索引名称,而不能直接删除别名。也就是上述结果的第2列 (其实也就两个)。
所以,我们要把命令改为:

curl -X DELETE http://localhost:9200/.kibana_task_manager_8.1.2_001
curl -X DELETE http://localhost:9200/.kibana_8.1.2_001

执行后,都返回 {"acknowledged":true} 就代表删除成功了,然后我们重新启动 kibana 就可以正常启动了。
在这里插入图片描述
OK,本文就到这里了,如有错误,欢迎评论指正。别忘了点赞、收藏哦!Thanks♪(・ω・)ノ


http://www.ppmy.cn/news/1186961.html

相关文章

力扣 三数之和 双指针 java

Problem: 15. 三数之和 时间复杂度: O ( n 2 ) O(n^2) O(n2) &#x1f351; AC code class Solution {public List<List<Integer>> threeSum(int[] nums) {List<List<Integer>> res new ArrayList<>();int len nums.length; if(len < 3…

“探索Linux世界:从CentOS安装到常见命令使用“

目录 引言一、安装CentOS二、Linux的常见命令文件夹和目录操作命令文件编辑命令vi或vim编辑器命令模式编辑模式末行模式 总结 引言 在计算机领域&#xff0c;Linux作为一种强大而灵活的操作系统&#xff0c;在服务器、嵌入式设备和个人电脑等领域广泛应用。本文将引导您了解并…

大数据相关ERP、CRM、SRM、PLM、HRM、OA

目录 █ ERP&#xff08;企业资源计划&#xff09; █ CRM&#xff08;客户关系管理&#xff09; █ SCRM&#xff08;社会化客户关系管理&#xff09; █ SRM&#xff08;供应商关系管理&#xff09; █ OA&#xff08;办公自动化&#xff09; █ HRM&#xff08;人力资…

Affinity Photo 2.2.1 高端专业Mac PS修图软件

Affinity Photo Mac中文版是一款面向专业摄影师和其他视觉艺术家的专业图像处理软件&#xff0c;拥有众多专业高端功能&#xff0c;如Raw处理、PSD导入和导出、16位通道的编辑和ICC色彩管理以及兼容大量图片格式。是现在最快、最顺、最精准的专业修图软件。Affinity Photo Mac是…

MSQL系列(十一) Mysql实战-Inner Join算法底层原理及驱动表选择

Mysql实战-Inner Join算法驱动表选择 前面我们讲解了BTree的索引结构&#xff0c;及Mysql的存储引擎MyISAM和InnoDB,也详细讲解下 left Join的底层驱动表 选择, 并且初步了解 Inner join是Mysql 主动选择优化的驱动表&#xff0c;知道索引要建立在被驱动表上 那么对于Inner j…

vue使用vite工具编译,一个极不好友好的错误提示

yarn build 时提示如下错识 error during build: Error: [vite]: Rollup failed to resolve import "..." from "/Users/owen/html/bs-journey/src/components/UnScenic.vue". This is most likely unintended because it can break your application at …

嵌入式Linux设备中串口设备文件名不固定问题

在嵌入式Linux下&#xff0c;USB设备节点的名称ttyUSB是根据设备的插拔顺序而动态分配的&#xff0c;因此可能会导致设备节点名称不固定的问题。解决这个问题的方法有以下几种&#xff1a; 使用udev规则创建符号链接到固定路径&#xff1a; 如果USB设备是一个串口设备&#x…

入对IT行业无疑是阶层跨越的一次弯道超车!

如今赚钱最多的行业还是金融和IT行业&#xff0c;可是金融是出了名的挑家庭背景&#xff0c;只有IT行业成了一个个普通人家孩子创造奇迹脱离原来阶级的温床。 IT行业的整体薪酬水平也比较可观&#xff0c;在IT公司里见到许多出身普通最后晋升中产的例子给了很大的鼓舞。 IT行业…