版本: ``` ±----------------------------------------------------------------------------+ | Packages | ±-------------±--------±--------±-----------------------------------------+ | Repository | Version | Release | Md5 | ±-------------±--------±--------±-----------------------------------------+ | oceanbase-ce | 3.1.0 | 3.el7 | b73bcd531bdf3f087391991b290ff2cbcdaa0dc9 | | obproxy | 3.1.0 | 1.el7 | 0b17cf0459a3b53c5a2febb6572894d183154c64 | ±-------------±--------±--------±-----------------------------------------+ ``` 配置文件: user: username: admin key_file: /home/admin/.ssh/id_rsa.pub port: 22 timeout: 30 oceanbase-ce: servers: - name: obce01 ip: xx.xx.xx.73 - name: obce02 ip: xx.xx.xx.79 - name: obce03 ip: xx.xx.xx.104 global: devname: eth0 cluster_id: 2 memory_limit: 8G system_memory: 3G stack_size: 512K cpu_count: 16 cache_wash_threshold: 1G __min_full_resource_pool_memory: 268435456 workers_per_cpu_quota: 10 schema_history_expire_time: 1d net_thread_count: 4 major_freeze_duty_time: Disable minor_freeze_times: 10 enable_separate_sys_clog: 0 enable_merge_by_turn: FALSE datafile_size: 50G syslog_level: WARN enable_syslog_wf: false enable_syslog_recycle: true max_syslog_file_count: 10 appname: obce-3zones root_password: 123456 proxyro_password: 123456 obce01: mysql_port: 2881 rpc_port: 2882 home_path: /home/admin/oceanbase-ce data_dir: /data/ob/data redo_dir: /data/ob/redo zone: zone1 obce02: mysql_port: 2881 rpc_port: 2882 home_path: /home/admin/oceanbase-ce data_dir: /data/ob/data redo_dir: /data/ob/redo zone: zone2 obce03: mysql_port: 2881 rpc_port: 2882 home_path: /home/admin/oceanbase-ce data_dir: /data/ob/data redo_dir: /data/ob/redo zone: zone3 obproxy: servers: - xx.xx.xx.73 - xx.xx.xx.79 - xx.xx.xx.104 depends: - oceanbase-ce global: listen_port: 2883 prometheus_listen_port: 2884 home_path: /home/admin/obproxy rs_list: xx.xx.xx.73:2881;xx.xx.xx.79:2881;xx.xx.xx.104:2881 enable_cluster_checkout: false cluster_name: obce-3zones obproxy_sys_password: 123456 observer_sys_password: 123456
1 个赞
$ obd cluster deploy obce-3zones -c obce-3zones.yaml
oceanbase-ce-3.1.0 already installed.
obproxy-3.1.0 already installed.
+-----------------------------------------------------------------------------+
| Packages |
+--------------+---------+---------+------------------------------------------+
| Repository | Version | Release | Md5 |
+--------------+---------+---------+------------------------------------------+
| oceanbase-ce | 3.1.0 | 3.el7 | b73bcd531bdf3f087391991b290ff2cbcdaa0dc9 |
| obproxy | 3.1.0 | 1.el7 | 0b17cf0459a3b53c5a2febb6572894d183154c64 |
+--------------+---------+---------+------------------------------------------+
Repository integrity check ok
Parameter check ok
Open ssh connection ok
Remote oceanbase-ce-3.1.0-b73bcd531bdf3f087391991b290ff2cbcdaa0dc9 repository install ok
Remote oceanbase-ce-3.1.0-b73bcd531bdf3f087391991b290ff2cbcdaa0dc9 repository lib check ok
Remote obproxy-3.1.0-0b17cf0459a3b53c5a2febb6572894d183154c64 repository install ok
Remote obproxy-3.1.0-0b17cf0459a3b53c5a2febb6572894d183154c64 repository lib check ok
Cluster status check ok
Initializes cluster work home ok
Initializes cluster work home ok
obce-3zones deployed
$ obd cluster start obce-3zones
Get local repositories and plugins ok
Open ssh connection ok
Cluster param config check ok
Check before start observer ok
[WARN] (xx.xx.xx.73) The recommended number of open files is 655350 (Current value: 262140)
[WARN] (xx.xx.xx.73) clog and data use the same disk (/data)
[WARN] (xx.xx.xx.79) The recommended number of open files is 655350 (Current value: 262140)
[WARN] (xx.xx.xx.79) clog and data use the same disk (/data)
[WARN] (xx.xx.xx.104) The recommended number of open files is 655350 (Current value: 262140)
[WARN] (xx.xx.xx.104) clog and data use the same disk (/data)
Check before start obproxy ok
Start observer ok
observer program health check ok
Connect to observer ok
Initialize cluster
Cluster bootstrap ok
Wait for observer init ok
+--------------------------------------------------+
| observer |
+----------------+---------+------+-------+--------+
| ip | version | port | zone | status |
+----------------+---------+------+-------+--------+
| xx.xx.xx.104 | 3.1.0 | 2881 | zone3 | active |
| xx.xx.xx.73 | 3.1.0 | 2881 | zone1 | active |
| xx.xx.xx.79 | 3.1.0 | 2881 | zone2 | active |
+----------------+---------+------+-------+--------+
Start obproxy ok
obproxy program health check ok
Connect to obproxy x
[ERROR] Failed to connect obproxy
1 个赞
$ obd cluster list +----------------------------------------------------------------------+ | Cluster List | +-------------+--------------------------------------+-----------------+ | Name | Configuration Path | Status (Cached) | +-------------+--------------------------------------+-----------------+ | obce-3zones | /home/admin/.obd/cluster/obce-3zones | deployed | +-------------+--------------------------------------+-----------------+
1 个赞
连observer正常:
$ obclient -h127.1 -P2881 -uroot -p'123456' -A
Welcome to the OceanBase. Commands end with ; or \g.
Your MySQL connection id is 3221517935
Server version: 5.7.25 OceanBase 3.1.0 (r3-b20901e8c84d3ea774beeaca963c67d7802e4b4e) (Built Aug 10 2021 07:51:04)
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MySQL [(none)]>
连obproxy报错:
$ obclient -h127.1 -P2883 -uroot@proxysys -p'123456' -A
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 11