| From | Sent On | Attachments |
|---|---|---|
| Stone | Apr 15, 2011 1:24 am | |
| gidrobaton | Jul 29, 2011 2:16 am | |
| gidrobaton | Jul 29, 2011 6:50 am | |
| liseen | Jul 29, 2011 7:03 am | |
| gidrobaton | Aug 1, 2011 4:15 am | |
| liseen | Aug 2, 2011 6:52 am |
| Subject: | Re: healthcheck do not working | |
|---|---|---|
| From: | gidrobaton (ngin...@nginx.us) | |
| Date: | Jul 29, 2011 2:16:30 am | |
| List: | ru.sysoev.nginx | |
Good day! I have same problem with nginx-1.0.5 (and nginx-1.0.0)
root@true:/tmp/nginx-1.0.5# ./configure --add-module=/tmp/nginx_upstream_hash-0.3.1/ --add-module=/tmp/healthcheck_nginx_upstreams/ --with-debug
error_log logs/error_log debug_http;
upstream backend { ip_hash; server 172.16.0.130:81; server 172.16.0.130:82; server 172.16.0.130:22; # 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'; }
2011/07/29 12:15:54 [debug] 26735#0: healthcheck: begun healthcheck of index 2 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Memzero done 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Connecting peer 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: connected so far 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Peer connected 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Send size 44 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Finished sending request 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Write handler called 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Ignoring a write. Not in writing state 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Read handler called 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Recv size 39 when I wanted 6442450945000 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Recv size -2 when I wanted 6442450944961 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Process recv 2011/07/29 12:15:54 [debug] 26735#0: healthcheck: Finished 172.16.0.130:22, state 201 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: begun healthcheck of index 0 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Memzero done 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Connecting peer 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: connected so far 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Peer connected 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Send size 44 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Finished sending request 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Write handler called 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Ignoring a write. Not in writing state 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Write handler called 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Ignoring a write. Not in writing state 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Read handler called 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Recv size 211 when I wanted 4398046512104 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Recv size -2 when I wanted 4398046511893 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Process recv 2011/07/29 12:15:54 [debug] 26733#0: healthcheck: Finished 172.16.0.130:81, state 100 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: begun healthcheck of index 1 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Memzero done 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Connecting peer 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: connected so far 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Peer connected 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Send size 44 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Finished sending request 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Write handler called 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Ignoring a write. Not in writing state 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Read handler called 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Recv size 211 when I wanted 6442450945000 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Recv size -2 when I wanted 6442450944789 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Process recv 2011/07/29 12:15:57 [debug] 26735#0: healthcheck: Finished 172.16.0.130:82, state 100
Where 81 and 82 tcp-ports is a tomcat, who answer "HTTP/1.1 200 OK\r\n" with some fields and close connection. And 22 is a localhost ssh server, who simply close tcp socket without answer if nginx send "GET /PingAction.do HTTP/1.0\r\n"
As i see in ngx_http_healthcheck_module.c "state 100" is a NGX_HEALTH_OK ( // Good + final states) "state 201" is a NGX_HEALTH_BAD_STATUS (// bad + final states)
But in my case all inversely - :81 and :82 are good - they answer "HTTP/1.1 200 OK\r\n" and 22 is bad - he close connection without answer
Posted at Nginx Forum:
http://forum.nginx.org/read.php?2,191445,213076#msg-213076
_______________________________________________ nginx mailing list ngi...@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx





