kibana 常见问题

kibana 常见问题

一系列在kibana使用中出现的问题和解决方法。持续更新…

mapper [version] cannot be changed from type [long] to [integer]

问题原因:

在kibana创建索引前,向index kibana写入了数据(例如dashboard和visualization的配置)。elasticsearch 会将version自动映射成long,而kibana需要的是integer。

解决方法:

  1. 简单的做法是删除index .kibana,在kibana ui 建立index后,再导入配置。
  2. 或者使用reindex,暂存doc,新建kibana后再导入。

相关链接:

  • kibana issue 5648
  • kibana issue 9888

elasticsearch is still initializing the Monitoring indices

kibana 启动时,无法连接到es(,management页面显示plugin:monitoring@5.6.8 Elasticsearch is still initializing the Monitoring indices异常。

使用下面的的接口查看es indices的状态:

1
GET /_cat/indices?v&s=index&health=red

可以看到.monitoring-es-6-2019.04.23 索引状态是red。此时简单的做法可以直接删除该索引:

1
DELETE /.monitoring-es-6-2019.04.23

也可以修复节点状态到green。

kibana document missing

kibana页面报错,文档丢失。

1
kibana document missing,with { index_uuid="y_afFmxhTEOa53lMR7qHLg" & shard="3" & index=".kibana" }

删除kibana索引。

1
DELETE /.kibana

相关链接:

  • es 论坛

kibana `GLIBC_XXX’ not found

在kibana升级到7.2.0的过程中,启动异常:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
$ ./bin/kibana
log [01:35:02.210] [fatal][root] Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/shaco/kibana-7.2.0-linux-x86_64/node_modules/@elastic/nodegit/build/Release/nodegit.node)
at Object.Module._extensions..node (internal/modules/cjs/loader.js:718:18)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.<anonymous> (/home/shaco/kibana-7.2.0-linux-x86_64/node_modules/@elastic/nodegit/dist/nodegit.js:12:12)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._compile (/home/shaco/kibana-7.2.0-linux-x86_64/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (/home/shaco/kibana-7.2.0-linux-x86_64/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:599:32)
at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
at Function.Module._load (internal/modules/cjs/loader.js:530:3)
at Module.require (internal/modules/cjs/loader.js:637:17)
at require (internal/modules/cjs/helpers.js:22:18)
at Object.require (/home/shaco/kibana-7.2.0-linux-x86_64/x-pack/plugins/code/server/git_operations.js:10:19)
at Module._compile (internal/modules/cjs/loader.js:689:30)
at Module._compile (/home/shaco/kibana-7.2.0-linux-x86_64/node_modules/pirates/lib/index.js:99:24)
at Module._extensions..js (internal/modules/cjs/loader.js:700:10)
at Object.newLoader [as .js] (/home/shaco/kibana-7.2.0-linux-x86_64/node_modules/pirates/lib/index.js:104:7)
at Module.load (internal/modules/cjs/loader.js:599:32)

FATAL Error: /lib64/libc.so.6: version `GLIBC_2.14' not found (required by /home/shaco/kibana-7.2.0-linux-x86_64/node_modules/@elastic/nodegit/build/Release/nodegit.node)

通过命令查看支持的glibc库版本:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
strings /lib64/libc.so.6 |grep GLIBC_
GLIBC_2.2.5
GLIBC_2.2.6
GLIBC_2.3
GLIBC_2.3.2
GLIBC_2.3.3
GLIBC_2.3.4
GLIBC_2.4
GLIBC_2.5
GLIBC_2.6
GLIBC_2.7
GLIBC_2.8
GLIBC_2.9
GLIBC_2.10
GLIBC_2.11
GLIBC_2.12
GLIBC_2.13
GLIBC_PRIVATE

安装2.14版本

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# 安装
$ mkdir ~/glibc_install; cd ~/glibc_install
$ wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
$ tar zxvf glibc-2.14.tar.gz
$ cd glibc-2.14
$ mkdir build && cd build
$ ../configure --prefix=/usr/local/glibc-2.14
$ make -j4
$ make install

# 临时环境变量
$ export LD_LIBRARY_PATH=/usr/local/glibc-2.14/lib:$LD_LIBRARY_PATH
$ echo $LD_LIBRARY_PATH

# 修改软链接
$ cd /lib64
$ ll libc.so.6
lrwxrwxrwx 1 root root 12 Apr 8 03:50 libc.so.6 -> libc-2.12.so

$ ll /usr/local/glibc-2.14/lib/libc-2.14.so
-rwxr-xr-x 1 root root 9645192 Apr 8 03:28 /usr/local/glibc-2.14/lib/libc-2.14.so
$ cp /usr/local/glibc-2.14/lib/libc-2.14.so /lib64/
# 删除libc-2.12.so之前的软链接
$ unlink /lib64/libc.so.6
$ ln -s libc-2.14.so /lib64/libc.so.6
$ ll libc.so.6
lrwxrwxrwx 1 root root 12 Apr 8 03:50 libc.so.6 -> libc-2.14.so

2.17 版本的可以直接使用rpm安装

1
2
3
4
5
6
7
8
9
10
11
# update glibc to 2.17 for CentOS 6

wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm

sudo rpm -Uvh glibc-2.17-55.el6.x86_64.rpm \
glibc-common-2.17-55.el6.x86_64.rpm \
glibc-devel-2.17-55.el6.x86_64.rpm \
glibc-headers-2.17-55.el6.x86_64.rpm
-------------本文结束感谢您的阅读-------------
坚持分享,您的支持将鼓励我继续创作!
0%