安装部署,tid-ansible-3.0.0部署后,所有tikv节点都不能启动。

*系统版本 & kernel 版本:CentOS Linux release 7.4.1708 (Core) *TiDB 版本:tidb-ansible-v3.0.0 *磁盘型号:普通硬盘,在系统预检测阶段将系统和磁盘的检测注释掉。以前也是这个,没有问题。 *集群节点分布:2Tibd-server,3PD,3TiKV *数据量 & region 数量 & 副本数:未做具体要求,默认值,测试环境 *集群 QPS、.999-Duration、读写比例:无

问题描述(我做了什么): tidb-ansible集群部署工具是以前在vmware上部署过的,然后用tidb用户直接拷贝过来使用。 在私有云上部署tidb服务,预检测和部署都OK,但是启动集群的时候在启动tikv时报错:

报错如下: p=23091 u=tidb | [10.0.1.33]: Ansible FAILED! => playbook: start.yml; TASK: wait until the TiKV port is up; message: {“changed”: false, “elapsed”: 300, “msg”: “the TiKV port 20160 is not up”}

p=23091 u=tidb | [10.0.1.34]: Ansible FAILED! => playbook: start.yml; TASK: wait until the TiKV port is up; message: {“changed”: false, “elapsed”: 300, “msg”: “the TiKV port 20160 is not up”}

p=23091 u=tidb | [10.0.1.35]: Ansible FAILED! => playbook: start.yml; TASK: wait until the TiKV port is up; message: {“changed”: false, “elapsed”: 301, “msg”: “the TiKV port 20160 is not up”}

1.查看报错日志,tisb-ansible/log/fail.log 里面的报错信息和界面上显示的是一样的,无法定位到报错原因。

2.将集群销毁掉重新预检测、部署、启动还是报一样的错。

  1. 直接到tikv节点执行tikv启动脚本,只出现下列几行信息。服务未起来。 [tidb@node01 scripts]$ ./run_tikv.sh sync … real 0m0.064s user 0m0.015s sys 0m0.016s ok

Segmentation fault

另外:

  1. Tidb-ansible集群部署工具是通过以前部署过的机器上拷贝过来的,权限没有问题,用tidb用户拷贝的。

2.私有云上的虚拟机访问时通过端口映射的方式访问的。

请帮忙分析下问题出在哪?

可能是 CPU 指令集不支持,可以先看看 cat /proc/cpuinfo 的输出。然后按照 gdb tikv-server -> r -> disassemble 来看看是哪个指令不支持,也可以尝试直接用最新的 tidb-ansible 来部署

1 个赞

1.CPU信息 [root@node01 ~]# cat /proc/cpuinfo processor : 0 vendor_id : AuthenticAMD cpu family : 6 model : 6 model name : QEMU Virtual CPU version 2.5+ stepping : 3 cpu MHz : 2904.027 cache size : 512 KB physical id : 0 siblings : 1 core id : 0 cpu cores : 1 apicid : 0 initial apicid : 0 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm art nopl pni cx16 hypervisor lahf_lm svm bogomips : 5808.05 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

processor : 1 vendor_id : AuthenticAMD cpu family : 6 model : 6 model name : QEMU Virtual CPU version 2.5+ stepping : 3 cpu MHz : 2904.027 cache size : 512 KB physical id : 1 siblings : 1 core id : 0 cpu cores : 1 apicid : 1 initial apicid : 1 fpu : yes fpu_exception : yes cpuid level : 13 wp : yes flags : fpu de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx lm art nopl pni cx16 hypervisor lahf_lm svm bogomips : 5821.76 TLB size : 1024 4K pages clflush size : 64 cache_alignment : 64 address sizes : 40 bits physical, 48 bits virtual power management:

  1. 执行命令结果 gdb tikv-server -> r -> disassemble

[root@node01 ~]# gdb tikv-server -> r -> disassemble Excess command line arguments ignored. (-) tikv-server: No such file or directory. /root/-: No such file or directory.

[root@node01 ~]# su tidb [tidb@node01 root]$ cd [tidb@node01 ~]$ gdb tikv-server -> r -> disassemble Excess command line arguments ignored. (-) tikv-server: Permission denied. /home/tidb/-: No such file or directory.

您好,先找到 tikv-server, 然后执行 gdb tikv-server. 然后在gdb 里输入 r, 然后回车后再输入 disassemble 看看结果

您好: 在tikv节点bin目录下看到tivk-server,执行命令后现在如下结果: (gdb) disassemble Dump of assembler code for function std::_Hashtable<std::string, std::pair<std::string const, rocksdb::titandb::TitanBlobRunMode>, std::allocator<std::pair<std::string const, rocksdb::titandb::TitanBlobRunMode> >, std::__detail::_Select1st, std::equal_tostd::string, std::hashstd::string, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits<true, false, true> >::_Hashtable<std::pair<std::string const, rocksdb::titandb::TitanBlobRunMode> const*>(std::pair<std::string const, rocksdb::titandb::TitanBlobRunMode> const*, std::pair<std::string const, rocksdb::titandb::TitanBlobRunMode> const*, unsigned long, std::hashstd::string const&, std::__detail::_Mod_range_hashing const&, std::__detail::_Default_ranged_hash const&, std::equal_tostd::string const&, std::__detail::_Select1st const&, std::allocator<std::pair<std::string const, rocksdb::titandb::TitanBlobRunMode> > const&): 0x00005555566f6c70 <+0>: push %rbp 0x00005555566f6c71 <+1>: mov %rdx,%rax 0x00005555566f6c74 <+4>: sub %rsi,%rax 0x00005555566f6c77 <+7>: mov %rsp,%rbp 0x00005555566f6c7a <+10>: push %r15 0x00005555566f6c7c <+12>: sar $0x4,%rax 0x00005555566f6c80 <+16>: push %r14 0x00005555566f6c82 <+18>: mov %rdi,%r14 0x00005555566f6c85 <+21>: push %r13 0x00005555566f6c87 <+23>: mov %rsi,%r13 0x00005555566f6c8a <+26>: push %r12 0x00005555566f6c8c <+28>: push %rbx 0x00005555566f6c8d <+29>: mov %rcx,%rbx 0x00005555566f6c90 <+32>: sub $0x38,%rsp 0x00005555566f6c94 <+36>: movq $0x0,0x8(%rdi) 0x00005555566f6c9c <+44>: movq $0x0,0x10(%rdi) 0x00005555566f6ca4 <+52>: movq $0x0,0x18(%rdi) 0x00005555566f6cac <+60>: movl $0x3f800000,0x20(%rdi) 0x00005555566f6cb3 <+67>: test %rax,%rax 0x00005555566f6cb6 <+70>: movq $0x0,0x28(%rdi) 0x00005555566f6cbe <+78>: mov %rax,-0x40(%rbp) 0x00005555566f6cc2 <+82>: mov %rdx,-0x58(%rbp) 0x00005555566f6cc6 <+86>: fildll -0x40(%rbp) 0x00005555566f6cc9 <+89>: js 0x5555566f6e3b <std::_Hashtable<std::string, std::pair<std::string const, rocksdb::titandb::TitanBlobRunMode>, std::allocator<std::pair<std::string const, rocksdb::titandb::TitanBlobRunMode> >, std::__detail::_S—Type to continue, or q to quit—

另外,目前使用的虚拟机镜像是云镜像,不知道这个部署tidb是否支持。 CentOS-7-x86_64-GenericCloud-1801-01.qcow2

在执行gdb命令输入r时,也有报错信息,如下

(gdb) r Starting program: /data01/deploy/bin/tikv-server [Thread debugging using libthread_db enabled] Using host libthread_db library “/lib64/libthread_db.so.1”.

Program received signal SIGSEGV, Segmentation fault. 0x00005555566f6cdc in _M_bkt_for_elements ( this=0x5555571682e0 rocksdb::titandb::TitanOptionsHelper::blob_run_mode_string_map+32, __n=) at /usr/include/c++/4.8.2/bits/hashtable_policy.h:373 373 /usr/include/c++/4.8.2/bits/hashtable_policy.h: No such file or directory. Missing separate debuginfos, use: debuginfo-install glibc-2.17-260.el7_6.6.x86_64 libgcc-4.8.5-36.el7_6.2.x86_64

看起来是这个issue.
https://github.com/pingcap/titan/issues/33
试试最新版本的 tikv-server 吧.

好的,目前正在尝试用tidb-ansible-3.0.2版本部署 非常感谢您的定位

如果别人的回答有帮助,可以将其标记为解决方案✅,这样可以帮助其他有同样问题的人快速找到答案~

目前还在重试中,完成后给结论。

好的~

使用tidb-ansible-v3.0.2重新部署没有问题。说明v3.0.2版本已修复tikv服务不能启动的问题。

1 个赞

get it

此话题已在最后回复的 1 分钟后被自动关闭。不再允许新回复。