4.0.0怎么修改端口以适配防火墙规则

4.0.0版本,我现在因为没办法调整防火墙规则,只能主动去适配。
可用的端口号是 3306 - 3309,请问在部署时,该修改哪些端口设置去适配呢,谢谢。
已经修改了以下这些,但还是提示1006错误:

oceanbase-ce:
...
  global:
...
    mysql_port: 3306
    rpc_port: 3307
...
obproxy-ce:
...
    listen_port: 3308
    prometheus_listen_port: 3309
...
obagent:
...
    server_port: 8080
...
    sql_port: 3306
    rpc_port: 3307
...

已自行测试确保上述端口符合防火规则,但安装时还是提示1006错误代码

observer program health check ok
Connect to observer x
[ERROR] OBD-1006: Failed to connect to oceanbase-ce
See https://www.oceanbase.com/product/ob-deployer/error-codes .

obd日志(截取部分)

[DEBUG] -- connect 172.16.16.16 -P3306 -uroot -p
[ERROR] Traceback (most recent call last):
[ERROR]   File "/root/.oceanbase-all-in-one/obd/usr/obd/lib/site-packages/pymysql/connections.py", line 614, in connect
[ERROR]     (self.host, self.port), self.connect_timeout, **kwargs
[ERROR]   File "socket.py", line 724, in create_connection
[ERROR]   File "socket.py", line 713, in create_connection
[ERROR] ConnectionRefusedError: [Errno 111] Connection refused
[ERROR]
[ERROR] During handling of the above exception, another exception occurred:
[ERROR]
[ERROR] Traceback (most recent call last):
[ERROR]   File "core.py", line 1446, in start_cluster
[ERROR]   File "core.py", line 1541, in _start_cluster
[ERROR]   File "_plugin.py", line 242, in __call__
[ERROR]   File "_plugin.py", line 216, in _new_func
[ERROR]   File "/root/.obd/plugins/oceanbase-ce/3.1.0/connect.py", line 65, in connect
[ERROR]     db, cursor = _connect(server.ip, server_config['mysql_port'], password if password is not None else '')
[ERROR]   File "/root/.obd/plugins/oceanbase-ce/3.1.0/connect.py", line 42, in _connect
[ERROR]     db = mysql.connect(host=ip, user=user, port=int(port), password=str(password), cursorclass=mysql.cursors.DictCursor)
[ERROR]   File "/root/.oceanbase-all-in-one/obd/usr/obd/lib/site-packages/pymysql/connections.py", line 353, in __init__
[ERROR]     self.connect()
[ERROR]   File "/root/.oceanbase-all-in-one/obd/usr/obd/lib/site-packages/pymysql/connections.py", line 664, in connect
[ERROR]     raise exc
[ERROR] pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '172.16.16.16' ([Errno 111] Connection refused)")
[ERROR]
[DEBUG] -- connect 172.16.16.53 -P3306 -uroot -p
[ERROR] Traceback (most recent call last):
[ERROR]   File "/root/.oceanbase-all-in-one/obd/usr/obd/lib/site-packages/pymysql/connections.py", line 614, in connect
[ERROR]     (self.host, self.port), self.connect_timeout, **kwargs
[ERROR]   File "socket.py", line 724, in create_connection
[ERROR]   File "socket.py", line 713, in create_connection
[ERROR] ConnectionRefusedError: [Errno 111] Connection refused
[ERROR]
[ERROR] During handling of the above exception, another exception occurred:
[ERROR]
[ERROR] Traceback (most recent call last):
[ERROR]   File "core.py", line 1446, in start_cluster
[ERROR]   File "core.py", line 1541, in _start_cluster
[ERROR]   File "_plugin.py", line 242, in __call__
[ERROR]   File "_plugin.py", line 216, in _new_func
[ERROR]   File "/root/.obd/plugins/oceanbase-ce/3.1.0/connect.py", line 65, in connect
[ERROR]     db, cursor = _connect(server.ip, server_config['mysql_port'], password if password is not None else '')
[ERROR]   File "/root/.obd/plugins/oceanbase-ce/3.1.0/connect.py", line 42, in _connect
[ERROR]     db = mysql.connect(host=ip, user=user, port=int(port), password=str(password), cursorclass=mysql.cursors.DictCursor)
[ERROR]   File "/root/.oceanbase-all-in-one/obd/usr/obd/lib/site-packages/pymysql/connections.py", line 353, in __init__
[ERROR]     self.connect()
[ERROR]   File "/root/.oceanbase-all-in-one/obd/usr/obd/lib/site-packages/pymysql/connections.py", line 664, in connect
[ERROR]     raise exc
[ERROR] pymysql.err.OperationalError: (2003, "Can't connect to MySQL server on '172.16.16.53' ([Errno 111] Connection refused)")
[ERROR]
[ERROR] [ERROR] OBD-1006: Failed to connect to oceanbase-ce
[DEBUG] - sub connect ref count to 0
[DEBUG] - export connect
[INFO] See https://www.oceanbase.com/product/ob-deployer/error-codes .

observer.log(截取ERROR的那部分):

[2022-11-04 14:18:47.393589] ERROR [CLOG] resize (ob_server_log_block_mgr.cpp:183) [2790][][T0][Y0-0000000000000000-0-0] [lt=5] The size of reserved disp space need greater than 1GB!!!(ret=-4007, this={dir::"/data/oceanbase/clog/log_pool", dir_fd:14, meta_fd:15, log_pool_meta:{curr_total_size:0, next_total_size:0, status:0}, min_block_id:0, max_block_id:0, is_inited:true}, new_size_byte=1073741824, aligned_new_size_byte=1073741824) BACKTRACE:0xb553efb 0xb5459d6 0x3c43c13 0x3c43922 0x3c4371f 0x3c3a0d1 0x44105d4 0x440fce8 0x440fae5 0x5be18f0 0x3c17413 0x7f3868d83555 0x3c16184
[2022-11-04 14:18:47.393711] ERROR [CLOG] reserve (ob_server_log_block_mgr.cpp:155) [2790][][T0][Y0-0000000000000000-0-0] [lt=122] resize failed(ret=-4007, this={dir::"/data/oceanbase/clog/log_pool", dir_fd:14, meta_fd:15, log_pool_meta:{curr_total_size:0, next_total_size:0, status:0}, min_block_id:0, max_block_id:0, is_inited:true}) BACKTRACE:0xb553efb 0xb5459d6 0x3c42f9b 0x3c42cb4 0x3c42ac9 0x3c2137b 0x4410011 0x440fb31 0x5be18f0 0x3c17413 0x7f3868d83555 0x3c16184
[2022-11-04 14:18:47.393761] ERROR [SERVER] start (ob_server.cpp:575) [2790][][T0][Y0-0000000000000000-0-0] [lt=49] fail to reserve log pool(ret=-4007, ret="OB_NOT_SUPPORTED") BACKTRACE:0xb553efb 0xb5459d6 0x3c42f9b 0x3c42cb4 0x3c42ac9 0x3c2137b 0x5be2f5f 0x5be1f5c 0x3c17413 0x7f3868d83555 0x3c16184
[2022-11-04 14:18:47.393798] ERROR [SERVER] start (ob_server.cpp:790) [2790][][T0][Y0-0000000000000000-0-0] [lt=8] failure occurs, try to set stop and wait(ret=-4007, ret="OB_NOT_SUPPORTED") BACKTRACE:0xb553efb 0xb5459d6 0x3c42f9b 0x3c42cb4 0x3c42ac9 0x3c2137b 0x5be66b9 0x5be248f 0x3c17413 0x7f3868d83555 0x3c16184
[2022-11-04 14:19:17.212302] ERROR [SERVER] main (main.cpp:531) [2790][][T0][Y0-0000000000000000-0-0] [lt=4] observer start fail(ret=-4007) BACKTRACE:0xb553efb 0xb5459d6 0x3c1bfe0 0x3c1bd09 0x3c1bb28 0x3c163dc 0x3c18519 0x3c1765b 0x7f3868d83555 0x3c16184
[2022-11-04 14:19:20.332700] ERROR [COMMON] reset (ob_fifo_allocator.cpp:200) [2790][][T0][Y0-0000000000000000-0-0] [lt=14] current_using_ is still used now(ref_count=2, current_using_=0x7f3858824030) BACKTRACE:0xb553efb 0xb5459d6 0x3c42f9b 0x3c42cb4 0x3c42ac9 0x3c2137b 0x3c35f3d 0x398ab21 0x7f3868d9ace9 0x7f3868d9ad37 0x7f3868d8355c 0x3c16184
[2022-11-04 14:19:20.332862] ERROR [SERVER] ~ObReqTimeInfo (ob_req_time_service.cpp:35) [2790][][T0][Y0-0000000000000000-0-0] [lt=5] invalid reentrant cnt(reentrant_cnt_=1) BACKTRACE:0xb553efb 0xb5459d6 0x3c1bfe0 0x3c1bd09 0x3c1bb28 0x3c163dc 0x3f1841c 0x3f1804a 0x42b03b5 0xb51f179 0x7f3868d9ace9 0x7f3868d9ad37 0x7f3868d8355c 0x3c16184
[2022-11-04 14:19:20.474230] ERROR [COMMON] ~ObLockGuard (ob_lock_guard.h:60) [2882][][T0][Y0-0000000000000000-0-0] [lt=39] Fail to unlock, (ret=-4006) BACKTRACE:0xb553efb 0xb5459d6 0x3c1bfe0 0x3c1bd09 0x3c1bb28 0x3c163dc 0x3c7f79d 0x3b2d006 0x5c2b509 0xb5348ec 0xb53303a 0x7f3869136ea5 0x7f3868e5fb0d
[2022-11-04 14:19:20.503323] ERROR has_unfree_callback (object_set.cpp:34) [2790][][T0][Y0-0000000000000000-0-0] [lt=3] HAS UNFREE PTR!!! context: 0x7f384f5fe6b0, label: SchemaSysCache, static_id: 0x1170ab98, static_info:{filename: ob_schema_cache.cpp, line: 467, function: init}, dynamic_info:{tid: 2790, cid: 0, create_time: 1667542726888210} BACKTRACE:0xb553efb 0xb5459d6 0x3c18d6f 0x3c18a57 0x3c18841 0x3c2ae18 0x3c2ad8d 0x3972dfe 0x392a063 0x3c1fbeb 0x392a578 0x985027b 0x97a71e2 0x7f3868d9ace9 0x7f3868d9ad37 0x7f3868d8355c 0x3c16184

麻烦帮忙提供一下这里observer.log完整的日志附件看看,大概率是参数设置的不合理,磁盘资源不足。

The size of reserved disp space need greater than 1GB
看报错是设置的数据目录空间不足,导致服务没安装,最终报错的是无法连接。

error.log.tar.gz (105.6 KB)

错误日志已上传附件,谢谢

安装时的配置文件见附件
1.txt (1.0 KB)

$ df -hT
/dev/vda1      ext4       50G   26G   22G  55% /
/dev/vdb       xfs       500G   41G  460G   9% /data

[2022-11-04 14:18:47.393589] ERROR [CLOG] resize (ob_server_log_block_mgr.cpp:183) [2790][][T0][Y0-0000000000000000-0-0] [lt=5] The size of reserved disp space need greater than 1GB!!!(ret=-4007, this={dir::"/data/oceanbase/clog/log_pool", dir_fd:14, meta_fd:15, log_pool_meta:{curr_total_size:0, next_total_size:0, status:0}, min_block_id:0, max_block_id:0, is_inited:true}, new_size_byte=1073741824, aligned_new_size_byte=1073741824) BACKTRACE:0xb553efb 0xb5459d6 0x3c43c13 0x3c43922 0x3c4371f 0x3c3a0d1 0x44105d4 0x440fce8 0x440fae5 0x5be18f0 0x3c17413 0x7f3868d83555 0x3c16184

obd cluster list
如果状态是configed ,可以删除~/.obd/cluster/对应的部署名称的目录
如果状态是deployed, 可以执行obd cluster destroy xxx -f

修改obd yaml里 log_disk_size 参数应该要大于1G,可以调整后再试试。

调大 log_disk_size 就可以了谢谢

1 个赞