暂无图片
分享
Zoe
2022-08-31
openGauss 不用om工具 手动做主备时报错
openGauss 不用om工具 手动做主备时报错
收藏
分享
9条回答
默认
最新
Zoe

已解决

暂无图片 评论
暂无图片 有用 0
打赏 0
暂无图片
Zoe

在备上 构建主备关系,执行 gs_ctl build -D /gaussdb/data/db1/ -b full -M standby 时报错

信息:

[2022-08-31 17:59:30.432][11944][][gs_ctl]: gs_ctl full build ,datadir is /gaussdb/data/db1
waiting for server to shut down.... done
server stopped
[2022-08-31 17:59:31.462][11944][][gs_ctl]: current workdir is (/home/omm).
[2022-08-31 17:59:31.462][11944][][gs_ctl]: fopen build pid file "/gaussdb/data/db1/gs_build.pid" success
[2022-08-31 17:59:31.462][11944][][gs_ctl]: fprintf build pid file "/gaussdb/data/db1/gs_build.pid" success
[2022-08-31 17:59:31.468][11944][][gs_ctl]: fsync build pid file "/gaussdb/data/db1/gs_build.pid" success
[2022-08-31 17:59:31.469][11944][][gs_ctl]: set gaussdb state file when full build build:db state(BUILDING_STATE), server mode(STANDBY_MODE), build mode(FULL_BUILD).
[2022-08-31 17:59:31.470][11944][dn_6001][gs_ctl]: build connection to 10.1.13.30 failed cause could not connect to server: Operation now in progress
Is the server running on host "10.1.13.30" and accepting
TCP/IP connections on port 26001?
.
[2022-08-31 17:59:31.470][11944][dn_6001][gs_ctl]: build try host(10.1.13.30) port(26001) failed
[2022-08-31 17:59:31.470][11944][dn_6001][gs_ctl]: could not connect to server.
[2022-08-31 17:59:31.470][11944][dn_6001][gs_ctl]: full build failed(/gaussdb/data/db1).



检查了两台机子的 postgresql.conf  主上如下:

replconninfo1 = 'localhost=10.1.13.30 localport=26001 localheartbeatport=26005 localservice=26004 remotehost=10.1.13.107 remoteport=26001 remoteheartbeatport=26005 remoteservice=26004'

备上如下:

replconninfo1 = 'localhost=10.1.13.107 localport=26001 localheartbeatport=26005 localservice=26004 remotehost=10.1.13.30 remoteport=26001 remoteheartbeatport=26005 remoteservice=26004'



两台机子的pg_hba.conf 如下:

# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 10.1.13.30/32 sha256
host all all 10.1.13.30/32 trust
host all all 10.1.13.107/32 trust
host all all 0.0.0.0/0 md5
# IPv6 local connections:
host all all ::1/128 trust



暂无图片 评论
暂无图片 有用 0
打赏 0
Zoe

部分日志如下:

暂无图片 评论
暂无图片 有用 0
打赏 0
刘贵宾

备库不能接收主备HA连接

暂无图片 评论
暂无图片 有用 0
打赏 0
Zoe
题主
2022-08-31
我的主库是normal状态,主库也是Primary角色。 还有什么情况导致备库不能接收主备HA连接呢?可以详细说说嘛?谢谢🙏
Zoe


暂无图片 评论
暂无图片 有用 0
打赏 0
李宏达

看起来像是添加了不必要的hba条目,建议只保留原有的hba,然后参考这边文章。

https://www.modb.pro/db/70779

暂无图片 评论
暂无图片 有用 0
打赏 0
Zoe
题主
2022-09-01
只保留了三条,其余都注释了 但还是没用 唉~ host all all 0.0.0.0/0 md5 # IPv4 local connections: host all all 0.0.0.0/0 md5 # IPv6 local connections: host all all ::1/128 trust 按照这个配置的 echo "port=26000" >> /opt/mogdb/data/postgresql.conf echo "listen_addresses = '0.0.0.0'" >> /opt/mogdb/data/postgresql.conf echo "password_encryption_type = 0" >> /opt/mogdb/data/postgresql.conf echo "log_directory = 'pg_log'" >> /opt/mogdb/data/postgresql.conf echo "remote_read_mode=non_authentication" >> /opt/mogdb/data/postgresql.conf echo "host all all 0.0.0.0/0 md5" >> /opt/mogdb/data/pg_hba.conf
李宏达


试试这个

# IPv4 local connections:
host all all 127.0.0.1/32 trust
host all all 10.1.13.30/32 trust
host all all 0.0.0.0/0 md5
# IPv6 local connections:
host all all ::1/128 trust

暂无图片 评论
暂无图片 有用 0
打赏 0
Zoe
题主
2022-09-01
还是不太行 尝试在主上远程连接备的数据库,还是报以下错: gsql: could not connect to server: Operation now in progress Is the server running on host "10.1.13.107" and accepting TCP/IP connections on port 26000? 两边端口都没有做网络上的限制,也是正在监听的
Zoe
升级问题到: 紧急故障
暂无图片 评论
暂无图片 有用 0
打赏 0
Zoe
问题已关闭: 问题已经得到解决
暂无图片 评论
暂无图片 有用 0
打赏 0
回答交流
Markdown


请输入正文
提交