主库上的vip漂移到备库后,就不能用vip地址及备库上pool的端口号去连接数据库了-问答-阿里云开发者社区-阿里云

开发者社区> zzl630176776> 正文

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

2016-05-14 16:41:30 3784 1

环境信息:

    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

取消 提交回答
全部回答(1)
相关问答

17

回答

【大咖问答】对话PostgreSQL 中国社区发起人之一,阿里云数据库高级专家 德哥

阿里ACE 彭飞 2019-07-10 09:36:10 962171浏览量 回答数 17

162

回答

惊喜翻倍:免费ECS+免费环境配置~!(ECS免费体验6个月活动3月31日结束)

豆妹 2014-10-29 17:52:21 222937浏览量 回答数 162

8

回答

OceanBase 使用动画(持续更新)

mq4096 2019-02-20 17:16:36 333782浏览量 回答数 8

18

回答

阿里云开放端口权限

xcxx 2016-07-20 15:03:33 643008浏览量 回答数 18

38

回答

安全组详解,新手必看教程

我的中国 2017-11-30 15:23:46 256825浏览量 回答数 38

294

回答

Linux Bash严重漏洞修复紧急通知(已全部给出最终修复方案)

qilu 2014-09-25 13:26:50 431575浏览量 回答数 294

21

回答

请教一下数据量有100万条左右要什么配置?

易网网络 2013-03-27 15:18:02 192310浏览量 回答数 21

249

回答

阿里云LNAMP(Linux + Nginx + Apache + MySQL + PHP)环境一键安装脚本

云代维 2014-02-14 15:26:06 302556浏览量 回答数 249

40

回答

阿里云ecs从购买到环境搭建和建站!!(phpstudy一件包)

梦丫头 2014-07-29 20:51:49 162056浏览量 回答数 40

24

回答

【精品问答】python技术1000问(1)

问问小秘 2019-11-15 13:25:00 471183浏览量 回答数 24
+关注
0
文章
1
问答
问答排行榜
最热
最新
推荐问答
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载