You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/11/14 02:28:45 UTC

[GitHub] [apisix] HelloBug0 commented on issue #2739: request help: health check not working

HelloBug0 commented on issue #2739:
URL: https://github.com/apache/apisix/issues/2739#issuecomment-727123772


   I used you configuration to see wheather it's as same as yours.  I tried to close each port configured in the upstream and everything works well in the program.
   You can see if there is a warn log in the log file which means this host has been checked and it won't be choosen again.
   ```
   2020/11/14 02:14:23 [warn] 218476#218476: *33720 [lua] healthcheck.lua:1107: log(): [healthcheck] (upstream#/apisix/upstreams/1) unhealthy TCP increment (1/2) for '(9.23.27.226:7001)', context: ngx.timer, client: ::1, server: [::]:9080
   2020/11/14 02:14:25 [warn] 218473#218473: *33843 [lua] healthcheck.lua:1107: log(): [healthcheck] (upstream#/apisix/upstreams/1) unhealthy TCP increment (2/2) for '(9.23.27.226:7001)', context: ngx.timer, client: ::1, server: [::]:9080
   ```
   And if I close both ports, I can see the log just like you. 
   ```
   2020/11/14 02:22:51 [error] 218476#218476: *62776 connect() failed (111: Connection refused) while connecting to upstream, client: ::1, server: , request: "GET /route1 HTTP/1.1", upstream: "http://9.23.27.226:7001/route1", host: "localhost:9080"
   ```
   Here I use you ip and port to replace mine. :)


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org