monitor登录报错pgsql: Could not find a server with specified targetServerType: primary

一、问题描述
登录monitor报错:
报错信息:login exception, message: org.postgresql.util.PSQLException: Could
not find a server with specified targetServerType: primary
二、解决方法
1.检查MC群管理配置信息中kafka的ip和端口是否配置有误

2.检查公共配置项log.config中,日志输出到kafka的配置(一个是mservice一个是web中此配置项):

注意事项:修改完正确配置后,若还没有日志,需重启苍穹服务mservice
3.再检查kafka、logstash、es服务是否正常;
systemctl status kafka
systemctl status logstash
systemctl status es
4.在确认MC中monitor数据库配置信息
举例如下:
进入具体mc库下查询表
查询表得到配置信息:select * from t_mc_datasave t where t.fdcid='当前mc中配置群集名' and t.fkey like '%db%';发现数据库为主从模式,若已经切换了主库,导致前面提示报错。
5.重新初始化monitor的库解决配置问题
建议数据库上配置也为主、从IP信息,防止切换后,monitor使用不了情况。monitor的存储库配置信息在配置完成后,会存储在MC数据库、ZK和内存缓存中;可以按照如下的操作步骤进行重置操作。
(1)首先删除MC数据库t_mc_datasave 表中fdcid={集群名}且fkey = /ru
monitor登录报错pgsql: Could not find a server with specified targetServerType: primary
声明:除非特别标注,否则均为本站原创文章,转载时请以链接形式注明文章出处。如若本站内容侵犯了原著者的合法权益,可联系本站删除。



