签到成功

知道了

CNDBA社区CNDBA社区

OceanBase OCP OB集群 proxyro 用户密码与 OCP 设置不相同 错误解决方法

2023-06-25 10:04 1274 0 原创 OceanBase
作者: dave

1 故障现象说明

通过单独部署的 OCP 来接管 OBServer 集群,报如下错误:

OB集群 proxyro 用户密码与 OCP 设置不相同http://www.cndba.cn/dave/article/131398

http://www.cndba.cn/dave/article/131398http://www.cndba.cn/dave/article/131398http://www.cndba.cn/dave/article/131398

2 问题过程

在 OBServer 集群在部署过程中有一些可选的参数,我这里并没有配置:

https://www.oceanbase.com/docs/common-oceanbase-database-cn-10000000001692942

其中可选的proxyro_password参数说明如下:

http://www.cndba.cn/dave/article/131398

  • OBD V2.0.0 及之前版本默认为空,OBD V2.1.0 及之后版本默认为随机字符串
  • ODP 连接 OceanBase 集群使用的账户名(proxyro@sys)的密码。使用 OBD V2.1.0 及之后版本时,未设置的情况下会自动生成随机字符串。

我们这里没有设置,所以在 OBD 部署的的时候,proxyro为随机密码。

这里可以通过查询 OBServer 验证:

http://www.cndba.cn/dave/article/131398

[dave@www.cndba.cn conf]$obclient -h192.168.1.100 -P2883 -uroot -p'xxxxxxx' -Doceanbase -A
Welcome to the OceanBase.  Commands end with ; or /g.
Your OceanBase connection id is 39919
Server version: OceanBase_CE 4.1.0.0 (r101010022023051821-f7379b26f8cd11f026e06846043550f9e0d42ead) (Built May 18 2023 21:14:14)

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

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

obclient [oceanbase]> select user,password from mysql.user;
+-------------+-------------------------------------------+
| user        | password                                  |
+-------------+-------------------------------------------+
| root        | *7dd15147a6e6f4756d87b10ef844a33ccbb75f2b |
| proxyro     | *e9c2bcdc178a99b7b08dd25db58ded2ee5bff050 |
| ocp_monitor | *8f0758d46ed87bbde2dc541a3f3c368ae7e53dfc |
+-------------+-------------------------------------------+
3 rows in set (0.002 sec)

默认的密码值可以通过集群配置文件查看:http://www.cndba.cn/dave/article/131398

[dave@www.cndba.cn ~]$obd cluster edit-config myoceanbase

    ocp_agent_monitor_password: KZ3PD17ZcN
    proxyro_password: eGcpD994UR
    ocp_meta_password: BWzMd0bEDi
    ocp_meta_tenant_log_disk_size: 7G
    enable_syslog_recycle: true
    enable_syslog_wf: false
    max_syslog_file_count: 4

这里报错侧原因是因为 OCP 中也有proxyro 用户,并且默认情况下,该用户的密码为空。

[dave@www.cndba.cn ~]# obclient -h172.21.122.31 -P2883 -uroot -p'xxxxxxx' -Doceanbase -AWelcome to the OceanBase.  Commands end with ; or /g.
Your OceanBase connection id is 2098209
Server version: OceanBase_CE 4.1.0.0 (r100000172023031416-6d4641c7bcd0462f0bf3faed011803c087ea1705) (Built Mar 14 2023 16:53:58)

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

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

obclient [oceanbase]> select user,password from mysql.user;
+---------+-------------------------------------------+
| user    | password                                  |
+---------+-------------------------------------------+
| root    | *7dd15147a6e6f4756d87b10ef844a33ccbb75f2b |
| proxyro |                                           |
+---------+-------------------------------------------+
2 rows in set (0.020 sec)

obclient [oceanbase]>

3 解决方法

虽然 OCP 中proxyro 的密码为空,但不代表没有密码,在没有设置密码的情况下,会使用默认密码:"3u^0kCdpE"进行连接。 http://www.cndba.cn/dave/article/131398

所以在 OBServer 端重新设置proxyro 用户的密码为 OCP 的默认密码即可:http://www.cndba.cn/dave/article/131398http://www.cndba.cn/dave/article/131398

obclient [oceanbase]> alter user proxyro identified by "3u^0kCdpE";

版权声明:本文为博主原创文章,未经博主允许不得转载。

用户评论
* 以下用户言论只代表其个人观点,不代表CNDBA社区的观点或立场
dave

dave

关注

人的一生应该是这样度过的:当他回首往事的时候,他不会因为虚度年华而悔恨,也不会因为碌碌无为而羞耻;这样,在临死的时候,他就能够说:“我的整个生命和全部精力,都已经献给世界上最壮丽的事业....."

  • 2261
    原创
  • 3
    翻译
  • 578
    转载
  • 191
    评论
  • 访问:7989363次
  • 积分:4346
  • 等级:核心会员
  • 排名:第1名
精华文章
    最新问题
    查看更多+
    热门文章
      热门用户
      推荐用户
        Copyright © 2016 All Rights Reserved. Powered by CNDBA · 皖ICP备2022006297号-1·

        QQ交流群

        注册联系QQ