cep21 / healthcheck_nginx_upstreams

Health checks upstreams for nginx
http://wiki.nginx.org/NginxHttpHealthcheckModule
253 stars 599 forks source link

Getting healthcheck status page, but no healthchecks being performed #7

Open amalagaura opened 13 years ago

amalagaura commented 13 years ago

I tried to use the latest stable: nginx/0.8.54 I installed both this healthcheck_nginx_upstream and cep21 / nginx_upstream_hash. Both patches succeeded.

The configure looked good: ./configure --add-module=../nginx_upstream_hash/ --add-module=../healthcheck_nginx_upstreams/ --with-http_stub_status_module --prefix=/opt/nginx --with-http_ssl_module --error_log=logs/error.log --user=root --group=root

I used the sample nginx configs and have this:

upstream thin_system {

hash $request_uri;
hash_again 0;
healthcheck_enabled;
healthcheck_delay 250;
healthcheck_timeout 100;
healthcheck_failcount 1;
## We will just check for HTTP 200
#    healthcheck_expected 'HEALTH_OK';
 healthcheck_send "GET /ajax/health HTTP/1.0" 'Host: healthcheck';
    server ch1-app03:3000;
  }

I have the servers which point to the backend (was working before, just trying to add the healthcheck), but it always succeeds and I don't see any traffic going out on the healthchecks. (the /ajax/health returns a 404 right now)

So I check this: location /stat { healthcheck_status; }

But it is blank with only the header: Index Name Owner PID Last action time Concurrent status values Time of concurrent values Last response down Last health status Is down?

It doesn't have a list of servers and all requests are going through.

cep21 commented 13 years ago

Does the sample config that comes with the module work: Do you see the servers inside the healthcheck_status page for that one?

The source for the module has a lot of ngx_log_debug0() statements. Can you compile with debug turned on (during compile and in the config) and show me the log output?

amalagaura commented 13 years ago

I just tried enabling debug in compile and using your sample config. It still doesn't work, but nginx accepts all the healthcheck parameters in the config (I try misspelling and it doesn't like). I check the debug log and there is nothing related to health checking. Only upstream. Here is a single request to port 81 which succeeds once I created the html_1114 & html_1115 directories: 'http://pastebin.com/m6G9Cv4a' But these should fail because there is no 'I_AM_ALIVE' in the default index.html, just 'welcome to Nginx'

Hope this helps, I am going to try older versions.

amalagaura commented 13 years ago

I tried the same version as the example but am not able to get healthchecks: http://pastebin.com/HsQf0Ynz

amalagaura commented 13 years ago

Damn I am feeling dumb, when I patched from your hash upstream support health checks, i just saw that it was on master. I am checking out the correct branch and trying again.