root@proxysys密码问题

os:ubuntu 2204
db:4.3.0.1

obproxy-ce:
    obproxy_sys_password: obdemoobproxy
    observer_sys_password: obdemoproxyro  # 这个和oceanbase-ce.proxyro_password 保持一致

现在obproxy上可以用 obclient -uroot@sys -p -h127.0.0.1 -P2883 可以连上去的,但是:

admin@ubuntu:~$ obclient -uroot@proxysys -p -h127.0.0.1 -P2883
Enter password: 
ERROR 2027 (HY000): received malformed packet

这里输入的是 obproxy-ce.obproxy_sys_password

  1. 提供下相对得配置文件。
    2.建议obproxy_sys_password和 observer_sys_password密码设置为一致得。

如文中所说,obproxy_sys_password和 observer_sys_password密码是相同的,obclient -uroot@sys -p -h127.0.0.1 -P2883 都可以正常访问,如果不一致,这个就无法访问。

这两个可以不一样啊,前者是proxysys 管理root账号的密码,后者是obproxy连接observer的密码,理论上可以不一样。

稍等。

当前部署方式是什么呢。
完整 得配置文件麻烦提供下

xxx.txt (9.1 KB)

obd黑屏部署

我使用你得配置文件部署了下。可以登陆。

admin@ubuntu:~$ mysql   -h10.18.18.126 -P2883 -uroot@proxysys -p
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1680615140
Server version: 5.6.25

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> quit
Bye
admin@ubuntu:~$ obclient   -h10.18.18.126 -P2883 -uroot@proxysys -p
Enter password: 
ERROR 2027 (HY000): received malformed packet
admin@ubuntu:~$ 

mysql client可以登录,但是obclient不可以。

admin@ubuntu:~$ obclient --version
obclient  Ver  Distrib 10.4.18-MariaDB, for Linux (x86_64) using readline 5.1

obd日志提供下 ~/.obd/log/obd日志

obclient 增加个参数 --proxy-mode 看下。

–proxy-mode=true 就可以

这个问题是obclient已知问题,可以官网下载最新版本obclient安装即可。

还会报一些莫名其妙的的错误:


obclient [(none)]> status;
ERROR 2027 (HY000): received malformed packet
obclient [(none)]> 
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.002 sec)

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

mysql shell登录:

admin@ubuntu:~$ mysql -uroot@proxysys -p -h127.0.0.1 -P2883 
Enter password: 
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1680634025
Server version: 5.6.25

Copyright (c) 2000, 2024, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

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

mysql> status
--------------
mysql  Ver 8.0.36-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))

Connection id:          1680634025
ERROR 2027 (HY000): Malformed packet
SSL:                    Not in use
Current pager:          stdout
Using outfile:          ''
Using delimiter:        ;
Server version:         5.6.25
Protocol version:       10
Connection:             127.0.0.1 via TCP/IP
ERROR 2027 (HY000): Malformed packet
Client characterset:    utf8mb4
Server characterset:    utf8mb4
TCP port:               2883
Binary data as:         Hexadecimal
--------------

mysql> 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.00 sec)

mysql> 

可以更新下obclient客户端再看下。
官网下载最新的版本安装。