healthcheck do not working

gidrobaton nginx-forum at nginx.us
Mon Aug 1 11:15:25 UTC 2011


>Hi,
>You should compile upstream hash module which cep12 patched, See:
>https://github.com/cep21/nginx_upstream_hash/tree/support_http_healthchecks

nginx-1.0.5 was compiled with both patches:

root at true:/tmp/nginx-1.0.5# patch -p0 <
../nginx_upstream_hash-0.3.1/nginx.patch 
patching file src/http/ngx_http_upstream.h
Hunk #1 succeeded at 106 (offset 1 line).

root at true:/tmp/nginx-1.0.5# patch -p1 <
../healthcheck_nginx_upstreams/nginx.patch 
patching file src/http/ngx_http_upstream.c
patching file src/http/ngx_http_upstream.h
Hunk #1 succeeded at 110 with fuzz 2 (offset 4 lines).
patching file src/http/ngx_http_upstream_round_robin.c
patching file src/http/ngx_http_upstream_round_robin.h

root at true:/tmp/nginx-1.0.5# ./configure
--add-module=/tmp/nginx_upstream_hash-0.3.1/
--add-module=/tmp/healthcheck_nginx_upstreams/ --with-debug
root at true:/tmp/nginx-1.0.5# make -j5 && make install

But if I use "hash" options, error.log is empty after nginx reload, even
if I use "server" option, which indicates to closed port.

error_log  /usr/local/nginx/logs/error.log;
upstream backend {
#ip_hash;
server 172.16.0.130:181;
server 172.16.0.130:182;
server 172.16.0.130:122;
hash $remote_addr;
hash_again 0;
healthcheck_enabled;
healthcheck_delay 5000;
healthcheck_timeout 1500;
healthcheck_failcount 1;
healthcheck_send "GET /PingAction.do HTTP/1.0" 'Host: ivis0';
}

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,191445,213176#msg-213176



More information about the nginx mailing list