ob-ce-3.1.4无法通过obproxy连接到sys租户

测试环境,ob-ce-3.1.4
利用obd部署的集群:

$ obd cluster list
+------------------------------------------------------+
|                     Cluster List                     |
+--------+---------------------------+-----------------+
| Name   | Configuration Path        | Status (Cached) |
+--------+---------------------------+-----------------+
| obtest | /root/.obd/cluster/obtest | running         |
+--------+---------------------------+-----------------+

obproxy版本

$ /home/admin/obproxy/bin/obproxy -V
obproxy (OceanBase 3.2.3.5 2)

ob版本:ob-ce-3.1.4

Server version:         5.7.25 OceanBase 3.1.4 (r100000112022102717-39c3a048177154899edf1160e873979ea78dadd1) (Built Oct 27 2022 18:03:03)

无法通过obproxy连接到sys租户:

$ mysql -h127.0.0.1 -P3308 -uroot@sys -A
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 0

$ obclient -h127.0.0.1 -P3308 -uroot@sys -A
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading authorization packet', system error: 11

# 只能连接到proxysys租户
$ obclient -h127.0.0.1 -P3308 -uroot@proxysys -A
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 2097163
Server version: 5.6.25

Copyright (c) 2000, 2022, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

obclient [(none)]> show processlist;
+---------+----------+------+-----------------+------+-------------+-------------------+-------------------+-------+-------+
| Id      | Tenant   | User | Host            | db   | trans_count | svr_session_count | state             | tid   | pid   |
+---------+----------+------+-----------------+------+-------------+-------------------+-------------------+-------+-------+
| 2097163 | proxysys | root | 127.0.0.1:51326 | NULL |           0 |                 0 | MCS_ACTIVE_READER | 55004 | 54986 |
|       2 | proxysys | root | 127.0.0.1:51266 | NULL |           0 |                 0 | MCS_ACTIVE_READER | 54986 | 54986 |
| 1048583 | proxysys | root | 127.0.0.1:51280 | NULL |           0 |                 0 | MCS_ACTIVE_READER | 55003 | 54986 |
+---------+----------+------+-----------------+------+-------------+-------------------+-------------------+-------+-------+
3 rows in set (0.000 sec)

# 但是遇到各种异常
obclient [(none)]> \s
ERROR 2027 (HY000): received malformed packet

obclient [(none)]> show databases;
+--------------------------+-------------------+
| Variable_name            | Value             |
+--------------------------+-------------------+
| tx_isolation             | READ-COMMITTED    |
| system_time_zone         | +08:00            |
| time_zone                | +08:00            |
| character_set_server     | utf8mb4           |
| character_set_client     | utf8mb4           |
| interactive_timeout      | 28800             |
| query_cache_size         | 1048576           |
| character_set_results    | utf8mb4           |
| max_allowed_packet       | 4194304           |
| sql_mode                 | STRICT_ALL_TABLES |
| net_buffer_length        | 16384             |
| wait_timeout             | 28800             |
| lower_case_table_names   | 2                 |
| query_cache_type         | OFF               |
| init_connect             |                   |
| transaction_isolation    | READ              |
| character_set_connection | utf8mb4           |
| net_write_timeout        | 60                |
+--------------------------+-------------------+
18 rows in set (0.000 sec)

obclient [(none)]> use oceanbase;
ERROR 2013 (HY000): Lost connection to MySQL server during query
obclient [(none)]> use test;
No connection. Trying to reconnect...
Connection id:    2097166
Current database: *** NONE ***

ERROR 2013 (HY000): Lost connection to MySQL server during query
obclient [(none)]>

确认两个点

  1. 集群是否正常存活,查看下进程是否还在

  2. 是否修改过集群sys租户下proxyro账号的密码,或者修改过obproxy变量observer_sys_password的值,如果有修改确保上面两个值一致

  1. 集群正常
    ob cluster list 结果已贴在上面
  2. proxyro账户密码未修改过,新初始化完的集群

辛苦看下OBD启动的集群配置文件中oceanbase-ce下proxyro_password 与obproxy-ce下的observer_sys_password一致吗

是指安装部署时的那个yaml文件吗,这两个都没配置过

是的 yaml配置文件,一般连不上是这两个值不一致连不上导致的,修改一致就可以的