View Issue Details

IDProjectCategoryView StatusLast Update
0000003Pgpool-IIBugpublic2012-03-29 12:57
ReportertuomasAssigned To 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionopen 
PlatformLinuxOSUbuntuOS Version10.04
Product Version 
Target VersionFixed in Version 
Summary0000003: health checks to new master disconnect abnormally after master failover
Descriptionpgpool 3.1.2
Postgresql 9.1
mode: master/slave streaming replication

After failover connections to new master work fine, but although health checks to new master succeed they cause error in new master's log:

2012-02-10 11:37:44.520 UTC LOG: connection received: host=10.99.1.10 port=51886
2012-02-10 11:37:44.524 UTC LOG: connection authorized: user=pgpool database=postgres
2012-02-10 11:37:44.527 UTC LOG: disconnection: session time: 0:00:00.006 user=pgpool database=postgres host=10.99.1.10 port=51886
2012-02-10 11:37:44.567 UTC LOG: connection received: host=10.99.1.10 port=51887
2012-02-10 11:37:44.569 UTC LOG: could not receive data from client: Connection reset by peer
2012-02-10 11:37:44.569 UTC LOG: unexpected EOF within message length word
 

Steps To ReproduceStop master and after pgpool has failed over to new master, monitor new master's logs
TagsNo tags attached.

Activities

tuomas

2012-02-10 21:21

reporter   ~0000002

Actually it seems to happen even without any failover

tuomas

2012-02-10 21:46

reporter   ~0000003

This is how it looks in strace:

connect(11, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("10.99.1.20")}, 16) = 0
write(11, "\0\0\1(\0\2\0\0postgres\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 296) = 296
read(11, "R", 1) = 1
write(11, "X", 1) = 1
close(11) = 0

I guess postgresql protocol also expects the lenght of the message's contents in bytes.

psql seems to send this after \q:
sendto(3, "X\0\0\0\4", 5, MSG_NOSIGNAL, NULL, 0) = 5

t-ishii

2012-02-22 15:25

developer   ~0000010

Pgpool uses "version 2" protocol in this case and it does not require message length.

Issue History

Date Modified Username Field Change
2012-02-10 20:42 tuomas New Issue
2012-02-10 21:21 tuomas Note Added: 0000002
2012-02-10 21:46 tuomas Note Added: 0000003
2012-02-22 15:25 t-ishii Note Added: 0000010
2012-03-29 12:57 t-ishii Status new => closed