MacBook休眠后Kibana启动失败问题求助
问题描述
在MacBook Pro M2上通过Homebrew安装配置ELK栈(Elasticsearch 8.8.1 + Kibana 8.8.1),此前可正常使用Kibana Dev控制台编写查询、通过Python客户端执行查询。但MacBook进入休眠后,Kibana出现异常。
Elasticsearch状态验证
用cURL检查Elasticsearch状态,返回正常运行结果:
Enter host password for user 'elastic': { "name" : "WM-xxxxxxx", "cluster_name" : "elasticsearch", "cluster_uuid" : "oEn7xc4xxxxxxxxcGdQ", "version" : { "number" : "8.8.1", "build_flavor" : "default", "build_type" : "tar", "build_hash" : "f8edfxxxxxa429b6477927xxxxxxx29521xx05e", "build_date" : "2023-06-05T21:32:25.188464208Z", "build_snapshot" : false, "lucene_version" : "9.6.0", "minimum_wire_compatibility_version" : "7.17.0", "minimum_index_compatibility_version" : "7.0.0" }, "tagline" : "You Know, for Search" }
注:部分敏感值已替换为X
Kibana启动错误日志
单独终端启动Kibana时,出现以下错误:
[2023-06-26T10:47:45.686+05:30][WARN ][plugins.screenshotting.chromium] Found browser binary checksum for darwin/x64 in /Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/chromium/chrome-mac/Chromium.app/Contents/MacOS/Chromium is MISSING but 9960dd00ab27b4e9ee1455692bb65701 was expected. Re-installing... [2023-06-26T10:47:45.698+05:30][WARN ][plugins.screenshotting.chromium] Browser archive checksum for darwin/x64 is d41d8cd98f00b204e9800998ecf8427e but 2ce969500158dd98e3ad4502dbb6b13c was expected. [2023-06-26T10:47:45.698+05:30][INFO ][plugins.screenshotting.chromium] Downloading https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/1121448/chrome-mac.zip to /Users/xxxxxx/Desktop/elastic/kibana-8.8.1/.chromium/x64/chrome-mac.zip [2023-06-26T10:47:45.716+05:30][ERROR][plugins.screenshotting.chromium] Error: getaddrinfo ENOTFOUND commondatastorage.googleapis.com at GetAddrInfoReqWrap.onlookup [as oncomplete] (node:dns:109:26) at GetAddrInfoReqWrap.callbackTrampoline (node:internal/async_hooks:130:17) [2023-06-26T10:47:45.716+05:30][ERROR][plugins.screenshotting.chromium] Error: Failed to download https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/1121448/chrome-mac.zip: Error: Unable to download https://commondatastorage.googleapis.com/chromium-browser-snapshots/Mac/1121448/chrome-mac.zip: Error: getaddrinfo ENOTFOUND commondatastorage.googleapis.com at download (/Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/server/browsers/download/index.js:61:11) at processTicksAndRejections (node:internal/process/task_queues:96:5) at install (/Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/server/browsers/install.js:43:5) at async Promise.all (index 1) at /Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/server/plugin.js:44:36 [2023-06-26T10:47:45.718+05:30][ERROR][plugins.screenshotting.chromium] Error: Error installing browsers, binary checksums incorrect for [x64/darwin] at install (/Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/server/browsers/install.js:54:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Promise.all (index 1) at /Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/server/plugin.js:44:36 [2023-06-26T10:47:45.718+05:30][ERROR][plugins.screenshotting] Error in screenshotting setup, it may not function properly. [2023-06-26T10:47:45.718+05:30][ERROR][plugins.screenshotting] Error: Error installing browsers, binary checksums incorrect for [x64/darwin] at install (/Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/server/browsers/install.js:54:19) at processTicksAndRejections (node:internal/process/task_queues:96:5) at async Promise.all (index 1) at /Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/server/plugin.js:44:36
已关闭MacBook默认gatekeeping功能以运行Kibana
访问错误
崩溃后访问Kibana的localhost地址,显示:
Kibana server is not ready yet.
解决方案
- 临时绕过截图插件问题:如果不需要报表导出等截图功能,直接禁用该插件。编辑Kibana配置文件
kibana.yml(Homebrew安装路径通常为/usr/local/etc/kibana/kibana.yml),添加或修改配置xpack.screenshotting.enabled: false,保存后重启Kibana。 - 修复Chromium校验问题:若需截图功能,先删除Kibana目录下的
.chromium文件夹和插件内的Chromium文件:
确保网络可访问rm -rf /Users/xxxxxx/Desktop/elastic/kibana-8.8.1/.chromium rm -rf /Users/xxxxxx/Desktop/elastic/kibana-8.8.1/node_modules/@kbn/screenshotting-plugin/chromiumcommondatastorage.googleapis.com后重启Kibana,让其自动重新下载正确的Chromium包;若网络无法访问该地址,可手动下载对应版本(1121448)的Chromium包并解压到指定路径。 - 重启服务并清理缓存:完全停止服务后清理缓存再重启:
brew services stop elasticsearch brew services stop kibana rm -rf /usr/local/var/lib/kibana/* brew services start elasticsearch brew services start kibana
内容的提问来源于stack exchange,提问作者SpamsterHamster
相关产品推荐
相关产品推荐

