obd启动失败

【产品名称】社区版单机安装

【产品版本】3.1

【问题描述】

如图,虚拟机centos7 7.9.2009。虚拟机4核8G,150G硬盘。是硬件配置太低了吗?

大概率 怀疑用错了配置文件


你需要使用这个配置文件, https://github.com/oceanbase/obdeploy/blob/master/example/mini-local-example.yaml


另外如果可以, 你把你的配置文件贴一下

我们自己跑过很多次了, 在docker或者ecs 环境下经常跑


比较怀疑, 你用错了配置文件, 你用了https://github.com/oceanbase/obdeploy/blob/master/example/local-example.yaml

正确的是配置文件 https://github.com/oceanbase/obdeploy/blob/master/example/mini-local-example.yaml

这是我的配置,用了新配置已经启动了,这个有什么可视化工具连接这个数据库吗?

oceanbase-ce:
  servers:
    # Please don't use hostname, only IP can be supported
    - 127.0.0.1
  global:
    home_path: /home/ch/observer
    # Please set devname as the network adaptor's name whose ip is  in the setting of severs.
    # if set severs as "127.0.0.1", please set devname as "lo"
    # if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"
    devname: lo
    mysql_port: 2883
    rpc_port: 2882
    zone: zone1
    cluster_id: 1
    datafile_size: 4G
    # please set memory limit to a suitable value which is matching resource. 
    memory_limit: 8G
    system_memory: 4G
    stack_size: 512K
    cpu_count: 4
    cache_wash_threshold: 1G
    __min_full_resource_pool_memory: 4194304
    workers_per_cpu_quota: 10
    schema_history_expire_time: 1d
    # The value of net_thread_count had better be same as cpu's core number. 
    net_thread_count: 4
    major_freeze_duty_time: Disable
    minor_freeze_times: 10
    enable_separate_sys_clog: 0
    enable_merge_by_turn: FALSE
    datafile_disk_percentage: 20


请根据warn信息修改,内存和open file不足。

open file修改可以参考https://github.com/oceanbase/obdeploy/issues/4

内存不足不会导致启动失败,但可能会引起OOM。如果你只是尝试启动ob集群可以忽略这个warn

至少8g内存,并且默认cpu和内存配置,不要修改。因为日志提示可能不清楚上面一旦不满足就导致启动失败

环境准备:

  • 系统环境配置: memory_limit cannot be less than 8G
问题:
[WARN] (127.0.0.1) fs.aio-max-nr must not be less than 1048576 (Current value: 65536)
[WARN] (127.0.0.1) open files number must not be less than 655350 (Current value: 1024)
[WARN] (127.0.0.1) not enough memory
​
办法:
vi /etc/security/limits.conf
*  soft nofile  655360
*  hard nofile  655360
* soft nproc 655360
* hard nproc 655360
​
vi /etc/sysctl.conf
fs.file-max = 655360
fs.aio-max-nr=1048576
​
sysctl -p//生效
ulimit -a //新窗口查看结果
  • mini-local-example.yaml 变量 里面配置是最低配置,不能修改
[root@56bd78306b21 data]# obd cluster edit-config obtest
oceanbase-ce:
 servers:
  # Please don't use hostname, only IP can be supported
 - 127.0.0.1
 global:
 home_path: /root/data/observer
  # Please set devname as the network adaptor's name whose ip is in the setting of severs.
  # if set severs as "127.0.0.1", please set devname as "lo"
  # if current ip is 192.168.1.10, and the ip's network adaptor's name is "eth0", please use "eth0"
 devname: lo
 mysql_port: 2881
 rpc_port: 2882
 zone: zone1
 cluster_id: 1
  # please set memory limit to a suitable value which is matching resource.
 memory_limit: 8G //不能修改,至少不多 
 system_memory: 4G //不能修改,至少不多
 stack_size: 512K //不能修改,至少不多
 cpu_count: 6
 cache_wash_threshold: 500M
 __min_full_resource_pool_memory: 268435456 //不能修改,至少不多
 workers_per_cpu_quota: 10
 schema_history_expire_time: 1d
  # The value of net_thread_count had better be same as cpu's core number.
 net_thread_count: 2
 sys_bkgd_migration_retry_num: 3
 minor_freeze_times: 10
 enable_separate_sys_clog: 0
 enable_merge_by_turn: FALSE
 datafile_disk_percentage: 20
 syslog_level: INFO
 enable_syslog_recycle: true
 max_syslog_file_count: 1


至少8g内存和4核cpu