healthcheck do not working
Stone
nginx-forum at nginx.us
Fri Apr 15 12:25:11 MSD 2011
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
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,191445,191445#msg-191445
More information about the nginx
mailing list