ocp-express界面错误

ob:4.1.0
部署ocp-express后,访问界面报错如下:


查看后台日志:

2023-09-26 17:50:53.719 WARN 43786 — [http-nio-8180-exec-3,f4c59609f6ca445a,0745f135bdc7] c.o.ocp.analyzer.RequestTracingAspect : API Error: [GET /api/v1/ob/tenants/1004/sessions client=183.6.36.46, traceId=f4c59609f6ca445a, duration=3 ms, errorMsg=[OCP NotFoundException]: status=404 NOT_FOUND, errorCode=OB_TENANT_CREDENTIAL_NOT_FOUND, args=ocp_meta]

而ocp_meta组会是存在的:

mysql> select * from __all_tenant where tenant_name='ocp_meta' \G
*************************** 1. row ***************************
                gmt_create: 2023-09-26 16:32:11.482209
              gmt_modified: 2023-09-26 16:32:32.688340
                 tenant_id: 1004
               tenant_name: ocp_meta
                 zone_list: zone1;zone2;zone3
              primary_zone: RANDOM
                    locked: 0
            collation_type: 0
                      info: 
                  locality: FULL{1}@zone1, FULL{1}@zone2, FULL{1}@zone3
         previous_locality: 
     default_tablegroup_id: -1
        compatibility_mode: 0
          drop_tenant_time: -1
                    status: NORMAL
             in_recyclebin: 0
arbitration_service_status: DISABLED
1 row in set (0.00 sec)
$ obclient -hxxxx -P2881 -uroot@ocp_meta -p
Enter password: 
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 3221568361
Server version: OceanBase_CE 4.1.0.2 (r104000032023092120-6059cef14d9ab49773c095c1204c8ec6196f2bfa) (Built Sep 21 2023 20:33: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 [(none)]>

报错信息是租户的密码不存在
具体用的是哪个版本呢,正常情况应该会自动把租户密码更新到元数据库里的

版本号: 4.2.0-20230731

我是几个组件单独部署的,如下:

-rw-rw-r--  1 admin admin 1215 Sep 26 10:20 observer-only.yaml
-rw-rw-r--  1 admin admin  477 Sep 26 10:39 obproxy-only.yaml
-rw-rw-r--  1 admin admin 2691 Sep 26 10:43 obagent-only.yaml
-rw-rw-r--  1 admin admin  941 Sep 26 18:24 ocp-express-only.yaml

$ obclient -hxxxx.10 -P2883 -uocp_user@ocp_meta -p
Enter password: 
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 655507
Server version: OceanBase_CE 4.1.0.2 (r104000032023092120-6059cef14d9ab49773c095c1204c8ec6196f2bfa) (Built Sep 21 2023 20:33: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 [(none)]> use ocp_express
Database changed
obclient [ocp_express]> show tables;
+-------------------------+
| Tables_in_ocp_express   |
+-------------------------+
| bootstrap_lock          |
| config_properties       |
| credential              |
| metric_class            |
| metric_data_minute      |
| metric_data_second      |
| metric_exporter_address |
| metric_expr_config      |
| metric_group            |
| metric_meta             |
| metric_series_key_id    |
| ob_agent                |
| ob_tenant               |
| ob_tenant_compaction    |
| ocp_instance            |
| subtask_dependencies    |
| subtask_instance        |
| subtask_log             |
| task_definition         |
| task_instance           |
| task_template           |
| user                    |
+-------------------------+
22 rows in set (0.002 sec)

ocp-express 是单独部署起来的吗


看一下这个表里的记录有ocp这个租户的吗

是单独部署的,observer、obproxy、obagent、ocp-express都是单独部署的,ocp-express是起来的,有些界面可以访问,如下:

这里没有对应的ocp租户的密码,只有sys租户的,涉及到租户下面的功能就没法访问了

ocp_meta root用户的密码和sys的是一样的吗,如果是可以按照id=2的那个记录插入一条tenant=ocp_meta的记录

插入后果然可以,请教下,为什么少这条记录呢?

猜测应该是一起部署的话整个流程里有建租户的过程,知道租户的信息,可以自动去写进去,但是单独去部署 ocp-express 只是给了db的连接信息,可能没处理租户的credential

还有个问题,请教下大佬,这个页面也没有数据:


上面已经有提示了,OB 性能指标相关的参数关闭了,所以采集不到数据

是不是之前做过压测,都修改了哪些参数,起码 enable_perf_event 这个参数要打开,如果enable_sql_audit 也关了,可能还会影响下面的sql相关的功能

是的,做tpcc相关的压测,tpcc压测遵循官方的调优说明,把部分参数优化了