「Kibana」- 设置超时时间

  CREATED BY JENKINSBOT

问题描述

在使用 Kibana 搜索时,产生如下错误:

Unexpected token u in JSON at position 0

SyntaxError: Unexpected token u in JSON at position 0
    at JSON.parse (<anonymous>)
    at http://kibana.example.com/bundles/commons.bundle.js:3:3397719
    at http://kibana.example.com/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:94842
    at http://kibana.example.com/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:94980
    at u.$digest (http://kibana.example.com/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:100155)
    at http://kibana.example.com/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:102127
    at Yo.completeTask (http://kibana.example.com/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:122692)
    at http://kibana.example.com/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:368:34257

问题原因

查看浏览器网络发现请求在 URL 中带有 timeout=30000ms 参数

于是去排查 Kibana 有关 Timeout 的设置

解决方法

修改 /etc/kibana/kibana.yml 配置文件的 elasticsearch.requestTimeout 参数。

参考文献

KIBANA TIMEOUT Request Timeout after 30000ms
Kibana User Guide [4.5] » Settings » Setting Kibana Server Properties