Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: The control api /healthcheck of apisix3.2 version cannot query the node information. #10808

Open
guankai opened this issue Jan 11, 2024 · 6 comments
Labels
bug Something isn't working

Comments

@guankai
Copy link

guankai commented Jan 11, 2024

Current Behavior

The corresponding upstream is configured and health_check is set in it. The code is as follows:
"checks": { "active": { "concurrency": 10, "healthy": { "http_statuses": [ 200, 302 ], "interval": 1, "successes": 2 }, "http_path": "/v1/apaas/adapter/login/config", "timeout": 1, "type": "http", "unhealthy": { "http_failures": 5, "http_statuses": [ 429, 404, 500, 501, 502, 503, 504, 505 ], "interval": 1, "tcp_failures": 2, "timeouts": 3 } } }

However, I cannot obtain this upstream information through /healthcheck of the control API, and the following error will be prompted:
{"error_msg":"no checker for upstreams[495651237807522893]"}

The apisix version I am currently using is 3.2. Is it because of a configuration problem? enable_control in config.yaml has been set to true.

Expected Behavior

It is expected that the upstream node information that has been configured with health check can be queried through the /healthcheck interface of the control API.

Error Logs

{"error_msg":"no checker for upstreams[495651237807522893]"}

Steps to Reproduce

  1. Configure health check information for the specified upstream.
    "checks": { "active": { "concurrency": 10, "healthy": { "http_statuses": [ 200, 302 ], "interval": 1, "successes": 2 }, "http_path": "/v1/apaas/adapter/login/config", "timeout": 1, "type": "http", "unhealthy": { "http_failures": 5, "http_statuses": [ 429, 404, 500, 501, 502, 503, 504, 505 ], "interval": 1, "tcp_failures": 2, "timeouts": 3 } } }
    2.Set enable_control= true
  2. Obtain the specified upstream node status through /v1/healthcheck/upstreams/, but it cannot be obtained, prompting no checker for upstreams[495651237807522893]

Environment

  • Apisix version 3.2
@lakshya8066
Copy link
Contributor

I wasn't able to reproduce the error, v1/healthcheck/upstreams/1 worked fine for me.
Can you provide apisix logs and the upstream node config? @guankai

@guankai
Copy link
Author

guankai commented Jan 12, 2024

I wasn't able to reproduce the error, v1/healthcheck/upstreams/1 worked fine for me. Can you provide apisix logs and the upstream node config? @guankai
The following is my upstream configuration:
{
"nodes": [
{
"host": "10.136.106.74",
"port": 30086,
"weight": 1
},
{
"host": "10.136.107.102",
"port": 30080,
"weight": 1
}
],
"timeout": {
"connect": 6,
"send": 6,
"read": 6
},
"type": "chash",
"checks": {
"active": {
"concurrency": 10,
"healthy": {
"http_statuses": [
200,
302
],
"interval": 1,
"successes": 2
},
"http_path": "/v1/apaas/adapter/login/config",
"timeout": 1,
"type": "http",
"unhealthy": {
"http_failures": 5,
"http_statuses": [
429,
404,
500,
501,
502,
503,
504,
505
],
"interval": 1,
"tcp_failures": 2,
"timeouts": 3
}
}
},
"hash_on": "vars",
"key": "remote_addr",
"scheme": "http",
"pass_host": "pass",
"name": "healthcheck-1",
"keepalive_pool": {
"idle_timeout": 60,
"requests": 1000,
"size": 320
}
}
Use postman to debug the control api as follows:

image I did not see the error message of the control api in the apisix log.

@lakshya8066
Copy link
Contributor

I was able to reproduce the error.
The error seems to be coming from here

return nil, str_format("no checker for %s[%s]", src_type, src_id)

Also, did you try to configure this with the latest version?

@lakshya8066
Copy link
Contributor

this looks similar to #7964
Can you check if this solution works for you? #7964 (comment)

@shreemaan-abhishek shreemaan-abhishek added bug Something isn't working wait for update wait for the author's response in this issue/PR labels Jan 15, 2024
@lakshya8066
Copy link
Contributor

@guankai Is there an update on this?

@guankai
Copy link
Author

guankai commented Jan 22, 2024

@guankai Is there an update on this?

The current control API should not be able to solve my problem. I'll deal with it in other ways.thank you

@github-actions github-actions bot added user responded and removed wait for update wait for the author's response in this issue/PR labels Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 📋 Backlog
Development

No branches or pull requests

3 participants