启动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

最新文章

  1. PHP之几道面试题
  2. ASP.NET WebAPI 10 Action的选择(二)
  3. Perl中文/unicode/utf8/GB2312之间的转换
  4. SQL存儲過程的調試方法
  5. 【HDOJ】2133 What day is it
  6. 数组操作- reverse sort each 操作
  7. ios开发之UIImageView
  8. 老罗android开发视频教程 下载地址
  9. 解决HTML导出Excel表数字变成科学计数法
  10. 动态代理:JDK动态代理和CGLIB代理的区别
  11. 基于Echarts4.0实现旭日图
  12. 2017-12-26--mysql(5.6.15),linux下安装使用
  13. 4.Linux开机设置项
  14. Android开发者的Anko使用指南(一)之Intent
  15. Objective-C中Block的常见用法
  16. ACM数论之旅10---大组合数-卢卡斯定理(在下卢卡斯,你是我的Master吗?(。-`ω´-) )
  17. 在启动Windows Process Activation Service时,出现错误13:数据无效
  18. Spring 注解方式 实现 IOC 和 DI
  19. JavaScript初级面试题
  20. Windows access Linux / Ubuntu via Remote Desktop via xrdp

热门文章

  1. Python究竟属不属于嵌入式语言?
  2. SpringCloudAlibaba分布式事务解决方案Seata实战与源码分析-中
  3. get 和 post 的区别
  4. 搭建一个完整的K8S集群-------基于CentOS 8系统
  5. python sphinx(文档生成器)入门
  6. 模板库 ~ Template library
  7. Frida使用文档(一)安装、启动、运行、关闭
  8. 巨细靡遗流程控制,Go lang1.18入门精炼教程,由白丁入鸿儒,Go lang流程结构详解EP09
  9. Java反射原理和实际用法
  10. Luogu3090 [USACO13NOV]空荡荡的摊位Empty Stalls (动态规划)