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

request help: stream proxy healthy check didn't work #2407

Open
zykgssd opened this issue Oct 13, 2020 · 1 comment
Open

request help: stream proxy healthy check didn't work #2407

zykgssd opened this issue Oct 13, 2020 · 1 comment
Labels
enhancement New feature or request

Comments

@zykgssd
Copy link

zykgssd commented Oct 13, 2020

Issue description

create command:

curl http://127.0.0.1:9080/apisix/admin/stream_routes/1 -H 'X-API-KEY: abcdefgxxxxxxxx' -X PUT -d '
{
    "upstream": {
        "nodes": {
            "22.22.22.22:80": 1,
            "11.11.11.11:80": 1
        },
        "type": "roundrobin",
        "checks": {
            "active": {
                "timeout": 3,
                "http_path": "/healthz",
                "healthy": {
                    "interval": 2,
                    "successes": 1
                },
                "unhealthy": {
                    "interval": 1,
                    "http_failures": 2
                },
                "req_headers": ["User-Agent: curl/7.29.0"]
            },
            "passive": {
                "healthy": {
                    "http_statuses": [200, 201],
                    "successes": 3
                },
                "unhealthy": {
                    "http_statuses": [404, 500],
                    "http_failures": 3,
                    "tcp_failures": 3
                }
            }
        }
    }
}'

`

error.log :
`2020/10/13 15:28:51 [error] 163844#163844: *11181092 failed to run balancer_by_lua*: /usr/local/apisix//deps/share/lua/5.1/resty/healthcheck.lua:1319: please configure the 'lua-resty-worker-events' module before using 'lua-resty-healthcheck'
stack traceback:
	[C]: in function 'assert'
	/usr/local/apisix//deps/share/lua/5.1/resty/healthcheck.lua:1319: in function 'new'
	/usr/local/apisix/apisix/balancer.lua:90: in function 'create_obj_fun'
	/usr/local/apisix/apisix/core/lrucache.lua:95: in function 'lrucache_checker'
	/usr/local/apisix/apisix/balancer.lua:133: in function 'fetch_healthchecker'
	/usr/local/apisix/apisix/balancer.lua:194: in function 'pick_server'
	/usr/local/apisix/apisix/balancer.lua:258: in function 'load_balancer'
	/usr/local/apisix/apisix/init.lua:774: in function 'stream_balancer_phase'
	balancer_by_lua:2: in main chunk while connecting to upstream, client: 10.2.1.9, server: 0.0.0.0:80, bytes from/to client:0/0, bytes from/to upstream:0/0

Environment

  • apisix version (cmd: apisix version): 1.5
  • OS: CentOS Linux release 7.7.1908 (Core)
@membphis
Copy link
Member

that is a todo feature, welcome PR to fix it

@membphis membphis added the enhancement New feature or request label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants