idbeta opened a new issue #2745:
URL: https://github.com/apache/apisix/issues/2745


   ### Issue description
   After enable active health checks, error.log has extra content.
   
   ### Environment
   * apisix version (cmd: `apisix version`): master
   * OS:
   
   when After enable active health checks, error.log has extra content.
   route:
   ```
   curl http://127.0.0.1:9080/apisix/admin/routes/1 -H 'X-API-KEY: 
edd1c9f034335f136f87ad84b625c8f1' -X PUT -d '
   {
       "uri": "/404.html",
       "upstream": {
            "nodes": {
               "45.76.29.156:80": 1,
               "127.0.0.1:9797": 1
           },
           "type": "roundrobin",
           "retries": 2,
           "checks": {
               "active": {
                   "timeout": 5,
                   "http_path": "/404.html",
                   "healthy": {
                       "interval": 2,
                       "successes": 1
                   },
                   "unhealthy": {
                       "interval": 1,
                       "http_failures": 2
                   },
                   "req_headers": ["User-Agent: curl/7.29.0"]
               }
           }
       }
   }'
   ```
   
   the error.log
   ```
   2020/11/14 11:46:54 [warn] 95077#3298494: *1652550 [lua] 
healthcheck.lua:1107: log(): 
   [healthcheck] (upstream#/apisix/routes/1) unhealthy HTTP increment (1/2) for 
'foo.com(45.76.29.156:80)', 
   context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:9080
   2020/11/14 11:46:54 [warn] 95077#3298494: *1652550 [lua] 
healthcheck.lua:1107: log(): 
   [healthcheck] (upstream#/apisix/routes/1) unhealthy HTTP increment (2/2) for 
'(45.76.29.156:80)', 
   context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:9080
   2020/11/14 11:46:55 [warn] 95077#3298494: *1652680 [lua] 
healthcheck.lua:1107: log(): 
   [healthcheck] (upstream#/apisix/routes/1) healthy SUCCESS increment (1/1) 
for '(45.76.29.156:80)', 
   context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:9080
   2020/11/14 11:46:55 [warn] 95077#3298494: *1652695 [lua] 
healthcheck.lua:1107: log(): 
   [healthcheck] (upstream#/apisix/routes/1) healthy SUCCESS increment (1/1) 
for 'foo.com(45.76.29.156:80)', 
   context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:9080
   ```
   I think the `foo.com` and the `no foo.com` should merge, if `foo.com` be set 
in the route log only record the`foo.com` one, otherwise only record the`no 
foo.com` one.


----------------------------------------------------------------
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:
[email protected]


Reply via email to