开发者社区> 问答> 正文

主库上的vip漂移到备库后,就不能用vip地址及备库上pool的端口号去连接数据库了

环境信息:

    centos操作系统一主一备.
    数据库版本:9.4.5
    pool版本:3.4

问题描述:主库上的vip漂移到备库后,就不能用vip地址及备库上pool的端口号去连接数据库了.

错误现象:

    [srdb@localhost ~]$ psql -p 1975
    sql: server closed the connection unexpectedly
    This probably means the server terminated abnormally
    before or while processing the request.

主库上pool的日志:
2016-05-14 01:17:11: pid 5694: LOG: child process received shutdown request signal 2
2016-05-14 01:17:11: pid 5654: DEBUG: PCP child receives shutdown request signal 2
2016-05-14 01:17:11: pid 5451: DEBUG: watchdog heartbeat receiver child receives shutdown request signal 2
2016-05-14 01:17:11: pid 5452: DEBUG: watchdog heartbeat sender child receives shutdown request signal 2
SIOCSIFFLAGS: 权限不够
2016-05-14 01:17:11: pid 5453: DEBUG: watchdog exec ifconfig failed
2016-05-14 01:17:11: pid 5453: DETAIL: 'ifconfig eth1:0 down' failed. exit status: 255
2016-05-14 01:17:11: pid 5453: WARNING: watchdog bringing down delegate IP, ifconfig down failed

[srdb@localhost sr_log]$ cat srdbql-2016-05-14_005918.log
日志: 数据库上次关闭时间为 2016-05-14 00:57:54 PDT
日志: MultiXact member wraparound protections are now enabled
日志: 数据库系统准备接受连接
日志: DBAV started
日志: 接收到快速 (fast) 停止请求
日志: 中断任何激活事务
日志: DBAV shutting down
日志: 正在关闭
日志: 数据库系统已关闭


备库上pool的日志:

2016-05-14 01:17:10: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:11: pid 4798: LOG: watchdog escalation
2016-05-14 01:17:11: pid 4798: DETAIL: escalating to master srcluster
SIOCSIFADDR: 权限不够
SIOCSIFFLAGS: 权限不够
SIOCSIFNETMASK: 权限不够
SIOCGIFADDR: 无法指定被请求的地址
SIOCSIFBROADCAST: 权限不够
2016-05-14 01:17:11: pid 4798: DEBUG: watchdog exec ifconfig failed
2016-05-14 01:17:11: pid 4798: DETAIL: 'ifconfig eth1:0 inet $_IP_$ netmask 255.255.255.0' failed. exit status: 255
2016-05-14 01:17:11: pid 4798: WARNING: watchdog failed to bring up delegate IP, 'ifconfig up' failed
2016-05-14 01:17:11: pid 4798: DEBUG: watchdog standing for master
2016-05-14 01:17:11: pid 4798: DETAIL: send the packet to declare the new master
2016-05-14 01:17:11: pid 4798: NOTICE: watchdog escalation successful, escalated to master srcluster with some errors
2016-05-14 01:17:12: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:14: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:16: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:18: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:20: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:21: pid 5024: DEBUG: I am 5024 accept fd 7
2016-05-14 01:17:21: pid 5024: DEBUG: reading startup packet
2016-05-14 01:17:21: pid 5024: DETAIL: Protocol Major: 1234 Minor: 5679 database: user:
2016-05-14 01:17:21: pid 5024: DEBUG: selecting backend connection
2016-05-14 01:17:21: pid 5024: DETAIL: SSLRequest from client
2016-05-14 01:17:21: pid 5024: DEBUG: reading startup packet
2016-05-14 01:17:21: pid 5024: DETAIL: application_name: sql
2016-05-14 01:17:21: pid 5024: DEBUG: reading startup packet
2016-05-14 01:17:21: pid 5024: DETAIL: Protocol Major: 3 Minor: 0 database: srdb user: srdb
2016-05-14 01:17:21: pid 5024: DEBUG: creating new connection to backend
2016-05-14 01:17:21: pid 5024: DETAIL: connecting 0 backend
2016-05-14 01:17:21: pid 5024: LOG: failed to connect to SrdbSQL server on "192.168.139.146:9999", getsockopt() detected error "Operation now in progress"
2016-05-14 01:17:21: pid 5024: LOG: degenerate backend request for node_id: 0 from pid [5024] is canceled because failover is disallowed on the node
2016-05-14 01:17:21: pid 4796: DEBUG: reaper handler
2016-05-14 01:17:21: pid 4796: LOG: child process with pid: 5024 exits with status 256
2016-05-14 01:17:21: pid 4796: LOG: fork a new child process with pid: 5032
2016-05-14 01:17:21: pid 4796: DEBUG: reaper handler: exiting normally
2016-05-14 01:17:21: pid 5032: DEBUG: initializing backend status
2016-05-14 01:17:22: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:24: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:26: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:28: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:30: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:32: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694
2016-05-14 01:17:32: pid 5032: DEBUG: I am 5032 accept fd 7
2016-05-14 01:17:32: pid 5032: DEBUG: reading startup packet
2016-05-14 01:17:32: pid 5032: DETAIL: Protocol Major: 1234 Minor: 5679 database: user:
2016-05-14 01:17:32: pid 5032: DEBUG: selecting backend connection
2016-05-14 01:17:32: pid 5032: DETAIL: SSLRequest from client
2016-05-14 01:17:32: pid 5032: DEBUG: reading startup packet
2016-05-14 01:17:32: pid 5032: DETAIL: application_name: sql
2016-05-14 01:17:32: pid 5032: DEBUG: reading startup packet
2016-05-14 01:17:32: pid 5032: DETAIL: Protocol Major: 3 Minor: 0 database: srdb user: srdb
2016-05-14 01:17:32: pid 5032: DEBUG: creating new connection to backend
2016-05-14 01:17:32: pid 5032: DETAIL: connecting 0 backend
2016-05-14 01:17:32: pid 5032: LOG: failed to connect to SrdbSQL server on "192.168.139.146:9999", getsockopt() detected error "Operation now in progress"
2016-05-14 01:17:32: pid 5032: LOG: degenerate backend request for node_id: 0 from pid [5032] is canceled because failover is disallowed on the node
2016-05-14 01:17:32: pid 4796: DEBUG: reaper handler
2016-05-14 01:17:32: pid 4796: LOG: child process with pid: 5032 exits with status 256
2016-05-14 01:17:32: pid 4796: LOG: fork a new child process with pid: 5036
2016-05-14 01:17:32: pid 4796: DEBUG: reaper handler: exiting normally
2016-05-14 01:17:32: pid 5036: DEBUG: initializing backend status
2016-05-14 01:17:34: pid 4800: DEBUG: watchdog heartbeat: send heartbeat signal to 192.168.139.146:9694

备库上数据库日志:
[srdb@localhost sr_log]$ cat srdbql-2016-05-14_005921.log
日志: 在2016-05-14 00:58:00 PDT,数据库在恢复中关闭
日志: 正在进入备用模式
日志: 在0/E0000090上已到达一致性恢复状态
日志: 数据库系统准备接受只读请求的连接
日志: record with incorrect prev-link 0/90000028 at 0/E0000090
日志: 在时间点: 0/E0000000 (时间安排1)启动日志的流操作
日志: redo 在 0/E0000090 开始
日志: 复制由主用服务器终止
详细信息: WAL结束时,到了时间线1和地址0/E4000090.
致命错误: 无法向主服务器:no COPY in progress

    发送流终止的消息

日志: record with incorrect prev-link 0/98000028 at 0/E4000090

展开
收起
zzl630176776 2016-05-14 16:41:30 4945 0
1 条回答
写回答
取消 提交回答
  • ecs不支持lvs lz多想了

    2019-07-17 19:03:09
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
DTCC 2022大会集锦《云原生一站式数据库技术与实践》 立即下载
阿里云瑶池数据库精要2022版 立即下载
2022 DTCC-阿里云一站式数据库上云最佳实践 立即下载