Skip to content
This repository has been archived by the owner on Nov 29, 2018. It is now read-only.

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

Open
amalagaura opened this issue Jan 21, 2011 · 4 comments
Open

Comments

@amalagaura
Copy link

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
Copy link
Owner

cep21 commented Jan 21, 2011

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
Copy link
Author

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
Copy link
Author

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

@amalagaura
Copy link
Author

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants