[pgpool-general: 1363] md5 auth only works when I start pgpool with "-n"

David Kerr web at mr-paradox.net
Sat Feb 2 15:56:17 JST 2013


Howdy,

I believe I ran into this a few months ago and didn't get a resolution. Now I'm back at it and I hope
that there's an answer.

Basically, if i start pgpool (streaming replication / pooling mode) with:
pgpool -nf pgpool.conf

I can log in just fine via md5 authentication.

However, If i start it with
pgpool -f pgpool.conf

I get: psql: ERROR:  "MD5" authentication with pgpool failed for user "postgres"

Since it works fine when i don't background it, I have to assume that my
configuration is correct.

I can strace the various processes. (attached) 
master is: pgpool -f pgpool.conf
worker is: pgpool: worker process
waiter is: pgpool: wait for connection request

I'm on pgpool 3.2.1, CentOS.

Hopefully this one's already been covered quite a bit (although no luck with
google and reading back mailing list messages).

Thanks
-------------- next part --------------
Process 13423 attached - interrupt to quit
restart_syscall(<... resuming interrupted call ...>) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 7
setsockopt(7, SOL_TCP, TCP_NODELAY, [1], 4) = 0
open("/etc/hosts", O_RDONLY|O_CLOEXEC)  = 8
fstat(8, {st_mode=S_IFREG|0644, st_size=44, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f51ab735000
read(8, "127.0.0.1   localhost localhost."..., 4096) = 44
read(8, "", 4096)                       = 0
close(8)                                = 0
munmap(0x7f51ab735000, 4096)            = 0
socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 8
connect(8, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.0.0.2")}, 16) = 0
gettimeofday({1359786858, 638528}, NULL) = 0
poll([{fd=8, events=POLLOUT}], 1, 0)    = 1 ([{fd=8, revents=POLLOUT}])
sendto(8, "\230\367\1\0\0\1\0\0\0\0\0\0\6ccdb07\3ops\fcrowdcom"..., 45, MSG_NOSIGNAL, NULL, 0) = 45
poll([{fd=8, events=POLLIN}], 1, 5000)  = 1 ([{fd=8, revents=POLLIN}])
ioctl(8, FIONREAD, [61])                = 0
recvfrom(8, "\230\367\201\200\0\1\0\1\0\0\0\0\6ccdb07\3ops\fcrowdcom"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("10.0.0.2")}, [16]) = 61
close(8)                                = 0
fcntl(7, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
connect(7, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("10.0.1.105")}, 16) = -1 EINPROGRESS (Operation now in progress)
connect(7, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("10.0.1.105")}, 16) = -1 EALREADY (Operation already in progress)
connect(7, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("10.0.1.105")}, 16) = -1 EALREADY (Operation already in progress)
connect(7, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("10.0.1.105")}, 16) = -1 EALREADY (Operation already in progress)
connect(7, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("10.0.1.105")}, 16) = -1 EALREADY (Operation already in progress)
connect(7, {sa_family=AF_INET, sin_port=htons(5432), sin_addr=inet_addr("10.0.1.105")}, 16) = 0
fcntl(7, F_GETFL)                       = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(7, F_SETFL, O_RDWR)               = 0
write(7, "\0\0\0'\0\3\0\0user\0nobody\0database\0pos"..., 39) = 39
select(8, [7], NULL, [7], NULL)         = 1 (in [7])
read(7, "R\0\0\0\f\0\0\0\5\256\3631\316", 1024) = 13
write(7, "p\0\0\0(md51a3062133b1b13c8ad079ef1"..., 41) = 41
select(8, [7], NULL, [7], NULL)         = 1 (in [7])
read(7, "R\0\0\0\10\0\0\0\0S\0\0\0\26application_name\0\0"..., 1024) = 317
fcntl(7, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
write(7, "X\0\0\0\4", 5)                = 5
fcntl(7, F_GETFL)                       = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(7, F_SETFL, O_RDWR)               = 0
close(7)                                = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_IGN, [CHLD], SA_RESTORER|SA_RESTART, 0x7f51aa29d920}, 8) = 0
nanosleep({10, 0},  <unfinished ...>
Process 13423 detached
-------------- next part --------------
Process 13420 attached - interrupt to quit
select(8, [7], NULL, NULL, {1, 54859})  = 0 (Timeout)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(8, [7], NULL, NULL, {3, 0})      = 0 (Timeout)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(8, [7], NULL, NULL, {3, 0})      = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], NULL, 8) = 0
write(8, "\0", 1)                       = 1
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigreturn(0x2)                       = -1 EINTR (Interrupted system call)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(8, [7], NULL, NULL, {3, 0})      = 1 (in [7], left {2, 999998})
read(7, "\0", 1)                        = 1
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], NULL, 8) = 0
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 2}], WNOHANG, NULL) = 13665
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x7f51ab745a90) = 13674
time(NULL)                              = 1359786859
wait4(-1, 0x7fff55b169dc, WNOHANG, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(8, [7], NULL, NULL, {3, 0})      = 0 (Timeout)
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
select(8, [7], NULL, NULL, {3, 0} <unfinished ...>
Process 13420 detached
-------------- next part --------------
Process 13665 attached - interrupt to quit
select(7, [5 6], NULL, NULL, {224, 510164}) = 1 (in [5], left {218, 878664})
gettimeofday({1359786859, 402483}, NULL) = 0
accept(5, {sa_family=AF_FILE, NULL}, [2]) = 7
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], [], 8) = 0
semop(884737, {{0, -1, 0}}, 1)          = 0
semop(884737, {{0, 1, 0}}, 1)           = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
fcntl(7, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR)               = 0
rt_sigaction(SIGALRM, {0x409c40, [], SA_RESTORER, 0x7f51aaefb500}, {SIG_DFL, [ALRM], SA_RESTORER|SA_RESTART, 0x7f51aa29d920}, 8) = 0
alarm(60)                               = 0
select(8, [7], NULL, [7], NULL)         = 1 (in [7])
read(7, "\0\0\0T\0\3\0\0user\0postgres\0database\0p"..., 1024) = 84
alarm(0)                                = 60
rt_sigaction(SIGALRM, {SIG_IGN, [], SA_RESTORER, 0x7f51aaefb500}, {0x409c40, [], SA_RESTORER, 0x7f51aaefb500}, 8) = 0
fstat(4, {st_mode=S_IFREG|0644, st_size=0, ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f51ab735000
lseek(4, 0, SEEK_SET)                   = 0
read(4, "", 4096)                       = 0
read(4, "", 4096)                       = 0
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], [], 8) = 0
time([1359786859])                      = 1359786859
sendto(3, "<131>Feb  2 06:34:19 pgpool[1366"..., 95, MSG_NOSIGNAL, NULL, 0) = 95
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
fcntl(7, F_GETFL)                       = 0x2 (flags O_RDWR)
fcntl(7, F_SETFL, O_RDWR|O_NONBLOCK)    = 0
write(7, "E\0\0\0aSERROR\0CXX000\0M\"MD5\" authen"..., 98) = 98
fcntl(7, F_GETFL)                       = 0x802 (flags O_RDWR|O_NONBLOCK)
fcntl(7, F_SETFL, O_RDWR)               = 0
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], [], 8) = 0
semop(884737, {{0, -1, 0}}, 1)          = 0
semop(884737, {{0, 1, 0}}, 1)           = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
rt_sigprocmask(SIG_SETMASK, ~[ILL TRAP ABRT BUS FPE SEGV CONT SYS RTMIN RT_1], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(2)                           = ?
Process 13665 detached


More information about the pgpool-general mailing list