开发者社区> 问答> 正文

oceanbase 数据库无法连接怎么办?

oceanbase 数据库无法连接怎么办?目前执行obd cluster restart 数据库的时候,卡在了Initialize cluster的时候,看日志是clog disk space is almost full满了,我当时只用了一台服务器部署,部署的时候只部署了一台observe和proxy,也可以通过修改log_disk_utilization_limit_threshold参数吗?目前数据库无法连接上
```## Only need to configure when remote login is required
user:
username: root
password: 123456

key_file: your ssh-key file path if need

port: your ssh port, default 22

timeout: ssh connection timeout (second), default 30

oceanbase-ce:
servers:

# Please don't use hostname, only IP can be supported
- 172.1.3.242

global:

#  The working directory for OceanBase Database. OceanBase Database is started under this directory. This is a required field.
home_path: /backup/oceanbase/home
# The directory for data storage. The default value is $home_path/store.
data_dir: /backup/oceanbase/data
# The directory for clog, ilog, and slog. The default value is the same as the data_dir value.
redo_dir: /backup/oceanbase/redo
# 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: ens18
mysql_port: 2881 # External port for OceanBase Database. The default value is 2881. DO NOT change this value after the cluster is started.
rpc_port: 2882 # Internal port for OceanBase Database. The default value is 2882. DO NOT change this value after the cluster is started.
zone: zone1
cluster_id: 1
# please set memory limit to a suitable value which is matching resource. 
memory_limit: 6G # The maximum running memory for an observer
system_memory: 1G # The reserved system memory. system_memory is reserved for general tenants. The default value is 30G.
datafile_size: 8G # Size of the data file. 
log_disk_size: 8G # The size of disk space used by the clog files.
cpu_count: 8
production_mode: false
syslog_level: INFO # System log level. The default value is INFO.
enable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true.
enable_syslog_recycle: true # Enable auto system log recycling or not. The default value is false.
max_syslog_file_count: 4 # The maximum number of reserved log files before enabling auto recycling. The default value is 0.
# observer cluster name, consistent with obproxy's cluster_name
appname: obcluster
# root_password: # root user password, can be empty
# proxyro_password: # proxyro user pasword, consistent with obproxy's observer_sys_password, can be empty

obproxy-ce:

Set dependent components for the component.

When the associated configurations are not done, OBD will automatically get the these configurations from the dependent components.

depends:

- oceanbase-ce

servers:

- 172.1.3.242

global:
listen_port: 2883 # External port. The default value is 2883.
prometheus_listen_port: 2884 # The Prometheus port. The default value is 2884.
home_path: /backup/oceanbase/obproxy

# oceanbase root server list
# format: ip:mysql_port;ip:mysql_port. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
# rs_list: 192.168.1.2:2881
enable_cluster_checkout: false
# observer cluster name, consistent with oceanbase-ce's appname. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
# cluster_name: obcluster
skip_proxy_sys_private_check: true
enable_strict_kernel_release: false
# obproxy_sys_password: # obproxy sys user password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.
# observer_sys_password: # proxyro user pasword, consistent with oceanbase-ce's proxyro_password, can be empty. When a depends exists, OBD gets this value from the oceanbase-ce of the depends.

```
我的服务器性能有限,很多参数都调的比较小
8198f69cc92727fc363e3bc6103996b4.png

展开
收起
你鞋带开了~ 2024-02-20 23:10:16 88 0
来自:OceanBase
2 条回答
写回答
取消 提交回答
  • 面对过去,不要迷离;面对未来,不必彷徨;活在今天,你只要把自己完全展示给别人看。

    根据您的描述,您的OceanBase数据库无法连接,并且日志显示clog磁盘空间已满。您可以尝试以下方法来解决这个问题:

    1. 清理不必要的数据:检查数据库中是否有可以删除或归档的旧数据,尤其是大型的CLOB(Character Large Object)数据。清理这些数据可以释放一些磁盘空间。

    2. 调整配置参数:您提到服务器性能有限,很多参数都调得比较小。您可以尝试调整log_disk_sizedatafile_size参数的值,以便为clog文件分配更多的磁盘空间。例如,将log_disk_size设置为更大的值,如16G或32G,以提供更多的磁盘空间给clog文件。

    3. 增加磁盘空间:如果调整配置参数后仍然无法解决问题,您可以考虑增加磁盘空间。这可以通过添加新的磁盘或扩展现有磁盘来实现。在增加磁盘空间后,您需要重新配置OceanBase数据库以使用新的磁盘空间。

    4. 重启集群:在完成上述操作后,尝试重新启动OceanBase数据库集群。您可以使用以下命令来重启集群:

      obd cluster restart
      
    5. 监控磁盘空间:在解决问题后,建议您定期监控磁盘空间的使用情况,以确保磁盘空间不会再次耗尽。您可以使用系统工具或第三方监控工具来监控磁盘空间的使用情况。

    2024-02-22 13:39:44
    赞同 展开评论 打赏
  • 1.建议默认log_disk_size是memory_limit内存大小的3倍。
    2.可以扩一下配置文件对应的/backup目录的磁盘。3.data_dir: /backup/oceanbase/data
    redo_dir: /backup/oceanbase/redo
    建议还是分开部署较好。https://www.oceanbase.com/docs/common-oceanbase-database-cn-1000000000510460。
    4.若需要带参启动,则在 -o 后指定需要修改的参数即可。https://ask.oceanbase.com/t/topic/35602977
    --此回答整理自钉群“[社区]技术答疑群OceanBase”

    2024-02-20 23:22:44
    赞同 展开评论 打赏
来源圈子
更多
收录在圈子:
+ 订阅
蚂蚁OceanBase数据库团队,用于OceanBase技术原理、运维经验和案例分享、对外交流。
问答排行榜
最热
最新

相关电子书

更多
开源HTAP OceanBase产品揭秘 立即下载
云数据库OceanBase 架构演进及在金融核心系统中的实践 立即下载
自研金融数据库OceanBase的创新之路 立即下载