atom feed6 messages in ru.sysoev.nginxRe: healthcheck do not working
FromSent OnAttachments
StoneApr 15, 2011 1:24 am 
gidrobatonJul 29, 2011 2:16 am 
gidrobatonJul 29, 2011 6:50 am 
liseenJul 29, 2011 7:03 am 
gidrobatonAug 1, 2011 4:15 am 
liseenAug 2, 2011 6:52 am 
Subject:Re: healthcheck do not working
From:gidrobaton (ngin@nginx.us)
Date:Aug 1, 2011 4:15:02 am
List:ru.sysoev.nginx

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@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@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@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@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