Welcome! Log In Create A New Profile

Advanced

healthcheck do not working

April 15, 2011 04:25AM
I tried to use the latest stable: nginx/1.0.0
I installed both this healthcheck_nginx_upstream and cep21 / nginx_upstream_hash. Both patches

succeeded.

The configure looked good:
./configure --add-module=/tmp/cep21-healthcheck_nginx_upstreams-5fa4bff/ --with-

http_stub_status_module --with-http_ssl_module --prefix=/usr/local/nginx/
make && make install

finish it,no error and warning.


I used the sample nginx configs and have this:


upstream main_servers {
server 192.168.0.242:8080;
server 192.168.0.246:8090;
# hash $request_uri;
# hash_again 0;
healthcheck_enabled;
healthcheck_delay 200;
healthcheck_timeout 200;
healthcheck_failcount 1;
healthcheck_expected 'I_AM_ALIVE';
healthcheck_buffer 32;
healthcheck_send "GET /health HTTP/1.1" 'Host: $http_host';
}


#
# The default server
#
server {
listen 81;
server_name _;

#charset koi8-r;

#access_log logs/host.access.log main;

proxy_set_header Host $http_host;

#rewrite ^/destroute$ /destRoute/destrote.do;


location / {
proxy_pass http://main_servers;
proxy_next_upstream timeout invalid_header;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-For $remote_addr;
}
# include /etc/nginx/conf.d/*.conf;
}
}

Q1:I can't use module hash.when I use it,tell me: nginx: [emerg] unknown directive "hash" in

/usr/local/nginx/conf/nginx.conf:65
So I delete it

There is no error report during executing.

Q2;
In my opinion, when the "tomcat of host_192.168.0.242" hasn't totally started, healthcheck regards it as unvailable and transfers the visit link directly to "host_192.168.0.246".
It comes back after "host_192.168.0.242" has totally started.

But during the course of restart, there was no evidence showing that healthcheck is working.

Does it happen beacause of my wrong setting or my lack of understanding?

Looking forward for your help. Thank you for your help in advance.

Best regards!
Stone
Subject Author Posted

healthcheck do not working

Stone April 15, 2011 04:25AM

Re: healthcheck do not working

gidrobaton July 29, 2011 05:17AM

Re: healthcheck do not working

gidrobaton July 29, 2011 09:50AM

Re: healthcheck do not working

liseen July 29, 2011 10:06AM

Re: healthcheck do not working

gidrobaton August 01, 2011 07:15AM

Re: healthcheck do not working

liseen August 02, 2011 09:54AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 153
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready