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

栏目:云苍穹知识作者:金蝶来源:金蝶云社区发布:2024-09-23浏览:2

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 = /runtime/monitor/config/dbconfig的那条数据。例如我们以devcorelib_dev环境为例。我们需要在MC数据库的t_mc_datasave表中找到fdcid=devcorelib_dev 且 fkey=/runtime/monitor/config/dbconfig的那条数据,删除即可。或者在MC库中直接执行SQL:delete from t_mc_datasave where fdcid = ‘devcorelib_dev’and fkey = ‘/runtime/monitor/config/dbconfig’。

(2)然后去ZK里删除{集群名}/runtime/monitor/config/dbconfig。同样以devcorelib_dev环境为例。首先使用ZkCli客户端工具连接到ZK,然后执行delete devcorelib_dev/runtime/monitor/config/dbconfig 删除该节点数据即可。
(3)重启web节点。

(4)使用初始密码登录monitor,即可重新配置存储库。

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

一、问题描述登录monitor报错:报错信息:login exception, message: org.postgresql.util.PSQLException: Could not find a serve...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息