pgpool2.git / summary / log / commit / refs

commit    536beed687531d481432cc8a732e3e9fa480bf2b
Author:   Tatsuo Ishii <ishii at sraoss.co.jp>
Date:     Thu Sep 14 01:56:03 2006 +0000

    enhance health check error messages


main.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/main.c b/main.c index cb8e23a58..d0f51a2a7 100644 --- a/main.c +++ b/main.c @@ -1126,9 +1126,10 @@ int health_check(void) if (write(fd, &mysp, sizeof(mysp)) < 0) { - pool_error("health check failed during write. host %s at port %d is down", + pool_error("health check failed during write. host %s at port %d is down. reason: %s", BACKEND_INFO(i).backend_hostname, - BACKEND_INFO(i).backend_port); + BACKEND_INFO(i).backend_port, + strerror(errno)); close(fd); return i+1; } @@ -1137,9 +1138,10 @@ int health_check(void) if (write(fd, "X", 1) < 0) { - pool_error("health check failed during write. host %s at port %d is down", + pool_error("health check failed during write. host %s at port %d is down. reason: %s. Perhaps wrong health check user?", BACKEND_INFO(i).backend_hostname, - BACKEND_INFO(i).backend_port); + BACKEND_INFO(i).backend_port, + strerror(errno)); close(fd); return i+1; } [parent: b878fc688e81]