ocp-express没有数据

2024-06-12T15:46:52.26973+08:00 ERROR [57046,] caller=inputs/ocp.go:40:func2: init connectivityInput failed fields:, error=“init DB connections failed: Error 1045: Access denied for user ‘ocp_monitor’@‘xxx.xxx.xxx.xxx’ (using password: NO)”
2024-06-12T15:46:52.26975+08:00 ERROR [57046,] caller=engine/config_manager.go:202:handleConfigEvent: CreatePipelineV2s init source failed fields: error=“init DB connections failed: Error 1045: Access denied for user ‘ocp_monitor’@‘xxx.xxx.xxx.xxx’ (using password: NO)”
2024-06-12T15:46:52.26978+08:00 ERROR [57046,c7188c2943b852f4] caller=engine/config_manager.go:155:handleAddEvent: CreatePipelines failed fields: error=“init DB connections failed: Error 1045: Access denied for user ‘ocp_monitor’@‘xxx.xxx.xxx.xxx’ (using password: NO)”
2024-06-12T15:46:56.35011+08:00 ERROR [57046,] caller=plugins/registry.go:137:GetPlugin: init tableInput failed fields: error=“db ping: Error 1045: Access denied for user ‘ocp_monitor’@‘xxx.xxx.xxx.xxx’ (using password: NO)”
2024-06-12T15:46:56.35017+08:00 ERROR [57046,] caller=engine/config_manager.go:202:handleConfigEvent: CreatePipelineV2s init source failed fields:, error=“db ping: Error 1045: Access denied for user ‘ocp_monitor’@‘xxx.xxx.xxx.xxx’ (using password: NO)”
2024-06-12T15:46:56.3502+08:00 ERROR [57046,c7188c2943b852f4] caller=engine/config_manager.go:155:handleAddEvent: CreatePipelines failed fields: error=“db ping: Error 1045: Access denied for user ‘ocp_monitor’@‘xxx.xxx.xxx.xxx’ (using password: NO)”

看下租户管理呢。ocp_monitor是默认创建时有的,还是自己创建的呢。

独立部署ocp的时候,手工创建的,非obd自动创建的。

那需要输入你手工创建时的密码。

那就是修改obagent的配置中配置的ocp_monitor用户的密码。

admin@ubuntu:~/obagent/conf$ tree  -L 2
.
├── 2024-06-03T16:30:13.5152+08:00
│   ├── config_properties
│   └── module_config
├── 2024-06-04T16:04:36.7871+08:00
│   ├── config_properties
│   └── module_config
├── agentctl.yaml
├── agentd.yaml
├── config_properties
│   ├── basic_auth.yaml
│   ├── common_meta.yaml
│   ├── log.yaml
│   ├── monagent_pipeline.yaml
│   └── ob_logcleaner.yaml
├── mgragent.yaml
├── module_config
│   ├── common_module.yaml
│   ├── log_module.yaml
│   ├── mgragent_logquerier_module.yaml
│   ├── mgragent_module.yaml
│   ├── monagent_basic_auth.yaml
│   ├── monitor_host_log.yaml
│   ├── monitor_mysql.yaml
│   ├── monitor_node_host.yaml
│   ├── monitor_ob_custom.yaml
│   ├── monitor_ob_log.yaml
│   ├── monitor_observer_log.yaml
│   ├── monitor_ob.yaml
│   └── ob_logcleaner_module.yaml
├── monagent.yaml
├── obd_agent_mapper.yaml
├── prometheus_config
│   ├── prometheus.yaml
│   └── rules
└── shell_templates
    └── shell_template.yaml

11 directories, 25 files
admin@ubuntu:~/obagent/conf$ grep -i -R  ocp_monitor  *.* -C 4
2024-06-03T16:30:13.5152+08:00/config_properties/monagent_pipeline.yaml-configVersion: "2024-06-03T16:30:13.5152+08:00"
2024-06-03T16:30:13.5152+08:00/config_properties/monagent_pipeline.yaml-configs:
2024-06-03T16:30:13.5152+08:00/config_properties/monagent_pipeline.yaml-    - key: monagent.ob.monitor.user
2024-06-03T16:30:13.5152+08:00/config_properties/monagent_pipeline.yaml:      value: ocp_monitor
2024-06-03T16:30:13.5152+08:00/config_properties/monagent_pipeline.yaml-      valueType: string
2024-06-03T16:30:13.5152+08:00/config_properties/monagent_pipeline.yaml-      encrypted: false
2024-06-03T16:30:13.5152+08:00/config_properties/monagent_pipeline.yaml-    - key: monagent.ob.monitor.password
2024-06-03T16:30:13.5152+08:00/config_properties/monagent_pipeline.yaml-      value: obdemoagent
--
2024-06-04T16:04:36.7871+08:00/config_properties/monagent_pipeline.yaml-configVersion: "2024-06-04T16:04:36.7871+08:00"
2024-06-04T16:04:36.7871+08:00/config_properties/monagent_pipeline.yaml-configs:
2024-06-04T16:04:36.7871+08:00/config_properties/monagent_pipeline.yaml-    - key: monagent.ob.monitor.user
2024-06-04T16:04:36.7871+08:00/config_properties/monagent_pipeline.yaml:      value: ocp_monitor
2024-06-04T16:04:36.7871+08:00/config_properties/monagent_pipeline.yaml-      valueType: string
2024-06-04T16:04:36.7871+08:00/config_properties/monagent_pipeline.yaml-      encrypted: false
2024-06-04T16:04:36.7871+08:00/config_properties/monagent_pipeline.yaml-    - key: monagent.ob.monitor.password
2024-06-04T16:04:36.7871+08:00/config_properties/monagent_pipeline.yaml-      value: "

直接修改文件?感觉修改文件太麻烦。还是有其他的方法,比如用obd修改呢?

用obd修改配置,在obagent 部分加如下内容:

obagent:
  style: default
  servers:
  global:
    home_path: /home/admin/obagent

    http_basic_auth_password: jt8WPp8I0
    **monitor_user: ocp_monitor**
    **monitor_password: ocp_monitor**

obd cluster edit-config obdemo.yaml 配置文件,新加了上面

    monitor_user: ocp_monitor
    monitor_password: ocp_monitor

重启集群:

admin@ubuntu:~$ obd cluster start  obdemo  -c obagent
[ERROR] Deploy need restart.
Use `obd cluster restart obdemo --wp` to make changes take effect.
If you still need to start the cluster, use the `obd cluster start obdemo --wop` option to start the cluster without loading parameters. 
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 1892fd9a-28a3-11ef-865d-c62cc4bad044
If you want to view detailed obd logs, please run: obd display-trace 1892fd9a-28a3-11ef-865d-c62cc4bad044
admin@ubuntu:~$ obd cluster restart obdemo --wp
Get local repositories and plugins ok
Load cluster param plugin ok
Open ssh connection ok
Cluster status check ok
Search plugins ok
Load cluster param plugin ok
Cluster status check ok
Check before start observer ok
Check before start obagent ok
Check before start ob-configserver ok
Check before start obproxy ok
Check before start ocp-express ok
Start observer ok
observer program health check ok
obshell program health check ok
Connect to observer 10.12.75.64:2881 ok
Start obagent ok
obagent program health check ok
Connect to Obagent ok
Start ob-configserver ok
ob-configserver program health check ok
Connect to ob-configserver ok
Start obproxy ok
obproxy program health check ok
Connect to obproxy x
[ERROR] OBD-1006: Failed to connect to obproxy-ce
Wait for observer init ok
[ERROR] OBD-1005: Some of the servers in the cluster have been stopped
See https://www.oceanbase.com/product/ob-deployer/error-codes .
Trace ID: 1f8a7272-28a3-11ef-a7af-c62cc4bad044
If you want to view detailed obd logs, please run: obd display-trace 1f8a7272-28a3-11ef-a7af-c62cc4bad044

具体内容如下:

[2024-06-12 18:05:05.961] [DEBUG] --- connect 10.xx.xx.126 -P2883 -uroot@proxysys -pobdemoobproxy
[2024-06-12 18:05:08.965] [DEBUG] --- connect 10.xx.xx.126 -P2883 -uroot@proxysys -p
[2024-06-12 18:05:12.037] [ERROR] OBD-1006: Failed to connect to obproxy-ce
[2024-06-12 18:05:12.037] [DEBUG] -- sub connect ref count to 0
[2024-06-12 18:05:12.037] [DEBUG] -- export connect

第一次部署的时候root@proxysys密码是obdemoobproxy,后来改成了(
1)连接实例修改 ;2)也修改了部署配置;)
为什么这里还是用老的密码来连接呢?

通过edit-config修改后,下方会出现一个obd cluster reload 命令。或者obd cluster redeploy 重装命令

没有,出现这个:
Use obd cluster restart obdemo --wp to make changes take effect.
肯定不能redeploy了

@王利博 大佬帮看看这个,如果通过obd修改参数(实际上一些账号密码已经通过alter修改了,只是想修改部署配置的)让其保持一致

这里看下租户管理呢。 是否有ocp 和sys租户。

不明白您的意思

可以重新提个单,把租户管理、agent、observer.log日志还有配置文件都提供下吧。