healthcheck do not working

liseen liseen.wan at gmail.com
Tue Aug 2 13:52:52 UTC 2011


Please check you nginx_upstream_hash with this command,

grep HEALTHCHECK ngx_http_upstream_hash_module.c
#if (NGX_HTTP_HEALTHCHECK)
#if (NGX_HTTP_HEALTHCHECK)
#if (NGX_HTTP_HEALTHCHECK)
#if (NGX_HTTP_HEALTHCHECK)
#if (NGX_HTTP_HEALTHCHECK)
#if (NGX_HTTP_HEALTHCHECK)

if you have compiled with right hash module,  Health check should be worked.
 I have used this module for 2 months.


On Mon, Aug 1, 2011 at 7:15 PM, gidrobaton <nginx-forum at nginx.us> wrote:

> >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
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20110802/550dccc2/attachment.html>


More information about the nginx mailing list