kibana启动时warning警告信息的解决办法

启动kibana时会有几个warning信息,具体如下:

 



针对xpack这几个相关的,在kibana.yml文件中新增如下三个配置即可:

# 注意:参数值至少32位,否则启动会报错提示
xpack.encryptedSavedObjects.encryptionKey: encryptedSavedObjects12345678909876543210
xpack.security.encryptionKey: encryptionKeysecurity12345678909876543210
xpack.reporting.encryptionKey: encryptionKeyreporting12345678909876543210

关于这个报错:[warning][config][plugins][security] Session cookies will be transmitted over insecure connections. This is not recommended.
是说明kibana访问没有使用https的方式,这个处理可以参考这篇文章:https://www.cnblogs.com/sanduzxcvbnm/p/12046640.html => 使用https方式访问kibana

关于另一种报错:[browser-driver][reporting] Enabling the Chromium sandbox provides an additional layer of protection
官网文档说明如下:
https://www.elastic.co/guide/en/kibana/7.6/reporting-chromium-sandbox.html

翻译如下:

当X-Pack reporting使用Chromium浏览器生成PDF报告时,建议使用沙盒作为额外的安全层。Chromium沙箱使用操作系统提供的机制来确保代码执行不能对计算机进行持久性更改或访问机密信息。每个操作系统的特定沙盒技术都不同。

Linux沙盒依赖于3.8Linux内核引入的用户名称空间。但是,许多发行版在默认情况下没有启用用户名称空间,或者它们需要CAP_SYS_ADMIN功能。当沙盒在Debian和CentOS上运行时,X-Pack报告将自动禁用它,因为启用未授权的用户名空间需要额外的步骤。在这些情况下,您将在Kibana日志中看到以下消息:启用Chromium沙箱提供了额外的保护层。
如果您的内核是3.8或更高版本,建议启用用户名空间,并在kibana.yml中设置xpack.reporting.capture.browser.chromium.disableSandbox:false以启用沙盒。

在Docker容器中运行Kibana时,所有容器进程都在一个usernamespace中运行,其中包含seccomp bpf和AppArmor配置文件,这些配置文件防止使用Chromium沙箱。在这些情况下,建议禁用沙盒,因为容器实现类似的安全机制。

对应的操作就是在kibana.yml文件中新增如下配置即可:

xpack.reporting.capture.browser.chromium.disableSandbox: false

不过设置这个后启动会有如下错误提示:

系统内核版本如下:Linux bogon 3.10.0-957.12.2.el7.x86_64 #1 SMP Tue May 14 21:24:32 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
大于所要求的3.8内核版本

大致意思是Error: Failed to launch chrome,错误:启动chrome失败
难道沙箱使用生成报错还需要安装chrome驱动才行,就跟爬虫那样的,驱动chrome浏览器自动操作?

设置这个试试看,禁用沙箱功能:

xpack.reporting.capture.browser.chromium.disableSandbox: true

禁用的话还是有这个警告

其他关于沙盒的信息:
https://www.ucloud.cn/yun/34216.html

chromium设置

当xpack.reporting.capture.browser.type设置为chromium,还可以指定以下设置。

xpack.reporting.capture.browser.chromium.disableSandbox

Elastic建议你研究启用非特权用户命名空间的可行性,有关其他信息,请参阅Chromium Sandbox,除了Debian、Red Hat Linux和CentOS使用true之外,所有操作系统都默认为false。

xpack.reporting.capture.browser.chromium.proxy.enabled

允许Chromium的代理使用,当设置为true,你必须还要指定xpack.reporting.capture.browser.chromium.proxy.server设置,默认为false。

xpack.reporting.capture.browser.chromium.proxy.server

代理服务器的uri,不支持通过uri为代理服务器提供用户名和密码。

xpack.reporting.capture.browser.chromium.proxy.bypass

不应该通过代理服务器的主机数组,应该使用直接连接,有效条目的例子是“elastic.co”、“*.elastic.co“、”.elastic.co“、“.elastic.co:5601”。

https://www.elastic.co/guide/en/kibana/7.6/reporting-troubleshooting.html#_you_must_install_nss_for_reporting_to_work

System dependencies
edit

Reporting launches a "headless" web browser called Chromium on the Kibana server. It is a custom build made by Elastic of an open source project, and it is intended to have minimal dependencies on OS libraries. However, the Kibana server OS might still require additional dependencies to run the Chromium executable.

Make sure Kibana server OS has the appropriate packages installed for the distribution.

If you are using CentOS/RHEL systems, install the following packages:

    ipa-gothic-fonts
    xorg-x11-fonts-100dpi
    xorg-x11-fonts-75dpi
    xorg-x11-utils
    xorg-x11-fonts-cyrillic
    xorg-x11-fonts-Type1
    xorg-x11-fonts-misc
    fontconfig
    freetype

If you are using Ubuntu/Debian systems, install the following packages:

    fonts-liberation
    libfontconfig1

If the system is missing dependencies, then Reporting will fail in a non-deterministic way. Kibana runs a self-test at server startup, and if it encounters errors, logs them in the Console. Unfortunately, the error message does not include information about why Chromium failed to run. The most common error message is Error: connect ECONNREFUSED, which indicates that Kibana could not connect to the Chromium process.

To troubleshoot the problem, start the Kibana server with environment variables that tell Chromium to print verbose logs. See the Puppeteer debug method for more information.

综上所述,在kibana.yml中新增如下三个配置就行了,其他的警告以后再处理:

xpack.encryptedSavedObjects.encryptionKey: encryptedSavedObjects12345678909876543210
xpack.security.encryptionKey: encryptionKeysecurity12345678909876543210
xpack.reporting.encryptionKey: encryptionKeyreporting12345678909876543210
  • 3
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值