根据官方文档,逐步搭建数据守护,在启动Monitor的时候报错,如下:
dmdba@dm3 bin]$ ./dmmonitor /opt/dmdbms/data/dmmonitor.ini
[monitor] 2022-08-26 04:27:24: DMMONITOR[4.0] V8
[monitor] 2022-08-26 04:27:24: DMMONITOR[4.0] IS READY.
[monitor] 2022-08-26 04:27:24: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.133:65101) error, code=-9423, please check configuration!!!
[monitor] 2022-08-26 04:27:24: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.134:65121) error, code=-9423, please check configuration!!!
[monitor] 2022-08-26 04:27:24: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.133:65101) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:24: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.134:65121) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:25: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.134:65121) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:25: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.133:65101) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:26: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.133:65101) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:26: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.134:65121) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:27: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.133:65101) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:27: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.134:65121) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:28: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.133:65101) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:28: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.134:65121) error, code=-6010, oguid or group_name mismatch, please check configuration!!!
[monitor] 2022-08-26 04:27:29: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.134:65121) error, code=-9423, please check configuration!!!
[monitor] 2022-08-26 04:27:29: dmmonitor(mid:1661459244) create link to dmwatcher(192.168.48.133:65101) error, code=-9423, please check configuration!!!
因为报错是oguid不一致,所以检查主备库的oguid,但是是一样的
网上查询相关案例,说是因为dmmonitor.ini的组名和dmwatcher.ini的组名不一致导致,但是检查发现还是一样的
最后检查dmmonitor.ini配置文件发现,是oguid的那一行手误注释掉了,导致整个问题,去掉注释后重启监视器成功
[root@dm3 data]# cat dmmonitor.ini
MON_DW_CONFIRM = 1 #确认监视器模式
MON_LOG_PATH = /opt/dmdbms/data/log #监视器日志文件存放路径
MON_LOG_INTERVAL = 60 #每隔 60s 定时记录系统信息到日志文件
MON_LOG_FILE_SIZE = 32 #每个日志文件最大 32M
MON_LOG_SPACE_LIMIT = 0 #不限定日志文件总占用空间
[GRP1]
#MON_INST_OGUID = 453331 #组 GRP1 的唯一 OGUID 值 #以下配置为监视器到组 GRP1 的守护进程的连接信息,以―IP:PORT‖的形式配置
#IP 对应 dmmal.ini 中的 MAL_HOST,PORT 对应 dmmal.ini 中的 MAL_DW_PORT
MON_DW_IP = 192.168.48.133:65101
MON_DW_IP = 192.168.48.134:65121